MDL-54751 core_course: Edit course libs to support deletion flag

Changed the course libs such that module and section deletion is now
handed off to relevant functions in the util class and exempted
modules scheduled for deletion from the course backups.
This commit is contained in:
Jake Dallimore
2016-11-07 07:41:59 +08:00
parent 37da62f360
commit 3869d77411
6 changed files with 244 additions and 16 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ if ($deletesection) {
if (course_can_delete_section($course, $sectioninfo)) {
$confirm = optional_param('confirm', false, PARAM_BOOL) && confirm_sesskey();
if ($confirm) {
course_delete_section($course, $sectioninfo, true);
course_delete_section($course, $sectioninfo, true, true);
$courseurl = course_get_url($course, 0, array('sr' => $sectionreturn));
redirect($courseurl);
} else {