Permalink
Browse files

Revert "MDL-32184 - Course - Fixing incorrect redirect when toggling …

…course edit while inside an activity -- Patch provided by Kanika Goyal"

This reverts commit a1db00d.
  • Loading branch information...
1 parent 20a1f8a commit 12f9c36df8ca11a5aa53672442b71cc76c47814d @danpoltawski danpoltawski committed Sep 27, 2012
Showing with 1 addition and 4 deletions.
  1. +0 −3 course/view.php
  2. +1 −1 lib/navigationlib.php
View
3 course/view.php
@@ -20,7 +20,6 @@
$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)) {
@@ -153,8 +152,6 @@
// 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);
}
View
2 lib/navigationlib.php
@@ -3561,7 +3561,7 @@ protected function load_course_settings($forceopen = false) {
$baseurl->param('sesskey', sesskey());
} else {
// Edit on the main course page.
- $baseurl = new moodle_url('/course/view.php', array('id'=>$course->id, 'return'=>$this->page->url->out_as_local_url(false), 'sesskey'=>sesskey()));
+ $baseurl = new moodle_url('/course/view.php', array('id'=>$course->id, 'sesskey'=>sesskey()));
}
$editurl = clone($baseurl);

0 comments on commit 12f9c36

Please sign in to comment.