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

Restoring a lesson backup can lead to broken data

    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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              dobedobedoh Andrew Nicols created issue -
              dobedobedoh Andrew Nicols made changes -
              Field Original Value New Value
              Priority Minor [ 4 ] Critical [ 2 ]
              dobedobedoh Andrew Nicols made changes -
              Link This issue has a non-specific relationship to MDL-31386 [ MDL-31386 ]
              dobedobedoh Andrew Nicols made changes -
              Pull Master Diff URL https://git.luns.net.uk/?p=moodle.git;a=commitdiff;h=a64ac86e781d009a034509457745480520368982
              Pull Master Branch MDL-31589-master-1
              Pull from Repository git://git.luns.net.uk/moodle.git
              Labels patch
              Attachment multiple_questions_in_activity.mbz [ 26729 ]
              Difficulty Difficult [ 10025 ]
              dobedobedoh Andrew Nicols made changes -
              Assignee moodle.com [ moodle.com ] Andrew Nicols [ dobedobedoh ]
              dobedobedoh Andrew Nicols made changes -
              Status Open [ 1 ] Waiting for peer review [ 10012 ]
              rajeshtaneja Rajesh Taneja made changes -
              Original Estimate 0 minutes [ 0 ]
              Remaining Estimate 0 minutes [ 0 ]
              Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
              Peer reviewer rajeshtaneja
              rajeshtaneja Rajesh Taneja made changes -
              Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
              dobedobedoh Andrew Nicols made changes -
              Attachment multiple_questions_in_activity.mbz [ 26729 ]
              dobedobedoh Andrew Nicols made changes -
              Attachment lesson_with_multiple_questions.mbz [ 26851 ]
              dobedobedoh Andrew Nicols made changes -
              Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
              rajeshtaneja Rajesh Taneja made changes -
              Status Waiting for peer review [ 10012 ] Waiting for integration review [ 10010 ]
              samhemelryk Sam Hemelryk made changes -
              Currently in integration Yes [ 10041 ]
              samhemelryk Sam Hemelryk made changes -
              Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
              Integrator samhemelryk
              samhemelryk Sam Hemelryk made changes -
              Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
              Fix Version/s 2.1.5 [ 11553 ]
              Fix Version/s 2.2.2 [ 11552 ]
              salvetore Michael de Raadt made changes -
              Labels patch patch triaged
              salvetore Michael de Raadt made changes -
              Tester andyjdavis
              andyjdavis Andrew Davis made changes -
              Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
              andyjdavis Andrew Davis made changes -
              Status Testing in progress [ 10011 ] Tested [ 10006 ]
              rajeshtaneja Rajesh Taneja made changes -
              Testing Instructions h3. 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

              h3. Testing
              * restore the backup
              * open the lesson
              * edit the question
              * The answers are all mixed up
              h3. 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

              h3. Testing
              * restore the backup
              * open the lesson
              * edit the question
              * The answers should not be mixed up
              stronk7 Eloy Lafuente (stronk7) made changes -
              Status Tested [ 10006 ] Closed [ 6 ]
              Resolution Fixed [ 1 ]
              Currently in integration Yes [ 10041 ]
              Integration date 23/Feb/12
              salvetore Michael de Raadt made changes -
              Link This issue has been marked as being related by MDL-32061 [ MDL-32061 ]
              cfollin Chris Follin made changes -
              Link This issue caused a regression MDL-32061 [ MDL-32061 ]
              salvetore Michael de Raadt made changes -
              Link This issue has been marked as being related by MDL-32061 [ MDL-32061 ]

                People

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

                  Dates

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