MDL-24419 Fix bug with section creation for new courses

This commit is contained in:
sam marshall 2012-05-17 13:37:33 +01:00
parent ce4dfd2703
commit 52f1406101
2 changed files with 7 additions and 0 deletions

View file

@ -2751,8 +2751,10 @@ function get_course_section($section, $courseid) {
$cw->summaryformat = FORMAT_HTML;
$cw->sequence = "";
$id = $DB->insert_record("course_sections", $cw);
rebuild_course_cache($courseid, true);
return $DB->get_record("course_sections", array("id"=>$id));
}
/**
* Given a full mod object with section and course already defined, adds this module to that section.
*