Updated the counter of exercises

This commit is contained in:
Tiago Ribeiro
2023-10-15 22:54:40 +01:00
parent 18e12db7c5
commit f51dc450b9
7 changed files with 24 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import {infoButtonStyle} from "@/constants/buttonStyles";
import {UserSolution, SpeakingExam} from "@/interfaces/exam";
import useExamStore from "@/stores/examStore";
import {defaultUserSolutions} from "@/utils/exams";
import {countExercises} from "@/utils/moduleUtils";
import {convertCamelCaseToReadable} from "@/utils/string";
import {mdiArrowRight} from "@mdi/js";
import Icon from "@mdi/react";
@@ -72,7 +73,7 @@ export default function Speaking({exam, showSolutions = false, onFinish}: Props)
minTimer={exam.minTimer}
exerciseIndex={exerciseIndex + 1}
module="speaking"
totalExercises={exam.exercises.length}
totalExercises={countExercises(exam.exercises)}
disableTimer={showSolutions}
/>
{exerciseIndex > -1 &&