Unverified Commit 26cb467b authored by Cameron Ball's avatar Cameron Ball
Browse files

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.
parent 5bba36f6
......@@ -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');
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment