From 6d79bed31b54a6b049678b07f8111de7958ec4b3 Mon Sep 17 00:00:00 2001 From: Claude Vervoort Date: Thu, 1 Oct 2020 15:12:15 -0400 Subject: [PATCH] MDL-57756 mod_lti: params change to text type --- mod/lti/db/install.xml | 2 +- mod/lti/db/upgrade.php | 14 ++++++++++++++ mod/lti/version.php | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/mod/lti/db/install.xml b/mod/lti/db/install.xml index 2c5af4c995fd4..b1549235e9d4d 100644 --- a/mod/lti/db/install.xml +++ b/mod/lti/db/install.xml @@ -20,7 +20,7 @@ - + diff --git a/mod/lti/db/upgrade.php b/mod/lti/db/upgrade.php index a24dc6d270ee3..489ed42197aa9 100644 --- a/mod/lti/db/upgrade.php +++ b/mod/lti/db/upgrade.php @@ -224,5 +224,19 @@ function xmldb_lti_upgrade($oldversion) { // Automatically generated Moodle v3.8.0 release upgrade line. // Put any upgrade step following this. + if ($oldversion < 2019111801) { + + // Changing type of field instructorcustomparameters on table lti to text. + $table = new xmldb_table('lti'); + $field = new xmldb_field('instructorcustomparameters', XMLDB_TYPE_TEXT, null, null, null, null, null, + 'instructorchoiceallowsetting'); + + // Launch change of type for field value. + $dbman->change_field_type($table, $field); + + // Lti savepoint reached. + upgrade_mod_savepoint(true, 2019111801, 'lti'); + } + return true; } diff --git a/mod/lti/version.php b/mod/lti/version.php index 7921b8b6aa4e1..2b9c772955a6d 100644 --- a/mod/lti/version.php +++ b/mod/lti/version.php @@ -48,7 +48,7 @@ defined('MOODLE_INTERNAL') || die; -$plugin->version = 2019111800; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2019111801; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2019111200; // Requires this Moodle version. $plugin->component = 'mod_lti'; // Full name of the plugin (used for diagnostics). $plugin->cron = 0;