From 991caba44d4d28a842e553f2e7cb8a9f2bdaa15d Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Thu, 19 Jun 2014 15:17:47 +0800 Subject: [PATCH] MDL-46059 mod_lti: Changed LTI table column grade to an int. --- mod/lti/db/install.xml | 2 +- mod/lti/db/upgrade.php | 14 ++++++++++++++ mod/lti/upgrade.txt | 5 +++++ mod/lti/version.php | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/mod/lti/db/install.xml b/mod/lti/db/install.xml index ef9806cf008..387c407c5ed 100644 --- a/mod/lti/db/install.xml +++ b/mod/lti/db/install.xml @@ -22,7 +22,7 @@ - + diff --git a/mod/lti/db/upgrade.php b/mod/lti/db/upgrade.php index 3f18562b5dd..7ecc04e84d9 100644 --- a/mod/lti/db/upgrade.php +++ b/mod/lti/db/upgrade.php @@ -85,6 +85,20 @@ function xmldb_lti_upgrade($oldversion) { // Moodle v2.7.0 release upgrade line. // Put any upgrade step following this. + if ($oldversion < 2014060201) { + + // Changing type of field grade on table lti to int. + $table = new xmldb_table('lti'); + $field = new xmldb_field('grade', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '100', + 'instructorchoiceacceptgrades'); + + // Launch change of type for field grade. + $dbman->change_field_type($table, $field); + + // Lti savepoint reached. + upgrade_mod_savepoint(true, 2014060201, 'lti'); + } + return true; } diff --git a/mod/lti/upgrade.txt b/mod/lti/upgrade.txt index 9e1ca22af30..dda6f1f5069 100644 --- a/mod/lti/upgrade.txt +++ b/mod/lti/upgrade.txt @@ -1,5 +1,10 @@ This files describes API changes in the lti code. +=== 2.8 === + +* The field 'grade' in the table {lti} is now an integer rather than a numeric to bring it + in line with the 'grade' field in other activities. + === 2.7 === * mod_lti\event\unknown_service_api_called now has less data stored in 'other' diff --git a/mod/lti/version.php b/mod/lti/version.php index b9db2d2e804..a20a0e60c7e 100644 --- a/mod/lti/version.php +++ b/mod/lti/version.php @@ -48,7 +48,7 @@ defined('MOODLE_INTERNAL') || die; -$plugin->version = 2014060200; // The current module version (Date: YYYYMMDDXX) +$plugin->version = 2014060201; // The current module version (Date: YYYYMMDDXX) $plugin->requires = 2014050800; // Requires this Moodle version $plugin->component = 'mod_lti'; // Full name of the plugin (used for diagnostics) $plugin->cron = 0; -- 2.11.4.GIT