From: tjhunt Date: Fri, 9 Jan 2009 05:32:08 +0000 (+0000) Subject: accesslib: MDL-17626 delete_course_module should call delete_context. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=06b3a6b297f9fa77a1ab459695066ef18fe8ab18;p=moodle.git accesslib: MDL-17626 delete_course_module should call delete_context. --- diff --git a/course/lib.php b/course/lib.php index 4849a53532..905613b8b0 100644 --- a/course/lib.php +++ b/course/lib.php @@ -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)); }