@ -161,6 +161,12 @@ class mod_attendance_add_form extends moodleform {
if ($data['sessiontype'] == attendance::SESSION_GROUP and empty($data['groups'])) {
$errors['groups'] = get_string('errorgroupsnotselected', 'attendance');
}
$addmulti = isset($data['addmultiply'])? (int)$data['addmultiply'] : 0;
if (($addmulti != 0) && (!array_key_exists('sdays',$data) || empty($data['sdays']))) {
$data['sdays']= array();
$errors['sdays'] = get_string('required', 'attendance');
return $errors;
@ -153,6 +153,7 @@ $string['pluginname'] = 'Attendance';
$string['pluginadministration'] = 'Attendance administration';
$string['remarks'] = 'Remarks';
$string['report'] = 'Report';
$string['required'] = 'Required*';
$string['resetdescription'] = 'Remember that deleting attendance data will erase information from database. You can just hide older sessions having changed start date of course!';
$string['resetstatuses'] = 'Reset statuses to default';
$string['restoredefaults'] = 'Restore defaults';