-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.4, 4.1.5, 4.4
-
MOODLE_401_STABLE, MOODLE_404_STABLE
Error
When you unenrol a user from a course with an assignment in it, you get an error modal.
Stack trace:
SyntaxError: Unexpected token 'T', "The instan"... is not valid JSON
at parse (<anonymous>)
at https://clean.m41.dev4.3072.ru/lib/javascript.php/1693468035/lib/jquery/jquery-3.6.1.min.js:2:79614
at l (https://clean.m41.dev4.3072.ru/lib/javascript.php/1693468035/lib/jquery/jquery-3.6.1.min.js:2:79731)
at XMLHttpRequest.<anonymous> (https://clean.m41.dev4.3072.ru/lib/javascript.php/1693468035/lib/jquery/jquery-3.6.1.min.js:2:82499)
The problem is in "The instance of this module does not exist" prepending JSON.
The error string id is 'moduleinstancedoesnotexist' in 'core_error'.
mtrace in /lib/grade/grade_item.php line 2588
Steps
- Create a course.
- Add an assignment activity.
- Enroll a user (student).
- Hand in the assignment using the student account (probably optional).
- Grade the assignment (probably optional).
- Disable Assignment activity in "Manage activities".
- Unenrol the student.
We have encountered the same error with another activity (not in the core) in another Moodle site. The same problem is probably relevant to other gradeable activities as well.
- has been marked as being related by
-
MDL-77924 Deleting a course with an activity plugin disabled results in exception
-
- Reopened
-