Browse Source

fix validation check.

40-behatfixes
Dan Marsden 3 years ago
parent
commit
19b81724f0
  1. 4
      classes/form/addsession.php
  2. 4
      classes/form/updatesession.php

4
classes/form/addsession.php

@ -350,7 +350,9 @@ class addsession extends moodleform {
$this->_form->setConstant('previoussessiondate', $sessstart);
}
if (!empty($data['studentscanmark']) && $data['automark'] == ATTENDANCE_AUTOMARK_CLOSE) {
if (!empty($data['studentscanmark']) && isset($data['automark'])
&& $data['automark'] == ATTENDANCE_AUTOMARK_CLOSE) {
$cm = $this->_customdata['cm'];
// Check that the selected statusset has a status to use when unmarked.
$sql = 'SELECT id

4
classes/form/updatesession.php

@ -223,7 +223,9 @@ class updatesession extends \moodleform {
$errors['sestime'] = get_string('invalidsessionendtime', 'attendance');
}
if (!empty($data['studentscanmark']) && $data['automark'] == ATTENDANCE_AUTOMARK_CLOSE) {
if (!empty($data['studentscanmark']) && isset($data['automark'])
&& $data['automark'] == ATTENDANCE_AUTOMARK_CLOSE) {
$cm = $this->_customdata['cm'];
// Check that the selected statusset has a status to use when unmarked.
$sql = 'SELECT id

Loading…
Cancel
Save