Skip to content

Commit

Permalink
Merge branch 'MDL-54557-31' of git://github.com/marinaglancy/moodle i…
Browse files Browse the repository at this point in the history
…nto MOODLE_31_STABLE
  • Loading branch information
danpoltawski committed Jun 6, 2016
2 parents 1b6d059 + 32e7905 commit 5bb6def
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions course/format/lib.php
Expand Up @@ -984,14 +984,14 @@ public function delete_section($section, $forcedeleteifnotempty = false) {
}
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;
}

Expand Down

0 comments on commit 5bb6def

Please sign in to comment.