Affects Version/s: 2.4.5
Fixed Branches:MOODLE_24_STABLE, MOODLE_25_STABLE
Pull from Repository:
Pull Master Branch:master_
Pull Master Diff URL:
set up flatfile enrolment.
Find the idnumber of a deleted user.
create an entry in the flatfile enrolment that enrols that deleted user in a course.
run cron and make sure it doesn't cause a fatal error.
we're seeing this error in cron on one of our sites causing cron to completely fail:
!!! Coding error detected, it must be fixed by a programmer: User ID does not exist or is deleted! !!!
Error code: codingerror !!
!! Stack trace: * line 1623 of /lib/accesslib.php: coding_exception thrown
- line 1311 of /lib/enrollib.php: call to role_assign()
- line 243 of /enrol/flatfile/lib.php: call to enrol_plugin->enrol_user()
- line 144 of /enrol/flatfile/lib.php: call to enrol_flatfile_plugin->process_records()
- line 54 of /enrol/flatfile/lib.php: call to enrol_flatfile_plugin->process_file()
- line 243 of /lib/cronlib.php: call to enrol_flatfile_plugin->cron()
- line 88 of /admin/cron.php: call to cron_run()
flatfile shouldn't try to handle users that have been deleted.