Browse Source

End date must not exceed one year ahead of the session date

MOODLE_29_STABLE
antonio.c.mariani 9 years ago
committed by Dan Marsden
parent
commit
8b79ad849a
  1. 3
      add_form.php
  2. 2
      lang/en/attendance.php

3
add_form.php

@ -195,6 +195,9 @@ class mod_attendance_add_form extends moodleform {
$errors['sdays'] = get_string('checkweekdays', 'attendance');
}
}
if ($addmulti && ceil(($data['sessionenddate'] - $data['sessiondate']) / YEARSECS) > 1) {
$errors['sessionenddate'] = get_string('timeahead', 'attendance');
}
return $errors;
}

2
lang/en/attendance.php

@ -308,3 +308,5 @@ $string['notmember'] = 'not member';
$string['deletehiddensessions'] = 'Delete all hidden sessions';
$string['confirmdeletehiddensessions'] = 'Are you sure you want to delete {$a->count} sessions scheduled before the course start date ({$a->date})?';
$string['hiddensessionsdeleted'] = 'All hidden sessions were delete';
$string['timeahead'] = 'Must not exceed one year ahead of the session date';

Loading…
Cancel
Save