fix for 5205

This commit is contained in:
toyomoyo 2006-04-21 07:55:57 +00:00
parent 7d8b709473
commit 2712ac665c
3 changed files with 11 additions and 2 deletions

View File

@ -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() {

View File

@ -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';
#

View File

@ -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