Skip to content

Commit

Permalink
Revert "MDL-32184 - Course - Fixing incorrect redirect when toggling …
Browse files Browse the repository at this point in the history
…course edit while inside an activity -- Patch provided by Kanika Goyal"

This reverts commit 0a5181a.
  • Loading branch information
danpoltawski committed Sep 27, 2012
1 parent 695dee4 commit 22e8bab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions course/view.php
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/navigationlib.php
Expand Up @@ -3562,7 +3562,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);
Expand Down

0 comments on commit 22e8bab

Please sign in to comment.