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

Restoring a lesson backup can lead to broken data

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.1.4, 2.2.1
    • 2.1.5, 2.2.2
    • Backup, Lesson
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MDL-31589-master-2
    • Difficult
    • 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

    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.

      Attachments

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              dobedobedoh Andrew Lyons
              Rajesh Taneja Rajesh Taneja
              Sam Hemelryk Sam Hemelryk
              Andrew Davis Andrew Davis
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/Mar/12