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

Import: Disabled general restore default values override import settings

    XMLWordPrintable

Details

    • MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MDL-65724-master-3
    • Hide

      Unit tests provided.

      Prerequisites:

      1. Create 3 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 (Site administration > Courses > Backups > General restore defaults) AND Locked to No
      3. Login as this teacher
      4. Go to "Course 1"
      5. Autocreate 5 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. Set the option Include groups and groupings to 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. Set the option Include groups and groupings to 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
      2. Set the value restore | restore_general_groups to Yes (Site administration > Courses > Backups > General restore defaults)
      3. Repeat Case 1: #3 - #16

      Case 3: restore | restore_general_groups disabled AND Locked | True

      1. Login as admin
      2. Set the value restore | restore_general_groups to No (Site administration > Courses > Backups > General restore defaults) AND Locked to True
      3.  Repeat Case 1: #3-#10
      4. Confirm the groups are not imported
      5. Repeat Case 1: #12-#16

      Case 4: restore | restore_general_groups enabled AND Locked | True

      1. Login as admin
      2. Set the value restore | restore_general_groups to Yes (Site administration > Courses > Backups > General restore defaults) AND Locked to True
      3.  Repeat Case 1: #3-#16
      Show
      Unit tests provided. Prerequisites: Create 3 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 (Site administration > Courses > Backups > General restore defaults) AND Locked  to  No Login as this teacher Go to "Course 1" Autocreate 5 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" Set the option Include groups and groupings to 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" Set the option Include groups and groupings to 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 Set the value restore | restore_general_groups to Yes  (Site administration > Courses > Backups > General restore defaults) Repeat Case 1: #3 - #16 Case 3: restore | restore_general_groups disabled AND Locked | True Login as admin Set the value restore | restore_general_groups to No (Site administration > Courses > Backups > General restore defaults) AND Locked  to  True  Repeat Case 1: #3-#10 Confirm the groups are not imported Repeat Case 1: #12-#16 Case 4: restore | restore_general_groups enabled AND Locked | True Login as admin Set the value restore | restore_general_groups to Yes (Site administration > Courses > Backups > General restore defaults) AND Locked  to  True  Repeat Case 1: #3-#16
    • 3
    • Activity Sprint 7, Activity Sprint 8

    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

              peterdias Peter Dias
              kosswa Kathrin Osswald
              Mihail Geshoski Mihail Geshoski
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Janelle Barcega Janelle Barcega
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 2 hours, 51 minutes
                  1d 2h 51m

                  Clockify

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