Edit Quiz that has attempts without deleting them?

Edit Quiz that has attempts without deleting them?

by Mohammad Awni -
Number of replies: 1

Hello, I have a quiz with some questions that for some reason had leaked for students, now I want to be able to add new question bank and set questions from it for that specif quiz, I can't delete the old attempts for two reasons:

1. I don't want the user to be able to attempt the quiz again.

2. The database is connected with another system that reads the grades.

Average of ratings: -
In reply to Mohammad Awni

Re: Edit Quiz that has attempts without deleting them?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

When you integrate to another system, a good way to do it is to integrate from the gradebook, and do the integration based on idnumber.

That way, if you get a situation like this, you can make a new quiz for people who have not attempted the old quiz, and make a calculated column in the gradebook to combine the grades form the two quizzes, and then switch the integration to use that calculated column.


However, that is not the situation you are in. It is not supported to change the questions in the quiz after some students have attempted it. What I am about to say is purely theoretical, and completely untested, but it might work. Use at your own risk, and you should really test on another server first, with some made up date.

OK, so the way the data structure works is that you have the quiz_slots table in the database, which links quizid to questionid. If you just change the questionid for some questions in a quiz to point to a different question, then it will probably be safe. Note, it is very important. Do not change any of the other values, or delete or add any rows. Also, this will only have an effect for students who have not started the quiz yet.

If you try this, please report back to tell us if it worked.

Average of ratings: Useful (1)