From 4684411d092d2cf99f12caa49e769a4fedac4de9 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 16 Mar 2026 16:21:21 +0530 Subject: [PATCH] feat: mark questions for review in quiz --- frontend/src/components/Quiz.vue | 54 +++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/Quiz.vue b/frontend/src/components/Quiz.vue index a08a5e24..fd0e0c26 100644 --- a/frontend/src/components/Quiz.vue +++ b/frontend/src/components/Quiz.vue @@ -120,16 +120,12 @@
- - {{ __('Question {0}').format(activeQuestion) }}: - - - {{ getInstructions(questionDetails.data) }} - + {{ __('Question {0}').format(activeQuestion) }} - + {{ getInstructions(questionDetails.data) }}
{{ question.marks }} @@ -227,14 +223,19 @@ />
-
+ +
+
+
+ {{ __('Questions marked for review') }} +
+
+
+ {{ index }} +
+
+
-
+
{{ __('Quiz Summary') }}
@@ -426,6 +441,7 @@ import { Badge, Button, call, + Checkbox, createResource, Dialog, ListView, @@ -459,6 +475,7 @@ const selectedOptions = ref([0, 0, 0, 0]) const showAnswers = reactive([]) let questions = reactive([]) const attemptedQuestions = ref([]) +const reviewQuestions = ref([]) const showSubmissionConfirmation = ref(false) const possibleAnswer = ref(null) const timer = ref(0) @@ -910,6 +927,18 @@ const paginationWindow = computed(() => { return pages }) +const markForReview = (event, questionNumber) => { + if (event.target.checked) { + if (!reviewQuestions.value.includes(questionNumber)) { + reviewQuestions.value.push(questionNumber) + } + } else { + reviewQuestions.value = reviewQuestions.value.filter( + (num) => num !== questionNumber + ) + } +} + const getSubmissionColumns = () => { return [ { @@ -938,8 +967,3 @@ const getSubmissionColumns = () => { ] } -