Merged in feature/ExamGenRework (pull request #117)
Wrong answeredEveryQuestion Approved-by: Tiago Ribeiro
This commit is contained in:
@@ -2,7 +2,7 @@ import { ExerciseOnlyExam, ModuleExam, PartExam } from "@/interfaces/exam";
|
||||
import { useState, useEffect } from "react";
|
||||
import scrollToTop from "../utils/scrollToTop";
|
||||
import { Module } from "@/interfaces";
|
||||
import { answeredEveryQuestion } from "../utils/answeredEveryQuestion";
|
||||
import { answeredEveryQuestion, answeredEveryQuestionInPart } from "../utils/answeredEveryQuestion";
|
||||
import useExamStore, { usePersistentExamStore } from "@/stores/exam";
|
||||
import hasDivider from "../utils/hasDivider";
|
||||
|
||||
@@ -161,7 +161,7 @@ const useExamNavigation: UseExamNavigation = ({
|
||||
return;
|
||||
}
|
||||
|
||||
if (modalBetweenParts && !seenParts.has(partIndex + 1) && !answeredEveryQuestion(exam as PartExam, userSolutions) && !keepGoing && setShowBlankModal && !showSolutions && !preview) {
|
||||
if (modalBetweenParts && !seenParts.has(partIndex + 1) && !answeredEveryQuestionInPart(exam as PartExam, partIndex, userSolutions) && !keepGoing && setShowBlankModal && !showSolutions && !preview) {
|
||||
if (modalKwargs) modalKwargs();
|
||||
setShowBlankModal(true);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user