What happens is that adding random questions used to set the timestamps
of these questions to the same value. This is fine in normal operation,
but it stuffs up the backup of that course, overwriting the question.
When the course is restored, the missing questions cause quizzes to
have lots of red notices like "Question not found".
Anyhow, this patch should safely fix older installations that may have
these duplicate questions lying around.
THANKS ELOY!
Especially for multianswer questions it is often desirable to have the grade of the question in a quiz larger than the earlier maximum of 10 points.
The new function quiz_gradesmenu_options($defaultgrade) makes quiz question list grade selector drop-down have the maximum grade option set to the highest value between 10 and the defaultgrade of the question.
If it exists in backup-file used, else, old search-by-name is used.
When inserting new categories, stamp is filled it it doesn't exist.
Updated version to 1.1 Beta +++ !!
field is set to yes. Else, a new "local" category is created.
Added some lines of code to mantain old compatibility when detecting
existing questions (do it by name if the stamp is not found) and insert
the stamp too !!
Please, test.
The process look for category, stamp and version to calculate
when to create a question or use a existing one.
This avoid duplicates in RANDOM and RANDOMSAMATCH qtypes.
they haven't been responsed in the quiz. The answer field in
quiz_responses must have X-0,Y-0 format instead of null.
Curiosly, MATCH(5) questions must have null if they aren'r
responsed.
question types.
And modified some of the quiz_answers restore system to
allow remapping answers with existing questions.
//Detected by scott dot elliott at mchsi dot com in Bug 84
This fix rids warnings that used to come when a student for the first time attempts a quiz with the option "Each attempt builds on the last" = Yes (attemptonlast).
Now the option is not in effect when a student attempts a quiz for the first time, i.e. when there is no last attempt to build on.