mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 23:59:41 +02:00
Merge branch 'MDL-54557-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
53ee327c69
1 changed files with 2 additions and 2 deletions
|
@ -984,14 +984,14 @@ abstract class format_base {
|
||||||
}
|
}
|
||||||
if (!is_object($section)) {
|
if (!is_object($section)) {
|
||||||
$section = $DB->get_record('course_sections', array('course' => $this->get_courseid(), 'section' => $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) {
|
if (!$section || !$section->section) {
|
||||||
// Not possible to delete 0-section.
|
// Not possible to delete 0-section.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$forcedeleteifnotempty && !empty($section->sequence)) {
|
if (!$forcedeleteifnotempty && (!empty($section->sequence) || !empty($section->summary))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue