From ab887f8de9c878810c2782d66522a0a531d70054 Mon Sep 17 00:00:00 2001 From: John Okely Date: Fri, 13 Jan 2017 10:52:24 +0800 Subject: [PATCH] MDL-57613 enrol_lti: Allow longer nonces --- enrol/lti/db/install.xml | 4 ++-- enrol/lti/db/upgrade.php | 13 +++++++++++++ enrol/lti/version.php | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/enrol/lti/db/install.xml b/enrol/lti/db/install.xml index e2d1f9ed0b0..c724a4be149 100644 --- a/enrol/lti/db/install.xml +++ b/enrol/lti/db/install.xml @@ -1,5 +1,5 @@ - @@ -116,7 +116,7 @@ - + diff --git a/enrol/lti/db/upgrade.php b/enrol/lti/db/upgrade.php index 94a90cc9763..6023facfb3d 100644 --- a/enrol/lti/db/upgrade.php +++ b/enrol/lti/db/upgrade.php @@ -242,6 +242,19 @@ function xmldb_enrol_lti_upgrade($oldversion) { upgrade_plugin_savepoint(true, 2016052304, 'enrol', 'lti'); } + if ($oldversion < 2017011300) { + + // Changing precision of field value on table enrol_lti_lti2_nonce to (64). + $table = new xmldb_table('enrol_lti_lti2_nonce'); + $field = new xmldb_field('value', XMLDB_TYPE_CHAR, '64', null, XMLDB_NOTNULL, null, null, 'consumerid'); + + // Launch change of precision for field value. + $dbman->change_field_precision($table, $field); + + // Lti savepoint reached. + upgrade_plugin_savepoint(true, 2017011300, 'enrol', 'lti'); + } + // Automatically generated Moodle v3.2.0 release upgrade line. // Put any upgrade step following this. diff --git a/enrol/lti/version.php b/enrol/lti/version.php index 366f9253df2..11167f1072b 100644 --- a/enrol/lti/version.php +++ b/enrol/lti/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX). +$plugin->version = 2017011300; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2016112900; // Requires this Moodle version (3.1) $plugin->component = 'enrol_lti'; // Full name of the plugin (used for diagnostics).