Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Duplicate
-
3.1.3
-
None
-
MOODLE_31_STABLE
Description
We tried to delete all users except site admins on Moodle but it threw out some database error. We tried deleting them through bulk users action and upload users via csv with deleted=1, neither of them worked. Here is the stack trace:
Debug info: SELECT id,category FROM
{course} WHERE id IS NULL
[array (
)]
Error code: invalidrecord
×Stack trace:
line 1502 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1478 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 6952 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 1036 of /lib/grade/grade_grade.php: call to core\event\grade_deleted::create_from_grade()
line 1484 of /lib/gradelib.php: call to grade_grade->delete()
line 3951 of /lib/moodlelib.php: call to grade_user_delete()
line 30 of /admin/user/user_bulk_delete.php: call to delete_user()
Attachments
Issue Links
- duplicates
-
MDL-51694 Deleting user causes exception when a grade_grades row has no corresponding grade_items row
-
- Closed
-