]> git.mjollnir.org Git - moodle.git/commitdiff
Removed student view
authormoodler <moodler>
Sun, 3 Sep 2006 08:46:30 +0000 (08:46 +0000)
committermoodler <moodler>
Sun, 3 Sep 2006 08:46:30 +0000 (08:46 +0000)
course/view.php
lib/pagelib.php

index db0458cdc90565a768960edc9877757fad8c3b03..e28746000e2d375495aab0f7d42838bee2b6d8d5 100644 (file)
@@ -12,7 +12,6 @@
     $hide        = optional_param('hide', 0, PARAM_INT);
     $show        = optional_param('show', 0, PARAM_INT);
     $idnumber    = optional_param('idnumber', '', PARAM_RAW);
-    $studentview = optional_param('studentview', -1, PARAM_BOOL);
     $section     = optional_param('section', 0, PARAM_INT);
     $move        = optional_param('move', 0, PARAM_INT);
     $marker      = optional_param('marker',-1 , PARAM_INT);
@@ -42,7 +41,7 @@
     //url with appropriate authentication attached as parameter 
     if (file_exists($CFG->dirroot .'/course/externservercourse.php')) {
         include $CFG->dirroot .'/course/externservercourse.php';
-        if (function_exists(extern_server_course)) {
+        if (function_exists('extern_server_course')) {
             if ($extern_url = extern_server_course($course)) {
                 redirect($extern_url);
             }
         $USER->editing = 0;
     }
 
-    if (!isset($USER->studentview)) {
-        $USER->studentview = false;
-    }
-
-    // need to check this here, as studentview=on disables edit allowed (where 'on' is checked)
-    if (($studentview == 0) and confirm_sesskey()) {
-        $USER->studentview = false;
-    }
-
     if ($PAGE->user_allowed_editing()) {
         if (($edit == 1) and confirm_sesskey()) {
             $USER->editing = 1;
             }
         }
 
-        if (($studentview == 1) and confirm_sesskey()) {
-            $USER->studentview = true;
-            $USER->editing = 0;
-        }
-
         if ($hide && confirm_sesskey()) {
             set_section_visible($course->id, $hide, '0');
         }
index 818756d1d240269fb3b58296a85236ccde97afe7..669724dd596ba4860e1c62d47a72e976de124884 100644 (file)
@@ -407,7 +407,7 @@ class page_course extends page_base {
 
         // The "Editing On" button will be appearing only in the "main" course screen
         // (i.e., no breadcrumbs other than the default one added inside this function)
-        $buttons = update_course_icon($this->courserecord->id ) . update_studentview_button( $this->courserecord->id );
+        $buttons = update_course_icon($this->courserecord->id );
         $buttons = empty($morebreadcrumbs) ? $buttons : '&nbsp;';
 
         print_header($title, $this->courserecord->fullname, $crumbtext,