Hello all,
I'm trying to delete a large number of users via a csv and the Upload Users function. My csv just has 'username' and 'deleted' and loads fine. I set it to update existing users only and to allow deletes. When I action it I get the following error:
Debug info: SELECT id,category FROM {course} WHERE id IS NULL
[array (
)]
Error code: invalidrecord
Stack trace:
line 1599 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1575 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 6928 of /lib/accesslib.php: call to moodle_database->get_record()
line 70 of /lib/classes/event/grade_deleted.php: call to context_course::instance()
line 1122 of /lib/grade/grade_grade.php: call to core\event\grade_deleted::create_from_grade()
line 1536 of /lib/gradelib.php: call to grade_grade->delete()
line 4242 of /lib/moodlelib.php: call to grade_user_delete()
line 422 of /admin/tool/uploaduser/index.php: call to delete_user()
Thank you,
Nige.