MDL-55520 forms: Properly format the grademax for the database

This commit is contained in:
Damyon Wiese 2016-08-16 10:59:55 +08:00 committed by Andrew Nicols
parent c544236647
commit bb0b39b839

View File

@ -286,7 +286,7 @@ class MoodleQuickForm_modgrade extends MoodleQuickForm_group {
if ($this->isupdate && $this->hasgrades && $this->canrescale && $this->currentgradetype == 'point' && empty($rescalegrades)) {
// If the maxgrade field is disabled with javascript, no value is sent with the form and mform assumes the default.
// If the user was forced to choose a rescale option - and they haven't - prevent any changes to the max grade.
return $this->currentgrade;
return (string)unformat_float($this->currentgrade);
}
switch ($type) {
case 'point':