MDL-60658 course, gradebook: fix missing unformat_float for gradepass

Fix incorrect comparison of gradepass variable (with comma as decimal separator)
with grade variable when trying to save assignment settings.
Adds missing unformat_float($data['gradepass']).
This commit is contained in:
Chernyavskiy Leonid
2018-03-01 09:27:29 +07:00
parent fa19d59444
commit 24112d09b9
+1 -1
View File
@@ -408,7 +408,7 @@ abstract class moodleform_mod extends moodleform {
} else {
$grade = $scale;
}
if ($data['gradepass'] > $grade) {
if (unformat_float($data['gradepass']) > $grade) {
$errors['gradepass'] = get_string('gradepassgreaterthangrade', 'grades', $grade);
}
}