mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MOved deletion of course module
This commit is contained in:
parent
948cd185cb
commit
b14222f906
@ -386,12 +386,12 @@
|
||||
|
||||
if (! $instance = get_record($module->name, "id", $cm->instance)) {
|
||||
// Delete this module from the course right away
|
||||
if (! delete_course_module($cm->id)) {
|
||||
notify("Could not delete the $module->name (coursemodule)");
|
||||
}
|
||||
if (! delete_mod_from_section($cm->id, $cm->section)) {
|
||||
notify("Could not delete the $module->name from that section");
|
||||
}
|
||||
if (! delete_course_module($cm->id)) {
|
||||
notify("Could not delete the $module->name (coursemodule)");
|
||||
}
|
||||
error("The required instance of this module didn't exist. Module deleted.",
|
||||
"$CFG->wwwroot/course/view.php?id=$course->id");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user