-
Bug
-
Resolution: Deferred
-
Minor
-
None
-
3.6.2
We have seen a few sites with databases in a weird state that prevents users from deleting their courses. All of them have a grade item that stops deletion. While we are not yet sure how the databases get in this weird state, it seems to me that busted grade_items preventing a course from being deleted in of itself might be considered a bug.
To reproduce on a fresh install:
- Create a course and add a scorm activity
- Delete the record that shows up in the mdl_scorm table
- Browse to "Site administration" > "Courses" > "Manage courses and categories"
- Attempt to delete the course you just made
- You should see an invalid module id error
This happens because the get_context method in grade_item.php makes a call to get_fast_modinfo without doing any checks to see if the instances array contains the key it is searching for:
$cm = get_fast_modinfo($this->courseid)->instances[$this->itemmodule][$this->iteminstance];
|
- duplicates
-
MDL-64878 Undefined index: assign in /lib/grade/grade_item.php on line 2498 when deleting course or submitting quiz
-
- Closed
-
- has a non-specific relationship to
-
MDLSITE-5680 Delete Learn Moodle 3.6 practice courses
-
- Resolved
-