Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-17809

Matching Question Type Answers do not restore from backup

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Duplicate
    • 1.9.3
    • None
    • Backup, Questions
    • None
    • Any
    • MOODLE_19_STABLE

    Description

      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.

      1. Quiz "Exam"
      2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              barrysspace Barry Oosthuizen
              Nobody Nobody
              Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Safat Shahin, Tim Hunt, Amaia Anabitarte, Brett Dalton, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Sabina Abellan, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: