mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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:
parent
9796014660
commit
4ede27b253
9 changed files with 76 additions and 45 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue