From 07885d55ed129c8b6c14f4aa4a8460b10d761b5a Mon Sep 17 00:00:00 2001 From: Jwalit Shah Date: Tue, 29 Aug 2023 17:13:23 +1000 Subject: [PATCH] [#326] change field referer to text --- db/install.xml | 4 ++-- db/upgrade.php | 15 +++++++++++++++ version.php | 4 ++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/db/install.xml b/db/install.xml index f2814ed..82e5a7f 100755 --- a/db/install.xml +++ b/db/install.xml @@ -1,5 +1,5 @@ - @@ -23,7 +23,7 @@ - + diff --git a/db/upgrade.php b/db/upgrade.php index 2d6f981..7921e55 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -444,5 +444,20 @@ function xmldb_tool_excimer_upgrade($oldversion) { upgrade_plugin_savepoint(true, 2023050800, 'tool', 'excimer'); } + if ($oldversion < 2023082900) { + + // Define field id to be added to tool_excimer_profiles. + $table = new xmldb_table('tool_excimer_profiles'); + $field = new xmldb_field('referer', XMLDB_TYPE_TEXT, null, null, false); + + // Conditionally change the referer field. + if ($dbman->field_exists($table, $field)) { + $dbman->change_field_default($table, $field); + } + + // Excimer savepoint reached. + upgrade_plugin_savepoint(true, 2023082900, 'tool', 'excimer'); + } + return true; } diff --git a/version.php b/version.php index 9a497fb..8ed8304 100644 --- a/version.php +++ b/version.php @@ -25,8 +25,8 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2023060200; -$plugin->release = 2023060200; +$plugin->version = 2023082900; +$plugin->release = 2023082900; $plugin->requires = 2017051500; // Moodle 3.3 for Totara support. $plugin->supported = [35, 401]; // Supports Moodle 3.5 or later. // TODO $plugin->incompatible = ; // Available as of Moodle 3.9.0 or later.