feat: Implement quiz functionality with a new dedicated page and comprehensive internationalization strings.
All checks were successful
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 35s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 4s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 1s
All checks were successful
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 35s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 4s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 1s
This commit is contained in:
parent
7f5119e5aa
commit
1146373ca0
3 changed files with 25 additions and 5 deletions
|
|
@ -206,7 +206,7 @@
|
||||||
},
|
},
|
||||||
"quiz": {
|
"quiz": {
|
||||||
"exitTitle": "Exit Quiz",
|
"exitTitle": "Exit Quiz",
|
||||||
"exitConfirm": "You are taking a quiz. If you leave now, your progress will be lost. Are you sure you want to exit?",
|
"exitConfirm": "Do you want to exit the quiz? Your quiz attempt will be cancelled.",
|
||||||
"startTitle": "End of Chapter Quiz",
|
"startTitle": "End of Chapter Quiz",
|
||||||
"preparationTitle": "Preparation before starting",
|
"preparationTitle": "Preparation before starting",
|
||||||
"instructionTitle": "Instructions",
|
"instructionTitle": "Instructions",
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@
|
||||||
"exitTitle": "ออกจากแบบทดสอบ",
|
"exitTitle": "ออกจากแบบทดสอบ",
|
||||||
"timeLeft": "เวลาที่เหลือ",
|
"timeLeft": "เวลาที่เหลือ",
|
||||||
"submitConfirm": "คุณต้องการส่งคำตอบหรือไม่?",
|
"submitConfirm": "คุณต้องการส่งคำตอบหรือไม่?",
|
||||||
"exitConfirm": "คุณต้องการออกจากแบบทดสอบหรือไม่? การทำแบบทดสอบจะถูกยกเลิก",
|
"exitConfirm": "คุณต้องการออกจากแบบทดสอบหรือไม่? การทำแบบทดสอบของคุณจะถูกยกเลิก",
|
||||||
"submitValues": "ส่งคำตอบ",
|
"submitValues": "ส่งคำตอบ",
|
||||||
"question": "คำถาม",
|
"question": "คำถาม",
|
||||||
"backToLesson": "กลับไปหน้าเรียน",
|
"backToLesson": "กลับไปหน้าเรียน",
|
||||||
|
|
|
||||||
|
|
@ -328,9 +328,29 @@ const confirmExit = () => {
|
||||||
const target = courseId ? `/classroom/learning?course_id=${courseId}` : '/dashboard/my-courses'
|
const target = courseId ? `/classroom/learning?course_id=${courseId}` : '/dashboard/my-courses'
|
||||||
|
|
||||||
if (currentScreen.value === 'taking') {
|
if (currentScreen.value === 'taking') {
|
||||||
if (confirm(t('quiz.exitConfirm'))) {
|
$q.dialog({
|
||||||
router.push(target)
|
title: `<div class="text-slate-900 dark:text-white font-black text-xl">${t('quiz.exitTitle')}</div>`,
|
||||||
|
message: `<div class="text-slate-600 dark:text-slate-300 text-base leading-relaxed mt-2">${t('quiz.exitConfirm')}</div>`,
|
||||||
|
html: true,
|
||||||
|
persistent: true,
|
||||||
|
class: 'rounded-[24px]',
|
||||||
|
ok: {
|
||||||
|
label: t('common.ok'),
|
||||||
|
color: 'primary',
|
||||||
|
unelevated: true,
|
||||||
|
rounded: true,
|
||||||
|
class: 'px-8 font-black'
|
||||||
|
},
|
||||||
|
cancel: {
|
||||||
|
label: t('common.cancel'),
|
||||||
|
color: 'grey-7',
|
||||||
|
flat: true,
|
||||||
|
rounded: true,
|
||||||
|
class: 'font-bold'
|
||||||
}
|
}
|
||||||
|
}).onOk(() => {
|
||||||
|
router.push(target)
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
router.push(target)
|
router.push(target)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue