-
Improvement
-
Resolution: Fixed
-
Major
-
2.4.5, 2.7.3, 2.8.5, 3.2
-
MOODLE_24_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_32_STABLE
-
MOODLE_33_STABLE
-
wip-
MDL-40838-master-2 -
-
3.3 sprint 3
If you have a course with non-default enrollment methods (methods other than manual, self, and guest), upon restoring a backup of that course without users, the restored course only contains the default methods. If you restore the course with users then (some of?) the correct methods are restored with the course.
Steps to reproduce:
1. Create a course and edit the enrollment methods. Remove the default methods (manual, self, and guest). Add non-default methods such as Cohort Sync and Flat File.
2. Make a backup of this course including user data.
3. Restore the backup without user data.
4. In the restored course, go to the enrollment methods and note that the default methods (manual, self, and guest) were added but Cohort and Flat File were not. This is not what users expect; they expect to have Cohort and Flat File.
5. Restore the backup to a new course, this time with user data.
6. In the second restored course, go to the enrollment methods and note that the Cohort method was added to the course (this is expected) and the default methods were not added (this is also expected). Flat file is expected to be there but for some reason it isn't.
This problem just started happening after we applied the fix from this issue: MDL-28394
Prior to that fix, repeating the same steps above would result in #4 and #6 both having the enrollment methods from the backup restored in the course and in neither case were the default methods added.
I understand why the fix in MDL-28394 was made but it seems to need a further tweak so that the enrollment methods existing in the backup are restored even if users are not. Admins and instructors expect the non-default methods to be restored without users the same way they are if users are restored.
- has been marked as being related by
-
MDL-74217 Duplicate course function in course externallib won't allow values other than 0 and 1
- Open
-
MDL-51183 If a course has blocks which have had Guest and/or Authenticated user roles removed, when backed up and restored, the new course retains those removed roles
- Closed
- is a regression caused by
-
MDL-28394 enrol records not created for courses in 2.x on restore from 1.9 backups
- Closed