After Deleting Quiz/Tests they don't get removed from the Database

After Deleting Quiz/Tests they don't get removed from the Database

by santonymous HackerOneUser -
Number of replies: 1

Hello everyone,

i just recently started trying to create a new Moodle Quiz type. Everything is looking good so far, i'm just wondering after i delete a question type from the Quiz the records are still available in the Database for some reason, the same goes for the Quiz in general. (I'm working local with the Moodle Version 3.10). Is there an error with my setup for Moodle or does the Data get reset at a specific time? or anything else?

I would be happy if anyone could help me out!

Greetings

Average of ratings: -
In reply to santonymous HackerOneUser

Re: After Deleting Quiz/Tests they don't get removed from the Database

by S G -
@santonymous HackerOneUser

When you delete a quiz, it goes into the recycle bin and gets emptied when the cycle runs. (You can see the documentation for your Moodle version to see how to work with the recycle bin function.)

However, deleting a quiz does not remove everything - if the quiz has been attempted by any user.

The system will still have the scores + the details of the questions used in that specific attempt of the quiz etc.

If you try to delete the questions (from the question banks) that had been used in the deleted quiz, the system will not let you delete.

If you want to delete a quiz and the questions used in any previous attempts of the quiz, you have to delete all the attempt history of the quiz for all users.

Or, you can just reset the entire course (taking care not to delete the users); this will remove all scores and attempt history for all users of the course. After doing this, you can delete quizzes + the questions used in the quiz.