diff --git a/add_form.php b/add_form.php index 6cec532..4026324 100644 --- a/add_form.php +++ b/add_form.php @@ -158,7 +158,7 @@ class mod_attendance_add_form extends moodleform { public function validation($data, $files) { $errors = parent::validation($data, $files); - if ($data['sessiondate'] != 0 && $data['sessionenddate'] != 0 && $data['sessionenddate'] < $data['sessiondate']) { + if (!empty($data['addmultiply']) && $data['sessiondate'] != 0 && $data['sessionenddate'] != 0 && $data['sessionenddate'] < $data['sessiondate']) { $errors['sessionenddate'] = get_string('invalidsessionenddate', 'attendance'); }