-
Bug
-
Resolution: Fixed
-
Minor
-
3.7, 3.8.2, 3.9
-
MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
MDL-65724-master-3 -
-
3
-
Activity Sprint 7, Activity Sprint 8
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.
- Login as admin
- Set the value restore | restore_general_groups to No
- Create three Courses: "Course 1", "Course 2" and "Course 3" and enrol a teacher to those courses
- 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 no Groups in "Course 2" and so no import of the groups was performed
- To counter check, login as admin again and set the value restore | restore_general_groups to Yes
- Login as the teacher and go to "Course 3"
- Repeat the steps 9 - 11
- 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
- is a regression caused by
-
MDL-34859 General Restore Defaults
- Closed