Removed student view
This commit is contained in:
+1
-16
@@ -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');
|
||||
}
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user