diff --git a/db/upgrade.php b/db/upgrade.php index 34f38f7c0972501cdd227a6e49ca9b8e4473d489..c8cdc5593ba16fe4363686e96b894f0d56f06411 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -559,6 +559,21 @@ function xmldb_pdfannotator_upgrade($oldversion) { // Pdfannotator savepoint reached. upgrade_mod_savepoint(true, 2019060300, 'pdfannotator'); } + + if ($oldversion < 2019070100) { + + // Define field useprintcomments to be added to pdfannotator. + $table = new xmldb_table('pdfannotator'); + $field = new xmldb_field('useprintcomments', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'useprint'); + + // Conditionally launch add field useprintcomments. + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + // Pdfannotator savepoint reached. + upgrade_mod_savepoint(true, 2019030100, 'pdfannotator'); + } return true; } diff --git a/version.php b/version.php index cee845bc5bd529bbee89c35793a3b5ef022ddc11..dc76f61711eadb4b17d75a22ea9706348f773d7a 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'mod_pdfannotator'; // Full name of the plugin (used for diagnostics). -$plugin->version = 2019060300; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2019070100; // The current module version (Date: YYYYMMDDXX). $plugin->release = 'PDF Annotator v1.1 release 1'; $plugin->requires = 2016112900; // Requires this Moodle version. $plugin->cron = 0; // Period for cron to check this module (secs).