Cleaning up quizes

Cleaning up quizes

by Ulrik Sandgren -
Number of replies: 4

We ran into problems with huge amount of garbage random quizes, probably from the copy bug (https://tracker.moodle.org/browse/MDL-63260), we are using Moodle 3.6.6.

This is before we started the cleaning cron job: \qtype_random\task\remove_unused_questions

SELECT count(q.id) FROM mdl_question q WHERE q.qtype = 'random' and q.id NOT IN (SELECT b.questionid FROM mdl_quiz_slots b);

Result '992541'

The cron job did its work and deleted all unused random questions.

But I then searched for unused questions of another type then random

SELECT count(q.id) FROM mdl_question q WHERE q.qtype != 'random' and q.id NOT IN (SELECT b.questionid FROM mdl_quiz_slots b);

Result '561958'

Should I consider these as garbage too and what is the best way to clean this up?

Average of ratings: -
In reply to Ulrik Sandgren

Re: Cleaning up quizes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Those are questions that your teachers have created in the question bank of various courses. Probably not junk.
In reply to Tim Hunt

Sv: Re: Cleaning up quizes

by Ulrik Sandgren -
Whats differs random type questions from other questions in this perspective?
Why is random type questions that not exists in mdl_quiz_slots garbage but not other types of questions?

Regards /Ulrik
In reply to Ulrik Sandgren

Re: Sv: Re: Cleaning up quizes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Random question type is not a real question type. It is a bad way to implement the quiz's random question feature. It should be removed (MDL-61267).

The work talked about here: https://moodle.org/mod/forum/discuss.php?d=417599 should finally get rid of it.