mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Merge branch 'MDL-36712-master' of git://github.com/damyon/moodle
This commit is contained in:
commit
c3c2fc538a
1 changed files with 5 additions and 0 deletions
|
@ -3970,6 +3970,11 @@ class assign {
|
|||
$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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue