Merge branch 'MDL-49701_28' of git://github.com/jmvedrine/moodle into MOODLE_28_STABLE

This commit is contained in:
Dan Poltawski
2015-08-24 15:14:16 +01:00
+7
View File
@@ -337,6 +337,13 @@ class mod_lesson_mod_form extends moodleform_mod {
if (empty($data['maxtime']) and !empty($data['timed'])) {
$errors['timedgrp'] = get_string('err_numeric', 'form');
}
// Check open and close times are consistent.
if ($data['available'] != 0 && $data['deadline'] != 0 &&
$data['deadline'] < $data['available']) {
$errors['deadline'] = get_string('closebeforeopen', 'lesson');
}
if (!empty($data['usepassword']) && empty($data['password'])) {
$errors['password'] = get_string('emptypassword', 'lesson');
}