mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-30398 Validations added for password field
This commit is contained in:
parent
79b0fece1f
commit
7b5abb50ce
@ -158,6 +158,7 @@ $string['endoflesson'] = 'End of lesson';
|
||||
$string['enteredthis'] = 'entered this.';
|
||||
$string['entername'] = 'Enter a nickname for the high scores list';
|
||||
$string['enterpassword'] = 'Please enter the password:';
|
||||
$string['emptypassword'] = 'Password cannot be empty';
|
||||
$string['eolstudentoutoftime'] = 'Attention: You ran out of time for this lesson. Your last answer may not have counted if it was answered after the time was up.';
|
||||
$string['eolstudentoutoftimenoanswers'] = 'You did not answer any questions. You have received a 0 for this lesson.';
|
||||
$string['essay'] = 'Essay';
|
||||
|
@ -339,6 +339,9 @@ class mod_lesson_mod_form extends moodleform_mod {
|
||||
if (empty($data['maxtime']) and !empty($data['timed'])) {
|
||||
$errors['timedgrp'] = get_string('err_numeric', 'form');
|
||||
}
|
||||
if (!empty($data['usepassword']) && empty($data['password'])) {
|
||||
$errors['password'] = get_string('emptypassword', 'lesson');
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user