From cfc9f351cfd4b4eb6e942c37bd32c666366b20d4 Mon Sep 17 00:00:00 2001 From: Tim Lock Date: Thu, 19 Sep 2013 07:39:13 +0930 Subject: [PATCH] Fixed validation rule for multiple sessions that end date must be after start date --- add_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); }