From 45075df124fa8e44503039ae4dcece85837e9d05 Mon Sep 17 00:00:00 2001 From: Mayank Gupa Date: Thu, 28 Jul 2011 02:02:53 +0530 Subject: [PATCH] MDL-28493 SCORM Changed objectiveid field to char --- mod/scorm/db/install.xml | 6 +++--- mod/scorm/db/upgrade.php | 8 ++++++++ mod/scorm/version.php | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/mod/scorm/db/install.xml b/mod/scorm/db/install.xml index ab1d6e17d83..ca356ba28d9 100644 --- a/mod/scorm/db/install.xml +++ b/mod/scorm/db/install.xml @@ -1,5 +1,5 @@ - @@ -104,7 +104,7 @@ - + @@ -195,4 +195,4 @@ - + \ No newline at end of file diff --git a/mod/scorm/db/upgrade.php b/mod/scorm/db/upgrade.php index 31d5b55e0dd..2f24c877620 100644 --- a/mod/scorm/db/upgrade.php +++ b/mod/scorm/db/upgrade.php @@ -546,6 +546,14 @@ function xmldb_scorm_upgrade($oldversion) { unset_config('updatetime', 'scorm'); upgrade_mod_savepoint(true, 2011021402, 'scorm'); } + + if ($oldversion < 2011073100) { + // change field type of objectiveid + $table = new xmldb_table('scorm_seq_objective'); + $field = new xmldb_field('objectiveid', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'primaryobj'); + $dbman->change_field_type($table, $field); + upgrade_main_savepoint(true, 2011073100, 'scorm'); + } return true; } diff --git a/mod/scorm/version.php b/mod/scorm/version.php index ed58a072dda..14ccce04ad5 100644 --- a/mod/scorm/version.php +++ b/mod/scorm/version.php @@ -23,6 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$module->version = 2011060500; // The (date) version of this module +$module->version = 2011073100; // The (date) version of this module $module->requires = 2010080300; // The version of Moodle that is required $module->cron = 300; // How often should cron check this module (seconds)?