MDL-35339 deprecate get_course_section() replace with course_create_sections_if_missing()

By passing course object instead of course id we ensure proper cache reset"
This commit is contained in:
Marina Glancy 2012-10-08 10:36:01 +08:00
parent 9796014660
commit 4ede27b253
9 changed files with 76 additions and 45 deletions

View file

@ -243,7 +243,7 @@
echo html_writer::start_tag('div', array('class'=>'course-content'));
// make sure that section 0 exists (this function will create one if it is missing)
$section0 = get_course_section(0, $course->id);
course_create_sections_if_missing($course, 0);
// get information about course modules and existing module types
// format.php in course formats may rely on presence of these variables