$menu[$url] = get_string('edittree', 'grades');
}
+ if (has_capability('moodle/grade:manage', $context)) {
+ $url = 'edit/gradedisplay/index.php?id='.$courseid;
+ if ($active_type == 'edit' and $active_plugin == 'gradedisplay' ) {
+ $active = $url;
+ }
+ $menu[$url] = get_string('gradedisplay', 'grades');
+ }
+
if (has_capability('moodle/course:managescales', $context)) {
$url = 'edit/scale/index.php?id='.$courseid;
if ($active_type == 'edit' and $active_plugin == 'scale' ) {
$stryes = get_string('yes');
$strno = get_string('no');
- $percentages = array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
- GRADE_REPORT_PREFERENCE_UNUSED => get_string('unused', 'grades'));
- for ($i=100; $i > -1; $i--) {
- $percentages[$i] = "$i%";
- }
$checkbox_default = array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default', 0 => $strno, 1 => $stryes);
GRADE_REPORT_AGGREGATION_VIEW_FULL => get_string('fullmode', 'grades'),
GRADE_REPORT_AGGREGATION_VIEW_AGGREGATES_ONLY => get_string('aggregatesonly', 'grades'),
GRADE_REPORT_AGGREGATION_VIEW_GRADES_ONLY => get_string('gradesonly', 'grades')),
- 'gradedisplaytype' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
- GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
- GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
- GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades')),
'meanselection' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
GRADE_REPORT_MEAN_ALL => get_string('meanall', 'grades'),
GRADE_REPORT_MEAN_GRADED => get_string('meangraded', 'grades')));
'showlocks' => $checkbox_default);
$preferences['prefrows'] = array(
- 'averagesdisplaytype' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
- GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
+ 'averagesdisplaytype' => array(GRADE_REPORT_GRADE_DISPLAY_TYPE_DEFAULT => 'default',
GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades')),
- 'rangesdisplaytype' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
- GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
+ 'rangesdisplaytype' => array(GRADE_REPORT_GRADE_DISPLAY_TYPE_DEFAULT => 'default',
GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => get_string('real', 'grades'),
GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => get_string('percentage', 'grades'),
GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => get_string('letter', 'grades')),
'rangesdecimalpoints' => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
GRADE_REPORT_PREFERENCE_INHERIT => $strinherit, 0, 1, 2, 3, 4, 5));
-
- for ($i = 1; $i <= 10; $i++) {
- $preferences['prefletters']['gradeletter' . $i] = 'text';
- $preferences['prefletters']['gradeboundary' . $i] = $percentages;
- }
}
// quickgrading and quickfeedback are conditional on grade:edit capability
$settings->add(new admin_setting_configselect('grade_report_averagesdisplaytype', get_string('averagesdisplaytype', 'grades'),
get_string('configaveragesdisplaytype', 'grades'), false,
- array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
- GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => $strreal,
+ array(GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => $strreal,
GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => $strletter)));
$settings->add(new admin_setting_configselect('grade_report_rangesdisplaytype', get_string('rangesdisplaytype', 'grades'),
get_string('configrangesdisplaytype', 'grades'), false,
- array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
- GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => $strreal,
+ array(GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => $strreal,
GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => $strletter)));
$string['configstudentsperpagedefault'] = 'The number of students to display per page in the grader report. Leave this field empty to use the site default (currently $a).';
$string['contract'] = 'Contract Category';
$string['coursegradecategory'] = 'Course grade category';
+$string['coursegradedisplayupdated'] = 'The course grade display type has been updated.';
$string['coursename'] = 'Course name';
$string['coursetotal'] = 'Course total';
$string['createcategory'] = 'Create Category';
$string['gradecategoryhelp'] = 'Grade Category Help';
$string['gradecategorysettings'] = 'Grade Category Settings';
$string['gradedon'] = 'Graded $a';
+$string['gradedisplay'] = 'Grade display';
$string['gradedisplaytype'] = 'Grade display type';
$string['gradeexceptions'] = 'Grade Exceptions';
$string['gradeexceptionshelp'] = 'Grade Exceptions Help';
$string['outcomestandardhelp'] = 'A Standard outcome is available site-wide, for all courses.';
$string['outcomes'] = 'Outcomes';
$string['overallaverage'] = 'Overall average';
+$string['overridesitedefaultgradedisplaytype'] = 'Override site defaults';
+$string['overridesitedefaultgradedisplaytypehelp'] = 'Tick this checkbox to enable the overriding of the site defaults for the display of grades in the gradebook. This activates form elements allowing you to define the grade letters and boundaries of your choice.';
$string['overridden'] = 'Overridden';
$string['overriddenhelp'] = 'When on, the overridden flag prevents any future attempts to automatically adjust the value of the grade. This flag is often set internally by the gradebook, but can be switched on and off manually using this form element.';
$string['overallavg'] = 'Overall average';
define('GRADE_REPORT_AGGREGATION_VIEW_FULL', 0);
define('GRADE_REPORT_AGGREGATION_VIEW_AGGREGATES_ONLY', 1);
define('GRADE_REPORT_AGGREGATION_VIEW_GRADES_ONLY', 2);
-define('GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL', 0);
-define('GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE', 1);
-define('GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER', 2);
+define('GRADE_REPORT_GRADE_DISPLAY_TYPE_DEFAULT', 0);
+define('GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL', 1);
+define('GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE', 2);
+define('GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER', 3);
define('GRADE_REPORT_PREFERENCE_DEFAULT', 'default');
define('GRADE_REPORT_PREFERENCE_INHERIT', 'inherit');
define('GRADE_REPORT_PREFERENCE_UNUSED', -1);