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

Import: Disabled general restore default values override import settings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for peer review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Backup
    • Testing Instructions:
      Hide

      Unit tests provided.

      Prerequisites:

      1. Create 2 Courses: "Course 1", "Course 2" and "Course 3" and enrol a teacher to those courses

      Testing Instructions

      Case 1: restore | restore_general_groups disabled

      1. Login as admin
      2. Set the value restore | restore_general_groups to No
      3. Login as this teacher
      4. Go to "Course 1"
      5. Autocreate groups "Group 1" - "Group 5" and don't allocate any students to these groups
      6. Make sure you have those Groups in your Course
      7. Go to "Course 2"
      8. Select the import from "Course 1"
      9. Verify that the option Include groups and groupings is checked
      10. Perform the import and press Continue
      11. Go to your group page and verify that there are Groups in "Course 2"
      12. Go to "Course 3"
      13. Select the import from "Course 1"
      14. Verify that the option Include groups and groupings is not checked
      15. Perform the import and press Continue
      16. Go to your group page and verify that there are no Groups in "Course 3"

      Case 2: restore | restore_general_groups enabled

      1. Login as admin again and set the value restore | restore_general_groups to Yes
      2. Repeat Case 1: #3 - #16

       

      Show
      Unit tests provided. Prerequisites: Create 2 Courses: "Course 1", "Course 2" and "Course 3" and enrol a teacher to those courses Testing Instructions Case 1:  restore | restore_general_groups disabled Login as admin Set the value restore | restore_general_groups to No Login as this teacher Go to "Course 1" Autocreate groups "Group 1" - "Group 5" and don't allocate any students to these groups Make sure you have those Groups in your Course Go to "Course 2" Select the import from "Course 1" Verify that the option Include groups and groupings is checked Perform the import and press Continue Go to your group page and verify that there are Groups in "Course 2" Go to "Course 3" Select the import from "Course 1" Verify that the option Include groups and groupings is not  checked Perform the import and press Continue Go to your group page and verify that there are no  Groups in "Course 3" Case 2:  restore | restore_general_groups enabled Login as admin again and set the value restore | restore_general_groups to Yes Repeat Case 1: #3 - #16  
    • Affected Branches:
      MOODLE_37_STABLE
    • Pull from Repository:
    • Pull 3.7 Branch:
    • Pull Master Branch:
      MDL-65724-master

      Description

      Hi there,

      due to a support issue from one of our clients, we've encountered this issue.

      Problem
      Within the import dialogue you can decide for some aspects like activities, groups or blocks etc. to be included in the import or not. Unfortunately, even if a user enables, for example, the group and groupings option, the groups and groupings will not be included in the restore controller if the default restore setting restore | restore_general_groups is disabled.

      Steps to reproduce
      We use the option for groups and groupings exemplarily. The behavior is identical for all import options.

      1. Login as admin
      2. Set the value restore | restore_general_groups to No
      3. Create three Courses: "Course 1", "Course 2" and "Course 3" and enrol a teacher to those courses
      4. Login as this teacher
      5. Go to "Course 1"
      6. Autocreate groups "Group 1" - "Group 5" and don't allocate any students to these groups
      7. Make sure you have those Groups in your Course
      8. Go to "Course 2"
      9. Select the import from "Course 1"
      10. Verify that the option Include groups and groupings is checked
      11. Perform the import and press Continue
      12. Go to your group page and verify that there are no Groups in "Course 2" and so no import of the groups was performed
      13. To counter check, login as admin again and set the value restore | restore_general_groups to Yes
      14. Login as the teacher and go to "Course 3"
      15. Repeat the steps 9 - 11
      16. Go to your group page and verify that the 5 groups from "Course 1" are imported

      Possible cause
      The import function doesn't has any interactive UI to control the options for the restore process. In fact, they are not needed as the user declared his wish within the import UI. So Moodle should only use the created backup file and restore this independent from any default values. However, within the restore_controller.class the defaults will be applied: https://github.com/moodle/moodle/blob/master/backup/controller/restore_controller.class.php#L146

      We think this is the same problem as it was reported and fixed with the recycle bin (MDL-63263, MDL-65218) and it's a regression from introducing the general restore default values (MDL-34859).

      Intended behavior
      First of all, Moodle should present all the settings that are selectable on the general restore default value page. Currently only a small subset is presented on the UI for the import. Then a backup should be created and without any changes due to default settings this backup file should be restored to the new course.

      Best, Kathrin

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 10 minutes
                  2h 10m