mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-33375 course: set anchor after changing sections
So scrolling isn't required
This commit is contained in:
parent
4631e39533
commit
54495fe41d
2 changed files with 4 additions and 2 deletions
|
@ -53,5 +53,7 @@ if ($course->numsections >= 0) {
|
||||||
$DB->update_record('course', $course);
|
$DB->update_record('course', $course);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$url = course_get_url($course);
|
||||||
|
$url->set_anchor('changenumsections');
|
||||||
// Redirect to where we were..
|
// Redirect to where we were..
|
||||||
redirect(course_get_url($course));
|
redirect($url);
|
||||||
|
|
|
@ -624,7 +624,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
||||||
|
|
||||||
echo $this->end_section_list();
|
echo $this->end_section_list();
|
||||||
|
|
||||||
echo html_writer::start_tag('div', array('class' => 'mdl-right'));
|
echo html_writer::start_tag('div', array('id' => 'changenumsections', 'class' => 'mdl-right'));
|
||||||
|
|
||||||
// Increase number of sections.
|
// Increase number of sections.
|
||||||
$straddsection = get_string('increasesections', 'moodle');
|
$straddsection = get_string('increasesections', 'moodle');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue