Affects Version/s: 2.0
Fix Version/s: None
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;