Fixed some navigation issues and updated Listening
This commit is contained in:
@@ -193,9 +193,9 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
|
||||
useEffect(() => {
|
||||
if (flags.finalizeExam && moduleIndex !== -1) {
|
||||
setModuleIndex(-1);
|
||||
setModuleIndex(-1);
|
||||
}
|
||||
}, [flags.finalizeExam, moduleIndex, setModuleIndex]);
|
||||
}, [flags, moduleIndex, setModuleIndex]);
|
||||
|
||||
useEffect(() => {
|
||||
if (flags.finalizeExam && !flags.pendingEvaluation && pendingExercises.length === 0) {
|
||||
@@ -215,11 +215,11 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
await axios.get("/api/stats/update");
|
||||
setShowSolutions(true);
|
||||
setFlags({ finalizeExam: false });
|
||||
dispatch({type: "UPDATE_EXAMS"})
|
||||
dispatch({ type: "UPDATE_EXAMS" })
|
||||
})();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [saveStats, setFlags, setModuleIndex, evaluated, pendingExercises, setUserSolutions]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [saveStats, setFlags, setModuleIndex, evaluated, pendingExercises, setUserSolutions, flags]);
|
||||
|
||||
|
||||
const aggregateScoresByModule = (isPractice?: boolean): {
|
||||
|
||||
Reference in New Issue
Block a user