]> git.mjollnir.org Git - moodle.git/commitdiff
accesslib: MDL-17626 delete_course_module should call delete_context.
authortjhunt <tjhunt>
Fri, 9 Jan 2009 05:32:08 +0000 (05:32 +0000)
committertjhunt <tjhunt>
Fri, 9 Jan 2009 05:32:08 +0000 (05:32 +0000)
course/lib.php

index 4849a535326386da885f42ce3d3217663877e90a..905613b8b0e1a4e6fc498dc1aab976eabf7baf3e 100644 (file)
@@ -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));
 }