From 16302f85ec56485faff8c3b96cf762955efb5f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Tue, 16 May 2017 22:21:27 +0200 Subject: [PATCH] MDL-56617 mod_quiz: No grade to pass check if CBM used When certainty-based marking is used, grades can 'exceed' the maximum grade (because they are multiplied by factors). Therefore, in such cases, don't show no warning. --- mod/quiz/mod_form.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php index 74029fb5816..615c66fd44a 100644 --- a/mod/quiz/mod_form.php +++ b/mod/quiz/mod_form.php @@ -596,6 +596,10 @@ class mod_quiz_mod_form extends moodleform_mod { } } + // If CBM is involved, don't show the warning for grade to pass being larger than the maximum grade. + if (($data['preferredbehaviour'] == 'deferredcbm') OR ($data['preferredbehaviour'] == 'immediatecbm')) { + unset($errors['gradepass']); + } // Any other rule plugins. $errors = quiz_access_manager::validate_settings_form_fields($errors, $data, $files, $this);