From bdb58432909f279b8aedfffb1324bbe656b07142 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Thu, 15 Mar 2018 13:28:07 +1300 Subject: [PATCH] MDL-59857 mod_scorm: use valid length for grade type field. --- mod/scorm/db/install.xml | 8 ++++---- mod/scorm/db/upgrade.php | 13 +++++++++++++ mod/scorm/version.php | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/mod/scorm/db/install.xml b/mod/scorm/db/install.xml index 07252bec92e..ccd2f3e1905 100644 --- a/mod/scorm/db/install.xml +++ b/mod/scorm/db/install.xml @@ -1,7 +1,7 @@ - @@ -44,7 +44,7 @@ - + diff --git a/mod/scorm/db/upgrade.php b/mod/scorm/db/upgrade.php index 4ae1513c6a2..ccf9e11c486 100644 --- a/mod/scorm/db/upgrade.php +++ b/mod/scorm/db/upgrade.php @@ -126,5 +126,18 @@ function xmldb_scorm_upgrade($oldversion) { // Automatically generated Moodle v3.3.0 release upgrade line. // Put any upgrade step following this. + if ($oldversion < 2017051501) { + + // Changing precision of field completionscorerequired on table scorm to (10). + $table = new xmldb_table('scorm'); + $field = new xmldb_field('completionscorerequired', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'completionstatusrequired'); + + // Launch change of precision for field completionscorerequired. + $dbman->change_field_precision($table, $field); + + // Scorm savepoint reached. + upgrade_mod_savepoint(true, 2017051501, 'scorm'); + } + return true; } diff --git a/mod/scorm/version.php b/mod/scorm/version.php index 8fe92bb800f..749cc0e1b00 100644 --- a/mod/scorm/version.php +++ b/mod/scorm/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2017051500; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2017051501; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2017050500; // Requires this Moodle version. $plugin->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics). \ No newline at end of file