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

Restoring a lesson backup can lead to broken data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

      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

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Sam Hemelryk
              Tester:
              Andrew Davis
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Mar/12