Revert "MDL-32184 - Course - Fixing incorrect redirect when toggling course edit...
authorDan Poltawski <dan@moodle.com>
Thu, 27 Sep 2012 03:32:02 +0000 (11:32 +0800)
committerDan Poltawski <dan@moodle.com>
Thu, 27 Sep 2012 03:32:02 +0000 (11:32 +0800)
course/view.php
lib/navigationlib.php

index d9d0bdd..cb978d8 100644 (file)
@@ -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)) {
             // 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);
             }
index dcf466a..b24c112 100644 (file)
@@ -3561,7 +3561,7 @@ class settings_navigation extends navigation_node {
                 $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);