mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +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
|
@ -608,6 +608,7 @@ function create_course ($course,$skip_fix_course_sortorder=0){
|
|||
$section = new object();
|
||||
$section->course = $newcourseid; // Create a default section.
|
||||
$section->section = 0;
|
||||
$section->summaryformat = FORMAT_HTML;
|
||||
$section->id = $DB->insert_record("course_sections", $section);
|
||||
$course = $DB->get_record('course', array('id' => $newcourseid));
|
||||
blocks_add_default_course_blocks($course);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue