@ -534,6 +534,9 @@ class mod_attendance_structure {
$sess->rotateqrcode = 0;
$sess->rotateqrcodesecret = '';
}
if (!isset($sess->automarkcmid)) {
$sess->automarkcmid = null;
$event->add_record_snapshot('attendance_sessions', $sess);
$event->trigger();
@ -52,7 +52,7 @@
<FIELD NAME="includeqrcode" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Include a QR code image when displaying the password"/>
<FIELD NAME="rotateqrcode" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="rotateqrcodesecret" TYPE="char" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="automarkcmid" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="automarkcmid" TYPE="int" LENGTH="10" NOTNULL="false" DEFAULT="0" SEQUENCE="false"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for attendance_sessions"/>
@ -654,7 +654,7 @@ function xmldb_attendance_upgrade($oldversion=0) {
// Changing precision of field statusset on table attendance_log to (1333).
$table = new xmldb_table('attendance_sessions');
$field = new xmldb_field('automarkcmid', XMLDB_TYPE_CHAR, '10', null, null, null, null, 'rotateqrcodesecret');
$field = new xmldb_field('automarkcmid', XMLDB_TYPE_CHAR, '10', null, false, null, null, 'rotateqrcodesecret');
// Launch change of precision for field statusset.
if (!$dbman->field_exists($table, $field)) {