From: moodler Date: Sun, 3 Sep 2006 08:46:30 +0000 (+0000) Subject: Removed student view X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4d2401d5248bf57c8aeea4d1090167e51855ebdc;p=moodle.git Removed student view --- diff --git a/course/view.php b/course/view.php index db0458cdc9..e28746000e 100644 --- a/course/view.php +++ b/course/view.php @@ -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); } @@ -65,15 +64,6 @@ $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; @@ -85,11 +75,6 @@ } } - if (($studentview == 1) and confirm_sesskey()) { - $USER->studentview = true; - $USER->editing = 0; - } - if ($hide && confirm_sesskey()) { set_section_visible($course->id, $hide, '0'); } diff --git a/lib/pagelib.php b/lib/pagelib.php index 818756d1d2..669724dd59 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -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 : ' '; print_header($title, $this->courserecord->fullname, $crumbtext,