-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.24, 3.11.6, 3.11.17, 4.0.11, 4.1.6, 4.2.3, 4.3
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
-
MDL-74378_401 -
MDL-74378_403 -
MDL-74378_master -
- Define a time limit instead of just setting a closing time.
- Have students reload the page or click "Finish attempt…" and then "Return to attempt…" once there is less than one hour left.
-
When a quiz has no time limit, but has a closing time that is more than one hour away from the start of the attempt, no countdown timer is shown during the attempt. This is intentional behaviour. Therefore, M.mod_quiz.timer is not initialized. However, as soon as there is less than one hour left, M.mod_quiz.timer.updateEndTime() will call update() and this will fail, because the function references M.mod_quiz.timer.Y which is null. This leads to the following error:
module.js:169 Uncaught TypeError: Cannot read properties of null (reading 'one')
at Object.update (module.js:169:11)
at Object.updateEndTime (module.js:190:30)
at Object.save_done (yui_combo.php?m/-1/mod_quiz/autosave/autosave-debug.js:382:30)
at Y.Subscriber._notify (yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13760:35)
at Y.Subscriber.notify (yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13789:24)
at Y.CustomEvent._notify (yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13452:17)
at Y.CustomEvent._procSubs (yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13578:36)
at Y.CustomEvent.fireSimple (yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13545:18)
at Y.CustomEvent._fire (yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13527:29)
at IO.fire (yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:14658:22)
As a consequence, the module script will stop working, so from then on, no auto-save will happen and the quiz will not be auto-submitted once the time is up. (The cron job will eventually submit the quiz, but it will use the data from the last auto-save which would be ~ one hour from the end time.)
The error does not occur if the page is reloaded due to a manual reload or a change of quiz page after there is less than one hour left.
Original report
We've had a case where teachers created a 59 question quiz with all questions on one page. The end time of the quiz was 2h 45min after its start time. Due to this 1h limit the remaining time doesn't get displayed and the quiz doesn't get automatically submitted (unless you open or reload the quiz page less than 1h before the end). Since autosaves stop happening 2 x autosaveperiod before the end of the quiz students who relied on auto-submission and didn't manually submit in time lost some of their answers.
Is there a reason for that 1h limit? Is seems arbitrary. Getting rid of it would probably be the easiest way to fix this kind of problem.