Skip to content

Commit 70f5923

Browse files
committed
Create section method (MDL-80187) WIP 5
1 parent a134a4e commit 70f5923

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

classes/courseformat/sectionactions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public function create_from_object(stdClass $fields, bool $skipcheck = false): s
8383
// Now move it to the specified position, if necessary.
8484
if (!$skipcheck && !(!empty($fields->component) && property_exists($fields, 'nextid') && $fields->nextid == null)) {
8585
try {
86-
rebuild_course_cache($this->course->id, true);
8786
$movednews = format_multitopic_move_section_to(
8887
$this->course, [$sectionrecord], $fields, !empty($fields->component) ? 2 : 1
8988
);

locallib.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ function format_multitopic_move_section_to(\stdClass $course, $origins, \stdClas
4949
// REMOVED.
5050

5151
// Get all sections for this course and re-order them.
52+
rebuild_course_cache($course->id, true);
5253
if (!$sectionsextra = course_get_format($course)->fmt_get_sections_extra()) { // CHANGED.
5354
throw new \moodle_exception('cannotcreateorfindstructs'); // CHANGED.
5455
}

0 commit comments

Comments
 (0)