diff --git a/mod/hotpot/db/mysql.php b/mod/hotpot/db/mysql.php index 4d4577ece3b..4a028b463e7 100644 --- a/mod/hotpot/db/mysql.php +++ b/mod/hotpot/db/mysql.php @@ -21,6 +21,15 @@ function hotpot_upgrade($oldversion) { $ok = $ok && hotpot_get_update_to_v2(); $ok = $ok && hotpot_update_to_v2_1_2(); } + + if ($oldversion < 2006042100) { + $result = execute_sql("ALTER TABLE {$CFG->prefix}hotpot_questions DROP INDEX {$CFG->prefix}hotpot_questions_name_idx"); + $result = execute_sql("ALTER TABLE {$CFG->prefix}hotpot_questions ADD INDEX hotpot_questions_name_idx (name(20))"); + + } + + + return $ok; } function hotpot_get_update_to_v2() { diff --git a/mod/hotpot/db/mysql.sql b/mod/hotpot/db/mysql.sql index 92651b0fc28..14b7ef23235 100644 --- a/mod/hotpot/db/mysql.sql +++ b/mod/hotpot/db/mysql.sql @@ -67,7 +67,7 @@ CREATE TABLE prefix_hotpot_questions ( text int(10) unsigned default NULL, hotpot int(10) unsigned NOT NULL default '0', PRIMARY KEY (id), - KEY prefix_hotpot_questions_name_idx (name(20)), + KEY hotpot_questions_name_idx (name(20)), KEY prefix_hotpot_questions_hotpot_idx (hotpot) ) TYPE=MyISAM COMMENT='details about questions in Hot Potatoes quiz attempts'; # diff --git a/mod/hotpot/version.php b/mod/hotpot/version.php index 5e41689c56e..5c7fce15727 100644 --- a/mod/hotpot/version.php +++ b/mod/hotpot/version.php @@ -3,7 +3,7 @@ /// Code fragment to define the version of hotpot /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2005090715; // release date of this version (see note below) +$module->version = 2006042100; // release date of this version (see note below) $module->release = 'v2.1.15'; // human-friendly version name (used in mod/hotpot/lib.php) $module->cron = 0; // period for cron to check this module (secs) // interpretation of YYYYMMDDXY version numbers