diff --git a/db/install.xml b/db/install.xml index 2296cd0..72f2e19 100644 --- a/db/install.xml +++ b/db/install.xml @@ -45,7 +45,7 @@ - + diff --git a/db/upgrade.php b/db/upgrade.php index aa0e5b0..9bdfba7 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -550,5 +550,20 @@ function xmldb_attendance_upgrade($oldversion=0) { upgrade_mod_savepoint(true, 2019012500, 'attendance'); } + if ($oldversion < 2019061800) { + + // Make sure default value to '0'. + $table = new xmldb_table('attendance_sessions'); + $field = new xmldb_field('preventsharedip', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, + XMLDB_NOTNULL, null, '0', 'absenteereport'); + + if ($dbman->field_exists($table, $field)) { + $dbman->change_field_default($table, $field); + } + + // Attendance savepoint reached. + upgrade_mod_savepoint(true, 2019061800, 'attendance'); + } + return $result; } diff --git a/version.php b/version.php index 6c1d89a..55f125e 100644 --- a/version.php +++ b/version.php @@ -23,7 +23,7 @@ */ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2019052801; +$plugin->version = 2019061800; $plugin->requires = 2018102700; // Requires 3.6. $plugin->release = '3.6.7'; $plugin->maturity = MATURITY_STABLE;