Skip to content

Commit

Permalink
MDL-57613 enrol_lti: Allow longer nonces
Browse files Browse the repository at this point in the history
  • Loading branch information
John Okely committed Jan 13, 2017
1 parent d97582f commit ab887f8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions enrol/lti/db/install.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="enrol/lti/db" VERSION="20160809" COMMENT="XMLDB file for Moodle enrol/lti"
<XMLDB PATH="enrol/lti/db" VERSION="20170113" COMMENT="XMLDB file for Moodle enrol/lti"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
Expand Down Expand Up @@ -116,7 +116,7 @@
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="11" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="consumerid" TYPE="int" LENGTH="11" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="value" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="value" TYPE="char" LENGTH="64" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="expires" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
</FIELDS>
<KEYS>
Expand Down
13 changes: 13 additions & 0 deletions enrol/lti/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion enrol/lti/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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).

0 comments on commit ab887f8

Please sign in to comment.