mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-32508 course: Add basic 'add a section' button at the bottom of the course page
With thanks to LUNS who provided this code from when I did it working there.
This commit is contained in:
parent
1804b7c1bc
commit
1abf12532d
3 changed files with 49 additions and 0 deletions
|
@ -507,8 +507,19 @@ abstract class format_renderer_base extends plugin_renderer_base {
|
|||
print_section($course, $thissection, $mods, $modnamesused);
|
||||
echo $this->stealth_section_footer();
|
||||
}
|
||||
|
||||
$straddsection = get_string('addanadditionalsection', 'moodle');
|
||||
echo html_writer::start_tag('div', array('class' => 'mdl-align'));
|
||||
echo $this->output->action_link(
|
||||
new moodle_url('/course/addsection.php',
|
||||
array('courseid' => $course->id, 'sesskey' => sesskey())
|
||||
), $this->output->pix_icon('t/add', $straddsection).$straddsection, null,
|
||||
array('class' => 'addsectionlink')
|
||||
);
|
||||
echo html_writer::end_tag('div');
|
||||
}
|
||||
|
||||
echo $this->end_section_list();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue