$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);
//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');
}
// 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,