Merge branch 'MDL-54557-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Dan Poltawski 2016-06-06 13:17:13 +01:00
commit 53ee327c69

View File

@ -984,14 +984,14 @@ abstract class format_base {
}
if (!is_object($section)) {
$section = $DB->get_record('course_sections', array('course' => $this->get_courseid(), 'section' => $section),
'id,section,sequence');
'id,section,sequence,summary');
}
if (!$section || !$section->section) {
// Not possible to delete 0-section.
return false;
}
if (!$forcedeleteifnotempty && !empty($section->sequence)) {
if (!$forcedeleteifnotempty && (!empty($section->sequence) || !empty($section->summary))) {
return false;
}