Skip to content

Commit

Permalink
MDL-54557 course: treat section summary as contents
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Jun 2, 2016
1 parent eba73c8 commit 847e73e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions course/format/lib.php
Original file line number Diff line number Diff line change
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 847e73e

Please sign in to comment.