mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-32508 course: Introduce course_get_url()
This commit is contained in:
parent
45774bddf7
commit
5218b9bb7d
4 changed files with 36 additions and 15 deletions
|
@ -47,7 +47,7 @@ $mform->set_data($section); // set current value
|
|||
|
||||
/// If data submitted, then process and store.
|
||||
if ($mform->is_cancelled()){
|
||||
redirect($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
redirect(course_get_url($course, $section->section));
|
||||
|
||||
} else if ($data = $mform->get_data()) {
|
||||
if (empty($data->usedefaultname)) {
|
||||
|
@ -61,7 +61,7 @@ if ($mform->is_cancelled()){
|
|||
$DB->update_record('course_sections', $section);
|
||||
add_to_log($course->id, "course", "editsection", "editsection.php?id=$section->id", "$section->section");
|
||||
$PAGE->navigation->clear_cache();
|
||||
redirect("view.php?id=$course->id");
|
||||
redirect(course_get_url($course, $section->section));
|
||||
}
|
||||
|
||||
$sectionname = get_section_name($course, $section);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue