Skip to content
Permalink
Browse files

MDL-36712: Assignment grading with custom scale is affected by the cu…

…rrent language
  • Loading branch information...
damyon committed Nov 21, 2012
1 parent 8068fcb commit 56672cb7b4cf774cea310cdecf882350a37c2a43
Showing with 5 additions and 0 deletions.
  1. +5 −0 mod/assign/locallib.php
@@ -3885,6 +3885,11 @@ public function add_grade_form_elements(MoodleQuickForm $mform, stdClass $data,
$grademenu = make_grades_menu($this->get_instance()->grade);
if (count($grademenu) > 0) {
$gradingelement = $mform->addElement('select', 'grade', get_string('grade').':', $grademenu);
// The grade is already formatted with format_float so it needs to be converted back to an integer.
if (!empty($data->grade)) {
$data->grade = (int)unformat_float($data->grade);
}
$mform->setType('grade', PARAM_INT);
if ($gradingdisabled) {
$gradingelement->freeze();

0 comments on commit 56672cb

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