mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Bug #MDL-10632, fixing the use of 'delete_event'.
This commit is contained in:
parent
9ba38673fa
commit
0ea0369669
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user