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

Backup dependencies contain logic bugs.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.5.6, 3.6.4
    • 3.4, 3.5.5, 3.6.3, 3.7
    • Backup
    • MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MDL-60851-master
    • Hide

      Backup a course with many activities.

      1. On the first page of the backup process, uncheck "Include enrolled users". 
      2. Proceed to the second page of the backup process. Verify that all of the "user data" options are displayed as a red cross and cannot be turned on.
      3. Use the "Previous" button to return to the first page of the backup process.
      4. Check the "Include enrolled users" checkbox again.
      5. Verify that the "Include user role assignments" setting is enabled.
      6. Proceed to the second page of the backup process. Verify that all of the "User data" settings are enabled and checked.
      7. Complete the backup. No debugging messages should appear anywhere. 

      Restore the backup to a new course.

      1. On the first page of the restore process (the one with '3. Settings' in the 'breadcrumb'), uncheck "Include enrolled users". 
      2. Proceed to the second page of the restore process (the one with '4. Schema' in the 'breadcrumb'). Verify that none of the "User data" settings can be enabled.
      3. Use the "Previous" button to return to the first page of the restore process.
      4. Check the "Include enrolled users" checkbox again.
      5. Verify that the "Include user role assignments" setting is enabled.
      6. Proceed to the second page of the restore process. Verify that all of the "User data" settings are enabled and checked.
      7. Complete the restore. No debugging messages should appear anywhere.
      Show
      Backup a course with many activities. On the first page of the backup process, uncheck "Include enrolled users".  Proceed to the second page of the backup process. Verify that all of the "user data" options are displayed as a red cross and cannot be turned on. Use the "Previous" button to return to the first page of the backup process. Check the "Include enrolled users" checkbox again. Verify that the "Include user role assignments" setting is enabled. Proceed to the second page of the backup process. Verify that all of the "User data" settings are enabled and checked. Complete the backup. No debugging messages should appear anywhere.  Restore the backup to a new course. On the first page of the restore process (the one with '3. Settings' in the 'breadcrumb'), uncheck "Include enrolled users".  Proceed to the second page of the restore process (the one with '4. Schema' in the 'breadcrumb'). Verify that none of the "User data" settings can be enabled. Use the "Previous" button to return to the first page of the restore process. Check the "Include enrolled users" checkbox again. Verify that the "Include user role assignments" setting is enabled. Proceed to the second page of the restore process. Verify that all of the "User data" settings are enabled and checked. Complete the restore. No debugging messages should appear anywhere.

      While reviewing MDL-27886 I found many other problems with the logic in the backup dependencies classes. They require some refactoring to reduce code duplication,  simplification and more unit tests.

       

        1. MDL-60851-master-backup-step2.png
          13 kB
          Michael Hawkins
        2. MDL-60851-master-backup-step5-fail.png
          17 kB
          Michael Hawkins
        3. MDL-60851-master-backup-step6.png
          14 kB
          Michael Hawkins
        4. MDL-60851-master-backup-step7.png
          47 kB
          Michael Hawkins
        5. MDL-60851-master-restore-step2.png
          13 kB
          Michael Hawkins
        6. MDL-60851-master-restore-step5-fail.png
          20 kB
          Michael Hawkins
        7. MDL-60851-master-restore-step6.png
          11 kB
          Michael Hawkins
        8. MDL-60851-master-restore-step7.png
          30 kB
          Michael Hawkins

            damyon Damyon Wiese
            damyon Damyon Wiese
            Luca Bösch Luca Bösch
            Jake Dallimore Jake Dallimore
            Michael Hawkins Michael Hawkins
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 30 minutes
                3h 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.