Updated the counter of exercises
This commit is contained in:
@@ -18,6 +18,7 @@ import Button from "@/components/Low/Button";
|
||||
import BlankQuestionsModal from "@/components/BlankQuestionsModal";
|
||||
import useExamStore from "@/stores/examStore";
|
||||
import {defaultUserSolutions} from "@/utils/exams";
|
||||
import {countExercises} from "@/utils/moduleUtils";
|
||||
|
||||
interface Props {
|
||||
exam: ReadingExam;
|
||||
@@ -209,7 +210,7 @@ export default function Reading({exam, showSolutions = false, onFinish}: Props)
|
||||
) || 0) + (exerciseIndex === -1 ? 0 : 1)
|
||||
}
|
||||
module="reading"
|
||||
totalExercises={exam.parts.flatMap((x) => x.exercises).length}
|
||||
totalExercises={countExercises(exam.parts.flatMap((x) => x.exercises))}
|
||||
disableTimer={showSolutions}
|
||||
label={exerciseIndex === -1 ? undefined : convertCamelCaseToReadable(exam.parts[partIndex].exercises[exerciseIndex].type)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user