Merge branch 'MDL-33369-master' of git://github.com/ankitagarwal/moodle with changes
[moodle.git] / course / view.php
index 182cb3c..2d4d347 100644 (file)
@@ -36,7 +36,7 @@
 
     $urlparams = array('id' => $course->id);
 
-    //Sectionid should get priority over section number
+    // Sectionid should get priority over section number
     if ($sectionid) {
         $section = $DB->get_field('course_sections', 'section', array('id' => $sectionid, 'course' => $course->id), MUST_EXIST);
     }
             if ($course->id == SITEID) {
                 redirect($CFG->wwwroot .'/?redirect=0');
             } else {
-                redirect($PAGE->url);
+                $url = new moodle_url($PAGE->url, array('editingenabled' => 1));
+                redirect($url);
             }
         } else if (($edit == 0) and confirm_sesskey()) {
             $USER->editing = 0;