Permalink
Browse files

Merge branch 'wip-MDL-32184-s23' of http://github.com/phalacee/moodle

…into MOODLE_23_STABLE
  • Loading branch information...
2 parents 7e0deaf + a1db00d commit 675c2b85433e34e4621ae6f7eedff0230bf476b7 @danpoltawski danpoltawski committed Sep 24, 2012
Showing with 4 additions and 1 deletion.
  1. +3 −0 course/view.php
  2. +1 −1 lib/navigationlib.php
View
@@ -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);
}
View
@@ -3563,7 +3563,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, 'sesskey'=>sesskey()));
+ $baseurl = new moodle_url('/course/view.php', array('id'=>$course->id, 'return'=>$this->page->url->out_as_local_url(false), 'sesskey'=>sesskey()));
}
$editurl = clone($baseurl);

0 comments on commit 675c2b8

Please sign in to comment.