mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
accesslib: MDL-17626 delete_course_module should call delete_context.
This commit is contained in:
parent
d1be90991b
commit
06b3a6b297
1 changed files with 2 additions and 1 deletions
|
@ -2619,8 +2619,9 @@ function delete_course_module($id) {
|
|||
foreach ($grade_items as $grade_item) {
|
||||
$grade_item->delete('moddelete');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
delete_context(CONTEXT_MODULE, $cm->id);
|
||||
return $DB->delete_records('course_modules', array('id'=>$cm->id));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue