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

@ -109,8 +109,8 @@
} else {
if ($editing) {
// make sure section with number 1 exists, this function will create section
get_course_section(1, $SITE->id);
// make sure section with number 1 exists
course_create_sections_if_missing($SITE, 1);
// re-request modinfo in case section was created
$modinfo = get_fast_modinfo($SITE);
}