diff --git a/frontend/src/components/Quiz.vue b/frontend/src/components/Quiz.vue index 1a7afe67..9d7dfba9 100644 --- a/frontend/src/components/Quiz.vue +++ b/frontend/src/components/Quiz.vue @@ -253,8 +253,6 @@ const quiz = createResource({ if (data.shuffle_questions) { data.questions = data.questions.sort(() => Math.random() - 0.5) } - attempts.reload() - resetQuiz() }, }) @@ -286,6 +284,16 @@ const attempts = createResource({ }, }) +watch( + () => quiz.data, + () => { + if (quiz.data) { + attempts.reload() + resetQuiz() + } + } +) + const quizSubmission = createResource({ url: 'lms.lms.doctype.lms_quiz.lms_quiz.quiz_summary', makeParams(values) {