mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
accesslib: MDL-17626 admin/modules.php should call delete_context when a module is uninstalled.
This commit is contained in:
parent
06b3a6b297
commit
df2e8971ff
@ -120,6 +120,13 @@
|
||||
if (!$DB->delete_records("course_modules", array("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 (!$DB->delete_records("log", array("module"=>$module->name))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user