-
Bug
-
Resolution: Fixed
-
Major
-
3.5.7, 3.6.5, 3.7.1, 3.11.9, 3.11.10
-
MOODLE_311_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
-
MOODLE_311_STABLE
-
Note, this is only an issue with Moodle 3.x. It is no longer relevant in 4.x:
Large course with many quizzes using random questions as the question type
I back up the course with the quizzes and if I restore course and theĀ \qtype_random\task\remove_unused_questions scheduled task happens to run at the same time that I am restoring, I end up with a course of quizzes that have no questions or have missing questions that say "This question no longer seems to exist".
I was able to replicate this by backing up my course and then running the cron while it restored. It was deleted unused random questions, while my restore was running. Once my restore was complete, none of my quizzes had any questions in them.
I can work around this by scheduling that task to run only once a night, but the default for that task is set to run on the 19th minute of every hour, so I could see this causing issues for anyone who happens to leave this on default settings and restores a course during that minute.
My guess is that the random question records are being created before the restore creates the quiz and associates the records so the cron sees them as unused before the restore can finish.
- has a non-specific relationship to
-
MDL-83151 Quiz slots remained after questions were deleted as unused
-
- Open
-