Skip to content

Commit c4b9e0f

Browse files
committed
Create section method (MDL-80187) WIP 7
1 parent 8c4fbc2 commit c4b9e0f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

classes/courseformat/sectionactions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function create_from_object(stdClass $fields, bool $skipcheck = false): s
7373
'timemodified' => time(),
7474
];
7575
$sectionrecord->id = $DB->insert_record("course_sections", $sectionrecord);
76-
if (!($skipcheck && ($createnum > 0))) {
76+
if (empty($fields->component) && !($skipcheck && ($createnum > 0))) {
7777
$DB->insert_record("course_format_options", [
7878
'courseid' => $this->course->id,
7979
'format' => 'multitopic',

0 commit comments

Comments
 (0)