accesslib: MDL-17626 admin/modules.php should call delete_context when a module is uninstalled.

This commit is contained in:
tjhunt
2009-01-09 05:34:54 +00:00
parent 83b238f9b8
commit 2a538623e4
+7
View File
@@ -123,6 +123,13 @@
if (!delete_records("course_modules", "module", $module->id)) {
notify("Error occurred while deleting all $strmodulename records in course_modules table");
}
if ($coursemods) {
foreach ($coursemods as $coursemod) {
if (!delete_context(CONTEXT_MODULE, $coursemod->id)) {
notify("Could not delete the context for $strmodulename with id = $coursemod->id");
}
}
}
// Then delete all the logs
if (!delete_records("log", "module", $module->name)) {