Moodle
  1. Moodle
  2. MDL-31589

Restoring a lesson backup can lead to broken data

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2.1
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Backup, Lesson
    • Labels:
    • Testing Instructions:
      Hide

      Prepare a backup (or use the one I've attached)

      • Create a new lesson
      • Create a Matching question within the lesson with fields as follows:
        • Correct response: correct
        • Wrong resonse: wrong
        • Matching pair 1 match: pair 1 match
        • Matching pair 1 answer: pair 1 answer
        • Matching pair 2 match: pair 2 match
        • Matching pair 2 answer: pair 2 answer
        • Matching pair 3 match: pair 3 match
        • Matching pair 3 answer: pair 3 answer
      • Backup the activity
      • Download and unzip the backup
      • Open the activities/lesson_X/lesson.xml fild
      • Find the answers and reverse the order

      Testing

      • restore the backup
      • open the lesson
      • edit the question
      • The answers should not be mixed up
      Show
      Prepare a backup (or use the one I've attached) Create a new lesson Create a Matching question within the lesson with fields as follows: Correct response: correct Wrong resonse: wrong Matching pair 1 match: pair 1 match Matching pair 1 answer: pair 1 answer Matching pair 2 match: pair 2 match Matching pair 2 answer: pair 2 answer Matching pair 3 match: pair 3 match Matching pair 3 answer: pair 3 answer Backup the activity Download and unzip the backup Open the activities/lesson_X/lesson.xml fild Find the answers and reverse the order Testing restore the backup open the lesson edit the question The answers should not be mixed up
    • Difficulty:
      Difficult
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31589-master-2
    • Rank:
      38152

      Description

      As raised in MDL-31386, backups of lessons can contain incorrectly ordered data. Although MDL-31386 suggests a fix to the generated backups, any older backups will still be broken.

      We should fix the restoration process to process the elements in order somehow.

        Issue Links

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: