-
Bug
-
Resolution: Fixed
-
Major
-
4.1.5, 4.1.6, 4.2.3, 4.3
Hello,
To describe the issue, I will use 'course1' and 'course2'.
Course1 is set for whatever enrollment, while course2 has a meta enrollment from course1. In the settings, it points to 'group2'.
When we delete 'group2', the 'customint2' field in the mdl_enrol table is not modified.
If we add a user to course1, the task will attempt to add them to the previously deleted group, resulting in the following error:
Execute scheduled task: Meta Enrollment Synchronization (enrol_meta\task\enrol_meta_sync)
... started 16:37:31. Current memory use 14.0 MB.
Debugging increased temporarily due to faildelay of 86400
... used 3749 dbqueries
... used 13.196567058563 seconds
Scheduled task failed: Meta Enrollment Synchronization (enrol_meta\task\enrol_meta_sync), Unable to find the data record in the groups table of the database.
Debug info:
SELECT * FROM {groups} WHERE id = ?
[array (
0 => '190598',
)]
Backtrace:line 1630 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 64 of /group/lib.php: call to moodle_database->get_record()
line 350 of /enrol/meta/locallib.php: call to groups_add_member()
line 55 of /enrol/meta/classes/task/enrol_meta_sync.php: call to enrol_meta_sync()
line 263 of /lib/cronlib.php: call to enrol_meta\task\enrol_meta_sync->execute()
line 167 of /admin/cli/scheduled_task.php: call to cron_run_inner_scheduled_task()
Events are set up to listen for user_enrolment_created and role_assigned, but in some cases, the enrollment goes through the task instead of the events, possibly in cases of circular dependencies
- has been marked as being related by
-
MDL-80169 PR only: MDL-79692 - The task 'enrol_meta_sync' is in error when a group is deleted
-
- Closed
-