-
Bug
-
Resolution: Fixed
-
Minor
-
2.5.1
-
MOODLE_25_STABLE
-
MOODLE_24_STABLE, MOODLE_25_STABLE
-
wip-mdl-41590
-
-
BACKEND Sprint 4
Using the Meta course sync enrolment method, if a parent course is deleted, the enrolments in the child course remain, but are disabled and roles are removed (under default settings).
The problem is that, even when the enrolment is disabled, when the list of enrolments is shown it attempts to include the name of the (now deleted) parent course, and fails, resulting in an error...
Notice: Trying to get property of non-object in D:\xampp\htdocs\master_integration\lib\moodlelib.php on line 9487
|
This error also appears on the page showing the enrolment methods (Course admin > Users > Enrolment methods).
There should probably be a check in both places before including the name of the parent course.
There is no way to link the child course to another course without deleting the Meta course sync enrolment method and then adding it again.
Replication steps:
- Log in as admin
- Enable the Meta course sync enrolment plugin at Site admin > Plugins > Enrolment > Manage enrol plugins
- Create a new course with no enrolments
- Enable Meta course sync enrolments for the course at Course admin > Users > Enrolment methods
- Link the course to a parent (meta) course with users already enrolled
- Check the list of enrolments in the child course at Site admin > Users > Enrolled users
- Delete the parent course at Site admin > Courses > Add/edit courses > (category)
- Check the list of enrolments in the child course again
- Check the enabled enrolment methods at Course admin > Users > Enrolment methods
Expected result: Details of the recently delete parent course will not be shown
Actual result: No details are shown, but the page tries to show the name of the parent course and ends up producing an error.
- Testing discovered
-
MDL-41413 Replace enrol_meta event handlers with event observers
- Closed