Browse Source

Fixes #379 - Error logic for QR Code import error (#382)

MOODLE_36_STABLE
maksudr 6 years ago
committed by Dan Marsden
parent
commit
3a94a08f2c
  1. 6
      classes/import/sessions.php
  2. 1
      lang/en/attendance.php

6
classes/import/sessions.php

@ -350,6 +350,12 @@ class sessions {
$session->includeqrcode = $pluginconfig->includeqrcode_default;
} else {
$session->includeqrcode = $this->get_column_data($row, $mapping['includeqrcode']);
if ($session->includeqrcode == 1 && $session->studentscanmark != 1) {
\mod_attendance_notifyqueue::notify_problem(get_string('error:qrcode', 'attendance'));
continue;
}
}
$session->statusset = 0;

1
lang/en/attendance.php

@ -200,6 +200,7 @@ $string['error:sessioncourseinvalid'] = 'A session course is invalid! Skipping.'
$string['error:sessiondateinvalid'] = 'A session date is invalid! Skipping.';
$string['error:sessionendinvalid'] = 'A session end time is invalid! Skipping.';
$string['error:sessionstartinvalid'] = 'A session start time is invalid! Skipping.';
$string['error:qrcode'] = 'Allow students to record own attendance must be enabled to use QR code! Skipping.';
$string['errorgroupsnotselected'] = 'Select one or more groups';
$string['errorinaddingsession'] = 'Error in adding session';
$string['erroringeneratingsessions'] = 'Error in generating sessions ';

Loading…
Cancel
Save