mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-37085 Properly deprecated functions print_xxx() from course/lib.php
- get_print_section_cm_text() - print_section_add_menus() - print_section() - make_editing_buttons()
This commit is contained in:
parent
c58a25d6eb
commit
9a36be7361
10 changed files with 178 additions and 115 deletions
|
@ -60,6 +60,7 @@ class block_site_main_menu extends block_list {
|
|||
}
|
||||
|
||||
/// slow & hacky editing mode
|
||||
$courserenderer = $this->page->get_renderer('core', 'course');
|
||||
$ismoving = ismoving($course->id);
|
||||
course_create_sections_if_missing($course, 0);
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
|
@ -87,7 +88,10 @@ class block_site_main_menu extends block_list {
|
|||
continue;
|
||||
}
|
||||
if (!$ismoving) {
|
||||
$editbuttons = '<div class="buttons">'.make_editing_buttons($mod, true, true).'</div>';
|
||||
$actions = course_get_cm_edit_actions($mod, -1);
|
||||
$editbuttons = html_writer::tag('div',
|
||||
$courserenderer->course_section_cm_edit_actions($actions),
|
||||
array('class' => 'buttons'));
|
||||
} else {
|
||||
$editbuttons = '';
|
||||
}
|
||||
|
@ -123,7 +127,6 @@ class block_site_main_menu extends block_list {
|
|||
$this->content->icons[] = '';
|
||||
}
|
||||
|
||||
$courserenderer = $this->page->get_renderer('core', 'course');
|
||||
$this->content->footer = $courserenderer->course_section_add_cm_control($course,
|
||||
0, null, array('inblock' => true));
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ class block_social_activities extends block_list {
|
|||
|
||||
|
||||
/// slow & hacky editing mode
|
||||
$courserenderer = $this->page->get_renderer('core', 'course');
|
||||
$ismoving = ismoving($course->id);
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$section = $modinfo->get_section_info(0);
|
||||
|
@ -89,7 +90,9 @@ class block_social_activities extends block_list {
|
|||
continue;
|
||||
}
|
||||
if (!$ismoving) {
|
||||
$editbuttons = '<br />'.make_editing_buttons($mod, true, true);
|
||||
$actions = course_get_cm_edit_actions($mod, -1);
|
||||
$editbuttons = '<br />'.
|
||||
$courserenderer->course_section_cm_edit_actions($actions);
|
||||
} else {
|
||||
$editbuttons = '';
|
||||
}
|
||||
|
@ -126,7 +129,6 @@ class block_social_activities extends block_list {
|
|||
$this->content->icons[] = '';
|
||||
}
|
||||
|
||||
$courserenderer = $this->page->get_renderer('core', 'course');
|
||||
$this->content->footer = $courserenderer->course_section_add_cm_control($course,
|
||||
0, null, array('inblock' => true));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue