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

Backup dependencies contain logic bugs.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4, 3.5.5, 3.6.3, 3.7
    • Fix Version/s: 3.5.6, 3.6.4
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-60851-master

      Description

      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.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              damyon Damyon Wiese
              Reporter:
              damyon Damyon Wiese
              Peer reviewer:
              Luca Bösch
              Integrator:
              Jake Dallimore
              Tester:
              Michael Hawkins
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/19

                  Time Tracking

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