mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-46663 gradereport_grader: Remove fixed column support
This issue is a part of the MDL-46658 Task. This issue is a part of the MDL-25544 Epic.
This commit is contained in:
parent
99b119c166
commit
8c037a917b
@ -722,7 +722,6 @@ class grade_report_grader extends grade_report {
|
||||
$arrows = $this->get_sort_arrows();
|
||||
|
||||
$jsarguments = array(
|
||||
'id' => '#fixed_column',
|
||||
'cfg' => array('ajaxenabled'=>false),
|
||||
'items' => array(),
|
||||
'users' => array(),
|
||||
@ -1117,25 +1116,11 @@ class grade_report_grader extends grade_report {
|
||||
*/
|
||||
public function get_grade_table($displayaverages = false) {
|
||||
global $OUTPUT;
|
||||
$fixedstudents = $this->is_fixed_students();
|
||||
|
||||
$leftrows = $this->get_left_rows($displayaverages);
|
||||
$rightrows = $this->get_right_rows($displayaverages);
|
||||
|
||||
$html = '';
|
||||
|
||||
if ($fixedstudents) {
|
||||
$fixedcolumntable = new html_table();
|
||||
$fixedcolumntable->id = 'fixed_column';
|
||||
$fixedcolumntable->data = $leftrows;
|
||||
$html .= $OUTPUT->container(html_writer::table($fixedcolumntable), 'left_scroller');
|
||||
|
||||
$righttable = new html_table();
|
||||
$righttable->id = 'user-grades';
|
||||
$righttable->data = $rightrows;
|
||||
|
||||
$html .= $OUTPUT->container(html_writer::table($righttable), 'right_scroller');
|
||||
} else {
|
||||
$fulltable = new html_table();
|
||||
$fulltable->attributes['class'] = 'table table-bordered table-striped table-condensed';
|
||||
$fulltable->id = 'user-grades';
|
||||
@ -1146,7 +1131,6 @@ class grade_report_grader extends grade_report {
|
||||
$fulltable->data[] = $row;
|
||||
}
|
||||
$html .= html_writer::table($fulltable);
|
||||
}
|
||||
return $OUTPUT->container($html, 'gradeparent');
|
||||
}
|
||||
|
||||
@ -1742,18 +1726,6 @@ class grade_report_grader extends grade_report {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not to display fixed students column.
|
||||
* Includes a browser check, because IE6 doesn't support the scrollbar.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_fixed_students() {
|
||||
global $CFG;
|
||||
|
||||
return $CFG->grade_report_fixedstudents;
|
||||
}
|
||||
|
||||
/**
|
||||
* Refactored function for generating HTML of sorting links with matching arrows.
|
||||
* Returns an array with 'studentname' and 'idnumber' as keys, with HTML ready
|
||||
|
@ -44,9 +44,6 @@ if ($ADMIN->fulltree) {
|
||||
$settings->add(new admin_setting_configcheckbox('grade_report_showquickfeedback', get_string('quickfeedback', 'grades'),
|
||||
get_string('showquickfeedback_help', 'grades'), 0));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('grade_report_fixedstudents', get_string('fixedstudents', 'grades'),
|
||||
get_string('fixedstudents_help', 'grades'), 0));
|
||||
|
||||
$settings->add(new admin_setting_configselect('grade_report_meanselection', get_string('meanselection', 'grades'),
|
||||
get_string('meanselection_help', 'grades'), GRADE_REPORT_MEAN_GRADED,
|
||||
array(GRADE_REPORT_MEAN_ALL => get_string('meanall', 'grades'),
|
||||
|
@ -212,8 +212,6 @@ $string['feedbacksaved'] = 'Feedback saved';
|
||||
$string['feedbackview'] = 'View feedback';
|
||||
$string['finalgrade'] = 'Final grade';
|
||||
$string['finalgrade_help'] = 'If the overridden checkbox is ticked, a grade may be added or amended.';
|
||||
$string['fixedstudents'] = 'Static students column';
|
||||
$string['fixedstudents_help'] = 'Allows grades to scroll horizontally without losing sight of the students column, by making it static.';
|
||||
$string['forceoff'] = 'Force: Off';
|
||||
$string['forceon'] = 'Force: On';
|
||||
$string['forelementtypes'] = 'for the selected {$a}';
|
||||
|
Loading…
x
Reference in New Issue
Block a user