mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
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.
This commit is contained in:
parent
5bba36f63f
commit
26cb467b47
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user