diff --git a/db/install.xml b/db/install.xml index bf40a99..0f7b83c 100644 --- a/db/install.xml +++ b/db/install.xml @@ -1,8 +1,9 @@ + - + @@ -10,6 +11,7 @@ + @@ -30,7 +32,7 @@ - + diff --git a/db/upgrade.php b/db/upgrade.php index dcdf3e0..3485f7f 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -177,5 +177,20 @@ function xmldb_attendance_upgrade($oldversion=0) { upgrade_mod_savepoint(true, 2016052202, 'attendance'); } + if ($oldversion < 2016082900) { + + // Define field timemodified to be added to attendance. + $table = new xmldb_table('attendance'); + $field = new xmldb_field('timemodified', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'grade'); + + // Conditionally launch add field timemodified. + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + // Attendance savepoint reached. + upgrade_mod_savepoint(true, 2016082900, 'attendance'); + } + return $result; } diff --git a/version.php b/version.php index 4ed5a32..39e624d 100644 --- a/version.php +++ b/version.php @@ -22,9 +22,9 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$plugin->version = 2016052202; +$plugin->version = 2016082900; $plugin->requires = 2016052300; -$plugin->release = '3.1.1.0'; +$plugin->release = '3.1.1.1'; $plugin->maturity = MATURITY_STABLE; $plugin->cron = 0; $plugin->component = 'mod_attendance';