From 26cb467b47af723dfc2f099dbac01e9ffa5f2bf4 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Wed, 5 Oct 2016 17:14:00 +0800 Subject: [PATCH] MDL-54802 mod_quiz: Move grade to pass error to require passing grade element When using a passing grade of zero, with the required passing grade option, an error was displayed on the "grade to pass" element. This was confusing as the error message is referring to the "Require passing grade" element. This patch moves the message to the "Require passing grade" element. Additionaly this patch fixes a small typo in a comment. --- mod/quiz/mod_form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php index d2938baf8f8..abe9b980004 100644 --- a/mod/quiz/mod_form.php +++ b/mod/quiz/mod_form.php @@ -534,9 +534,9 @@ class mod_quiz_mod_form extends moodleform_mod { } if (array_key_exists('completion', $data) && $data['completion'] == COMPLETION_TRACKING_AUTOMATIC) { - // Show an error if require passing grade was selected and the grade to pass was setted to 0. + // Show an error if require passing grade was selected and the grade to pass was set to 0. if ($data['completionpass'] == 1 && (empty($data['gradepass']) || grade_floatval($data['gradepass']) == 0)) { - $errors['gradepass'] = get_string('gradetopassnotset', 'quiz'); + $errors['completionpassgroup'] = get_string('gradetopassnotset', 'quiz'); } }