Skip to content
Permalink
Browse files

Merge branch 'MDL-64891-master' of git://github.com/tobiasreischmann/…

…moodle
  • Loading branch information...
abgreeve committed Mar 6, 2019
2 parents a6a5685 + 852d795 commit d2063ed0a160ea7b3edc1b0e02b719eff601e70d
Showing with 9 additions and 3 deletions.
  1. +4 −0 grade/edit/tree/category_form.php
  2. +2 −0 grade/edit/tree/item_form.php
  3. +3 −3 lang/en/grades.php
@@ -211,13 +211,17 @@ function definition() {
}
$mform->addElement('select', 'grade_item_display', get_string('gradedisplaytype', 'grades'), $options);
$mform->addHelpButton('grade_item_display', 'gradedisplaytype', 'grades');
$mform->disabledIf('grade_item_display', 'grade_item_gradetype', 'in',
array(GRADE_TYPE_TEXT, GRADE_TYPE_NONE));
$default_gradedecimals = grade_get_setting($COURSE->id, 'decimalpoints', $CFG->grade_decimalpoints);
$options = array(-1=>get_string('defaultprev', 'grades', $default_gradedecimals), 0=>0, 1=>1, 2=>2, 3=>3, 4=>4, 5=>5);
$mform->addElement('select', 'grade_item_decimals', get_string('decimalpoints', 'grades'), $options);
$mform->addHelpButton('grade_item_decimals', 'decimalpoints', 'grades');
$mform->setDefault('grade_item_decimals', -1);
$mform->disabledIf('grade_item_decimals', 'grade_item_display', 'eq', GRADE_DISPLAY_TYPE_LETTER);
$mform->disabledIf('grade_item_decimals', 'grade_item_gradetype', 'in',
array(GRADE_TYPE_TEXT, GRADE_TYPE_NONE));
if ($default_gradedisplaytype == GRADE_DISPLAY_TYPE_LETTER) {
$mform->disabledIf('grade_item_decimals', 'grade_item_display', "eq", GRADE_DISPLAY_TYPE_DEFAULT);
@@ -166,6 +166,7 @@ function definition() {
}
$mform->addElement('select', 'display', get_string('gradedisplaytype', 'grades'), $options);
$mform->addHelpButton('display', 'gradedisplaytype', 'grades');
$mform->disabledIf('display', 'gradetype', 'eq', GRADE_TYPE_TEXT);
$default_gradedecimals = grade_get_setting($COURSE->id, 'decimalpoints', $CFG->grade_decimalpoints);
$options = array(-1=>get_string('defaultprev', 'grades', $default_gradedecimals), 0=>0, 1=>1, 2=>2, 3=>3, 4=>4, 5=>5);
@@ -176,6 +177,7 @@ function definition() {
if ($default_gradedisplaytype == GRADE_DISPLAY_TYPE_LETTER) {
$mform->disabledIf('decimals', 'display', "eq", GRADE_DISPLAY_TYPE_DEFAULT);
}
$mform->disabledIf('decimals', 'gradetype', 'eq', GRADE_TYPE_TEXT);
/// hiding
if ($item->cancontrolvisibility) {
@@ -266,9 +266,9 @@
$string['gradedisplaytype'] = 'Grade display type';
$string['gradedisplaytype_help'] = 'This setting determines how grades are displayed in the grader and user reports.
* Real - Actual grades
* Percentage
* Letter - Letters or words are used to represent a range of grades';
* Letter - Letters or words are used to represent a range of grades, as defined in \'Letters\' in the gradebook setup
* Percentage - Relative to maximum and minimum grades
* Real - Actual grades or scale values';
$string['gradedon'] = 'Graded: {$a}';
$string['gradeexport'] = 'Grade export';
$string['gradeexportcolumntype'] = '{$a->name} ({$a->extra})';

0 comments on commit d2063ed

Please sign in to comment.
You can’t perform that action at this time.