Browse Source

Merge pull request #12 from tlock/master

Fixed validation rule for multiple sessions that end date must be after ...
MOODLE_26_STABLE
Dan Marsden 11 years ago
parent
commit
84f2373a48
  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