diff --git a/mod/quiz/doc/versioning.html b/mod/quiz/doc/versioning.html index cc76bced279..78720592c5c 100644 --- a/mod/quiz/doc/versioning.html +++ b/mod/quiz/doc/versioning.html @@ -31,8 +31,23 @@ The first goal, namely keeping around old questions, is easily achieved. They are just not deleted any more. However, this is not enough; it is also necessary to store which questions are versions of others. To achieve this goal, there is an additional table, which stores the versioning information: -quiz_question_versions. Finally, there is a cosmetic issue. If all -old versions of questions are kept around this would horribly clutter the +quiz_question_versions. + +

+ +When a question is replaced for which there are already student attempts then +all the attempt data gets associated to the new version of the question and is +re-graded. This requires the question ids in the quiz_attempts, +quiz_states and quiz_newest_states tables to be +replaced by the new id. However we do also want to be able to reconstruct +the quiz the way the student saw it when he gave his answers. For that purpose +the id of the original question is always preserved in the 'originalquestion' +field of the quiz_states table. + +

+ +If all +old versions of questions are kept around this could horribly clutter the editing interface. Therefore a field called hidden was added to the quiz_questions table and all old versions of edited questions are automatically hidden. When this flag is set to 1 the question is not displayed @@ -71,10 +86,12 @@ checked for that quiz as well.

Database

-The changes to the database structure are limited to an added field -(hidden) in the quiz_questions table and an additional -table called quiz_question_versions. However, dealing with the -quiz_questions table has become slightly more complicated. +The changes to the database structure are limited to an +added field (hidden) in the +quiz_questions table and an additional table called +quiz_question_versions. However, dealing with the +quiz_questions table has become slightly more +complicated.

@@ -104,15 +121,15 @@ the order shown below (compare with question.php):