Changing quiz/question type

Re: Changing quiz/question type

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

This seems very hazardous. (E.g. what happens if someone tries to regrade this quiz in future.)

Another option:

  1. Make a completely new quiz.
  2. Hide the old quiz from students.
  3. In the gradebook, add a new Grade item with calculation (score from old quiz) + (score from new quiz). That will effectively merge the scores from the two quizzes.
In reply to Tim Hunt

Re: Changing quiz/question type

by Max Stucchi -
Thanks for the answer.

At the moment, the situation we have is that we have made it so that the grades and attempts from the old question get associated directly with the new question, so we're pretty good on that side.

The reason for asking here on the forum, is that after some time trying to come up with a solution for retaining the attempts, grades and statistics for the old questions while moving to a new plugin type, we ran out of ideas on how to finish it and are seeking some advice/tips/guidance.

Put another way, if you had to do something like this, how would you approach it ?

Thanks!
In reply to Max Stucchi

Re: Changing quiz/question type

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

How much do you know about how the Moodle quiz/question system works? https://docs.moodle.org/dev/Overview_of_the_Moodle_question_engine#Database_tables & https://docs.moodle.org/dev/Quiz_database_structure


What might make it possible to do what you want is that, once an attempt has been started, the link from the quiz attempt to the question is

quiz_attempts.uniqueid -> question_attempts.questionusageid ; question_attempts.questionid -> question.id

and it no longer matters how the quiz is set up.

And, because of random questions, all the quiz reports cope just find if you have different questionids in the same slot.

So, just don't change the old quiz attempts at all, but make sure any new quiz_attempts started in future use the new questions you want used.

Would that work?