MOved deletion of course module

This commit is contained in:
moodler 2005-03-31 08:32:24 +00:00
parent 948cd185cb
commit b14222f906

View File

@ -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");
}