Browse Source

Fixed validation rule for multiple sessions that end date must be after start date

MOODLE_26_STABLE
Tim Lock 11 years ago
parent
commit
cfc9f351cf
  1. 2
      add_form.php

2
add_form.php

@ -158,7 +158,7 @@ class mod_attendance_add_form extends moodleform {
public function validation($data, $files) { public function validation($data, $files) {
$errors = parent::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'); $errors['sessionenddate'] = get_string('invalidsessionenddate', 'attendance');
} }

Loading…
Cancel
Save