Browse Source

Fix up update form with new field.

40-behatfixes
Dan Marsden 3 years ago
parent
commit
27b08837b0
  1. 1
      classes/form/updatesession.php
  2. 4
      classes/structure.php
  3. 4
      db/upgrade.php
  4. 2
      version.php

1
classes/form/updatesession.php

@ -80,6 +80,7 @@ class updatesession extends \moodleform {
'preventsharediptime' => $sess->preventsharediptime,
'includeqrcode' => $sess->includeqrcode,
'rotateqrcode' => $sess->rotateqrcode,
'automarkcmid' => $sess->automarkcmid
);
if ($sess->subnet == $attendancesubnet) {
$data['usedefaultsubnet'] = 1;

4
classes/structure.php

@ -619,6 +619,10 @@ class mod_attendance_structure {
$sess->preventsharediptime = $formdata->preventsharediptime;
}
if (!empty($formdata->automarkcmid)) {
$sess->automarkcmid = $formdata->automarkcmid;
}
$sess->timemodified = time();
$DB->update_record('attendance_sessions', $sess);

4
db/upgrade.php

@ -650,7 +650,7 @@ function xmldb_attendance_upgrade($oldversion=0) {
upgrade_mod_savepoint(true, 2021050700, 'attendance');
}
if ($oldversion < 2021060700) {
if ($oldversion < 2021082400) {
// Changing precision of field statusset on table attendance_log to (1333).
$table = new xmldb_table('attendance_sessions');
@ -662,7 +662,7 @@ function xmldb_attendance_upgrade($oldversion=0) {
}
// Attendance savepoint reached.
upgrade_mod_savepoint(true, 2021060700, 'attendance');
upgrade_mod_savepoint(true, 2021082400, 'attendance');
}
return $result;

2
version.php

@ -23,7 +23,7 @@
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2021082300;
$plugin->version = 2021082400;
$plugin->requires = 2021051700; // Requires 3.11.
$plugin->release = '3.11.6';
$plugin->maturity = MATURITY_STABLE;

Loading…
Cancel
Save