Solved some issues related to the listening loading
This commit is contained in:
@@ -137,6 +137,8 @@ export default function ExamPage({page}: Props) {
|
||||
(async () => {
|
||||
if (selectedModules.length > 0 && exams.length > 0 && moduleIndex < selectedModules.length) {
|
||||
const nextExam = exams[moduleIndex];
|
||||
|
||||
if (partIndex === -1 && nextExam.module !== "listening") setPartIndex(0);
|
||||
setExam(nextExam ? updateExamWithUserSolutions(nextExam) : undefined);
|
||||
}
|
||||
})();
|
||||
@@ -277,7 +279,8 @@ export default function ExamPage({page}: Props) {
|
||||
setUserSolutions([...userSolutions.filter((x) => !solutionIds.includes(x.exercise)), ...solutions]);
|
||||
setModuleIndex(moduleIndex + 1);
|
||||
|
||||
setPartIndex(0);
|
||||
// TODO: Solve the issue for the listening where it should start with -1
|
||||
setPartIndex(-1);
|
||||
setExerciseIndex(-1);
|
||||
setQuestionIndex(0);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user