feat: Implement a comprehensive quiz interface with start, taking, result, and review screens, including a timer and navigation.

This commit is contained in:
supalerk-ar66 2026-01-29 16:52:43 +07:00
parent 24c37df4ef
commit b41b59cc7c

View file

@ -166,7 +166,7 @@ const retryQuiz = () => {
}
const submitQuiz = async (auto = false) => {
if (!auto && !confirm(t('quiz.submitConfirm'))) return
// if (!auto && !confirm(t('quiz.submitConfirm'))) return <-- Removed logic
if (timerInterval) clearInterval(timerInterval)
@ -185,13 +185,6 @@ const submitQuiz = async (auto = false) => {
if (res.success) {
quizResult.value = res.data
// Force mark lesson complete if passed (Fix for checkmark issue)
if (res.data.is_passed) {
markLessonComplete(courseId, lessonId).then(() => {
console.log('Explicitly marked lesson complete')
})
}
} else {
// Fallback error handling
alert(res.error || 'Failed to submit quiz')