Wrong answeredEveryQuestion
This commit is contained in:
@@ -2,7 +2,7 @@ import { ExerciseOnlyExam, ModuleExam, PartExam } from "@/interfaces/exam";
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import scrollToTop from "../utils/scrollToTop";
|
import scrollToTop from "../utils/scrollToTop";
|
||||||
import { Module } from "@/interfaces";
|
import { Module } from "@/interfaces";
|
||||||
import { answeredEveryQuestion } from "../utils/answeredEveryQuestion";
|
import { answeredEveryQuestion, answeredEveryQuestionInPart } from "../utils/answeredEveryQuestion";
|
||||||
import useExamStore, { usePersistentExamStore } from "@/stores/exam";
|
import useExamStore, { usePersistentExamStore } from "@/stores/exam";
|
||||||
import hasDivider from "../utils/hasDivider";
|
import hasDivider from "../utils/hasDivider";
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ const useExamNavigation: UseExamNavigation = ({
|
|||||||
return;
|
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();
|
if (modalKwargs) modalKwargs();
|
||||||
setShowBlankModal(true);
|
setShowBlankModal(true);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user