MDL-76985 course: Redirect to moved section

This commit is contained in:
Stefan Hanauska 2023-01-25 08:58:53 +01:00
parent 8de12b7997
commit 928633a33e

View File

@ -194,7 +194,11 @@
if ($course->id == SITEID) {
redirect($CFG->wwwroot . '/?redirect=0');
} else {
redirect(course_get_url($course));
if ($format->get_course_display() == COURSE_DISPLAY_MULTIPAGE) {
redirect(course_get_url($course));
} else {
redirect(course_get_url($course, $destsection));
}
}
} else {
echo $OUTPUT->notification('An error occurred while moving a section');