mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-32184 - Course - Fixing incorrect redirect when toggling course edit while inside an activity -- Patch provided by Kanika Goyal
This commit is contained in:
parent
c366bea3cf
commit
a1db00dd1a
2 changed files with 4 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
|||
$marker = optional_param('marker',-1 , PARAM_INT);
|
||||
$switchrole = optional_param('switchrole',-1, PARAM_INT);
|
||||
$modchooser = optional_param('modchooser', -1, PARAM_BOOL);
|
||||
$return = optional_param('return', 0, PARAM_LOCALURL);
|
||||
|
||||
$params = array();
|
||||
if (!empty($name)) {
|
||||
|
@ -152,6 +153,8 @@
|
|||
// Redirect to site root if Editing is toggled on frontpage
|
||||
if ($course->id == SITEID) {
|
||||
redirect($CFG->wwwroot .'/?redirect=0');
|
||||
} else if (!empty($return)) {
|
||||
redirect($CFG->wwwroot . $return);
|
||||
} else {
|
||||
redirect($PAGE->url);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue