Bug #MDL-10632, fixing the use of 'delete_event'.

This commit is contained in:
mchurch 2007-07-27 18:39:54 +00:00
parent 9ba38673fa
commit 0ea0369669

View File

@ -2082,7 +2082,7 @@ function delete_course_module($id) {
$modulename = get_field('modules', 'name', 'id', $cm->module);
if ($events = get_records_select('event', "instance = '$cm->instance' AND modulename = '$modulename'")) {
foreach($events as $event) {
delete_event($event);
delete_event($event->id);
}
}
return delete_records('course_modules', 'id', $cm->id);