Updated the speaking and interactive speaking to the new format

This commit is contained in:
Tiago Ribeiro
2024-06-18 10:02:03 +01:00
parent 0eddded560
commit cb49e15cb0
8 changed files with 51 additions and 41 deletions

View File

@@ -133,14 +133,22 @@ export default function ExamPage({page}: Props) {
!!exam &&
timeSpent > 0 &&
!showSolutions &&
moduleIndex < selectedModules.length
moduleIndex < selectedModules.length &&
selectedModules[moduleIndex] !== "speaking"
)
saveSession();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [assignment, exam, exams, moduleIndex, selectedModules, sessionId, userSolutions, user, exerciseIndex, partIndex, questionIndex]);
useEffect(() => {
if (timeSpent % 20 === 0 && timeSpent > 0 && moduleIndex < selectedModules.length && !showSolutions) saveSession();
if (
timeSpent % 20 === 0 &&
timeSpent > 0 &&
moduleIndex < selectedModules.length &&
selectedModules[moduleIndex] !== "speaking" &&
!showSolutions
)
saveSession();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [timeSpent]);