feat: Implement admin user and course management, instructor course and quiz management
This commit is contained in:
parent
8edc3770eb
commit
a65ded02f9
7 changed files with 156 additions and 7 deletions
|
|
@ -121,6 +121,10 @@
|
|||
v-model="quizSettings.is_skippable"
|
||||
label="ทำแบบทดสอบข้ามได้"
|
||||
/>
|
||||
<q-toggle
|
||||
v-model="quizSettings.allow_multiple_attempts"
|
||||
label="อนุญาตให้ทำซ้ำได้หลายรอบ"
|
||||
/>
|
||||
</div>
|
||||
<div class="mt-4 text-right">
|
||||
<q-btn
|
||||
|
|
@ -383,7 +387,8 @@ const quizSettings = ref({
|
|||
shuffle_questions: false,
|
||||
shuffle_choices: false,
|
||||
show_answers_after_completion: true,
|
||||
is_skippable: false
|
||||
is_skippable: false,
|
||||
allow_multiple_attempts: false
|
||||
});
|
||||
|
||||
const savingSettings = ref(false);
|
||||
|
|
@ -399,7 +404,8 @@ const saveQuizSettings = async () => {
|
|||
shuffle_questions: quizSettings.value.shuffle_questions,
|
||||
shuffle_choices: quizSettings.value.shuffle_choices,
|
||||
show_answers_after_completion: quizSettings.value.show_answers_after_completion,
|
||||
is_skippable: quizSettings.value.is_skippable
|
||||
is_skippable: quizSettings.value.is_skippable,
|
||||
allow_multiple_attempts: quizSettings.value.allow_multiple_attempts
|
||||
});
|
||||
$q.notify({ type: 'positive', message: response.message, position: 'top' });
|
||||
} catch (error) {
|
||||
|
|
@ -509,7 +515,8 @@ const fetchLesson = async () => {
|
|||
shuffle_questions: data.quiz.shuffle_questions || false,
|
||||
shuffle_choices: data.quiz.shuffle_choices || false,
|
||||
show_answers_after_completion: data.quiz.show_answers_after_completion !== false,
|
||||
is_skippable: data.quiz.is_skippable || false
|
||||
is_skippable: data.quiz.is_skippable || false,
|
||||
allow_multiple_attempts: data.quiz.allow_multiple_attempts || false
|
||||
};
|
||||
|
||||
// Load questions from API
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@
|
|||
<q-tab name="students" icon="people" label="ผู้เรียน" />
|
||||
<q-tab name="instructors" icon="manage_accounts" label="ผู้สอน" />
|
||||
<q-tab name="quiz" icon="quiz" label="ผลการทดสอบ" />
|
||||
<q-tab name="history" icon="history" label="ประวัติการขออนุมัติ" />
|
||||
<q-tab name="announcements" icon="campaign" label="ประกาศ" />
|
||||
</q-tabs>
|
||||
|
||||
|
|
@ -135,6 +136,11 @@
|
|||
<CourseQuizResultsTab :course-id="course.id" :chapters="course.chapters" />
|
||||
</q-tab-panel>
|
||||
|
||||
<!-- Approval History Tab -->
|
||||
<q-tab-panel name="history" class="p-6">
|
||||
<CourseApprovalHistoryTab :course-id="course.id" />
|
||||
</q-tab-panel>
|
||||
|
||||
<!-- Announcements Tab -->
|
||||
<q-tab-panel name="announcements" class="p-6">
|
||||
<CourseAnnouncementsTab :course-id="course.id" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue