MDL-33375 course: set anchor after changing sections

So scrolling isn't required
This commit is contained in:
Dan Poltawski 2012-05-28 14:43:30 +08:00
parent 4631e39533
commit 54495fe41d
2 changed files with 4 additions and 2 deletions

View file

@ -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);

View file

@ -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');