mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
Merge branch 'MDL-54557-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
53ee327c69
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user