mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +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
|
@ -61,8 +61,9 @@ class block_site_main_menu extends block_list {
|
|||
|
||||
/// slow & hacky editing mode
|
||||
$ismoving = ismoving($course->id);
|
||||
$section = get_course_section(0, $course->id);
|
||||
course_create_sections_if_missing($course, 0);
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$section = $modinfo->get_section_info(0);
|
||||
|
||||
$groupbuttons = $course->groupmode;
|
||||
$groupbuttonslink = (!$course->groupmodeforce);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue