-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
2.0
-
None
-
MOODLE_20_STABLE
-
Easy
When deleting a resource from a topic using AJAX, the event mod_deleted is not triggered.
To resolve this bug the following lines can be added to the file [moodle_root]/course/rest.php, within the case 'DELETE' on the bottom of subcase 'resource' just before the add_to_log($courseid, "course", "delete mod", "view.php?id=$courseid", "$cm->modname $cm->instance", $cm->id); line:
// Trigger a mod_deleted event with information about this module.
$eventdata = new stdClass();
$eventdata->modulename = $cm->modname;
$eventdata->cmid = $cm->id;
$eventdata->courseid = $course->id;
$eventdata->userid = $USER->id;
events_trigger('mod_deleted', $eventdata);
Thanks
- will be (partly) resolved by
-
MDL-29112 event mod_deleted is NOT triggered when delete mod through AJAX
-
- Closed
-