// Grade item text inputs
} elseif (preg_match('/(grademax|aggregationcoef|multfactor|plusfactor)_([0-9]*)/', $key, $matches)) {
- $value = required_param($matches[0], PARAM_NUMBER);
+ $defaults = array('grademax' => 100, 'aggregationcoef' => 1, 'multfactor' => 1, 'plusfactor' => 0);
+
+ if (is_string($_POST[$matches[0]]) && strlen($_POST[$matches[0]]) < 1) {
+ $_POST[$matches[0]] = null;
+ }
+ $value = optional_param($matches[0], $defaults[$matches[1]], PARAM_NUMBER);
+
$param = $matches[1];
$a->id = $matches[2];
$grade_item = grade_item::fetch(array('id'=>$a->id, 'courseid'=>$courseid));
global $CFG, $USER;
$this->rowcount = 0;
- $fixedstudents = empty($USER->screenreader) && $this->get_pref('fixedstudents');
+ $fixedstudents = empty($USER->screenreader) && $CFG->grade_report_fixedstudents;
if (!$fixedstudents) {
$strsortasc = $this->get_lang_string('sortasc', 'grades');
$numusers = count($this->users);
$showuserimage = $this->get_pref('showuserimage');
$showuseridnumber = $this->get_pref('showuseridnumber');
- $fixedstudents = empty($USER->screenreader) && $this->get_pref('fixedstudents');
+ $fixedstudents = empty($USER->screenreader) && $CFG->grade_report_fixedstudents;
// Preload scale objects for items with a scaleid
$scales_list = array();
$showuserimage = $this->get_pref('showuserimage');
$showuseridnumber = $this->get_pref('showuseridnumber');
- $fixedstudents = empty($USER->screenreader) && $this->get_pref('fixedstudents');
+ $fixedstudents = empty($USER->screenreader) && $CFG->grade_report_fixedstudents;
$strsortasc = $this->get_lang_string('sortasc', 'grades');
$strsortdesc = $this->get_lang_string('sortdesc', 'grades');
// View capability is the lowest permission. Users with grade:manage or grade:edit must also have grader:view
if (has_capability('gradereport/grader:view', $context)) {
- $preferences['prefgeneral']['fixedstudents'] = $checkbox_default;
$preferences['prefgeneral']['studentsperpage'] = 'text';
$preferences['prefgeneral']['aggregationposition'] = array(GRADE_REPORT_PREFERENCE_DEFAULT => '*default*',
GRADE_REPORT_AGGREGATION_POSITION_FIRST => get_string('positionfirst', 'grades'),
border-style:solid;
}
+
.grade-report-grader table#user-grades tr.heading {
border-width:0px 0px 0px 0px;
border-style:solid;
$string['configdecimalpoints'] = 'Specifies the number of decimal points to display for each grade. This setting may be overridden per grading item.';
$string['configenableajax'] = 'Adds a layer of AJAX functionality to the grader report, simplifying and speeding up common operations. Depends on Javascript being switched on at the user\'s browser level.';
$string['configenableoutcomes'] = 'Support for Outcomes (also known as Competencies, Goals, Standards or Criteria) means that we can grade things using one or more scales that are tied to outcome statements. Enabling outcomes makes such special grading possible throughout the site.';
-$string['configfixedstudents'] = 'Fixes the students column in the grader report, allowing the grades to scroll horizontally.';
+$string['configfixedstudents'] = 'Allows grades to scroll horizontally without losing sight of the students column, by making it static.';
$string['configgradeboundary'] = 'A percentage boundary over which grades will be assigned a grade letter (if the Letter grade display type is used). ';
$string['configgradedisplaytype'] = 'Specifies how to display grades in the grader and user reports. Grades may be shown as actual grades, as percentages (in reference to the minimum and maximum grades) or as letters.';
$string['configgradeexportdisplaytype'] = 'Grades can be shown as real grades, as percentages (in reference to the minimum and maximum grades) or as letters (A, B, C etc..) during export. This can be overridden during export.';
$string['feedbacksaved'] = 'Feedback saved';
$string['finalgrade'] = 'Final grade';
$string['finalgradehelp'] = 'The final grade (cached) after all calculations are performed.';
-$string['fixedstudents'] = 'Fixed students column';
+$string['fixedstudents'] = 'Static students column';
$string['forceoff'] = 'Force: Off';
$string['forceon'] = 'Force: On';
$string['forelementtypes'] = ' for the selected $a';