mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-22729 Course sections can be re-edited again
By the way, the current style of creating course_sections is ugly. We should probably have something like make_sure_that_at_least_default_section_exists($courseid, $sectionid=null) and not to insert it into database at many places as we do now.
This commit is contained in:
parent
33b1a40639
commit
09eb215121
8 changed files with 17 additions and 14 deletions
|
@ -229,6 +229,7 @@
|
|||
$section->course = $course->id; // Create a default section.
|
||||
$section->section = 0;
|
||||
$section->visible = 1;
|
||||
$section->summaryformat = FORMAT_HTML;
|
||||
$section->id = $DB->insert_record('course_sections', $section);
|
||||
}
|
||||
if (! $sections = get_all_sections($course->id) ) { // Try again
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue