Skip to content

Commit cb04f50

Browse files
author
David Monllao
committed
Merge branch 'MDL-61107_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE
2 parents 557b880 + 1926647 commit cb04f50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: mod/quiz/edit.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@
159159
if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {
160160

161161
// If rescaling is required save the new maximum.
162-
$maxgrade = unformat_float(optional_param('maxgrade', -1, PARAM_RAW));
163-
if ($maxgrade >= 0) {
162+
$maxgrade = unformat_float(optional_param('maxgrade', '', PARAM_RAW_TRIMMED), true);
163+
if (is_float($maxgrade) && $maxgrade >= 0) {
164164
quiz_set_grade($maxgrade, $quiz);
165165
quiz_update_all_final_grades($quiz);
166166
quiz_update_grades($quiz, 0, true);

0 commit comments

Comments
 (0)