1. Steps to reproduce:
a. A create a matching question type in a quiz
b. Have a student take the quiz containing the matching question type.
c. Manually backup the course containing the quiz including grade histories
d. Try to restore the course either as a new course or by adding it to an existing course
e. The answers the student gave for the matching question type will be missing from the mdl_question_states.answer field in the database.
f. As a consequence of step 1e above, if the results are regraded the student will loose the grades scored in step 1b.
2. Actual Behaviour:
I backed up my courses and combined them all into one course using Restore. After checking the exams and regrading all students lost their marks for all the matching questions. I was able to trace it back to the Restore function failing to recode in the answers. I found that the original copy and the restored copy of the same attempted quiz had different data inside mdl_question_states.answers i.e. the answers were missing from the restored copy. Multiple choice and True/False questions were unaffected.
E.g.
- Quiz "Exam"
- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quiz "matching question"
Could not recode answer in question_match_sub 185006379
Could not recode answer in question_match_sub 191396361
This causes the submitted answers to not be viewable to the teacher/student in a restored copy of the quiz.
This causes the grades to be lost when regrading seeing as there are no answers in mdl_question_states of the restored copy.
3. Expected behaviour:
When restoring a course containing matching question types in a quizzes the answers selected by students should be in mdl_question_states.answers. When a teacher/student reviews an attempted quiz they would expect to be able to see which answers were selected in the attempt. This is not possible for matching question types with attempts restored from backup.
- duplicates
-
MDL-17326 Error restoring question matchs. Could not recode answer
-
- Closed
-