]> git.mjollnir.org Git - moodle.git/commitdiff
fix for 5205
authortoyomoyo <toyomoyo>
Fri, 21 Apr 2006 07:55:57 +0000 (07:55 +0000)
committertoyomoyo <toyomoyo>
Fri, 21 Apr 2006 07:55:57 +0000 (07:55 +0000)
mod/hotpot/db/mysql.php
mod/hotpot/db/mysql.sql
mod/hotpot/version.php

index 4d4577ece3bcb4324b0c371a349b38a0647780e4..4a028b463e72442bca5d605f4b30b8e8f2efb8dd 100644 (file)
@@ -21,6 +21,15 @@ function hotpot_upgrade($oldversion) {
                $ok = $ok && hotpot_get_update_to_v2();\r
                $ok = $ok && hotpot_update_to_v2_1_2();\r
        }\r
+       \r
+    if ($oldversion < 2006042100) {\r
+        $result = execute_sql("ALTER TABLE {$CFG->prefix}hotpot_questions DROP INDEX {$CFG->prefix}hotpot_questions_name_idx");\r
+        $result = execute_sql("ALTER TABLE {$CFG->prefix}hotpot_questions ADD INDEX hotpot_questions_name_idx (name(20))");\r
+        \r
+    }\r
+       \r
+       \r
+       \r
        return $ok;\r
 }\r
 function hotpot_get_update_to_v2() {\r
index 92651b0fc28c6f3d00fcf0451021d48f10fd58ab..14b7ef23235a002aedc46fb699873280d81802d9 100644 (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';
 #
index 5e41689c56e326ea8e3ba910aa5ac0d074f4c27b..5c7fce15727ec75feaafadb2fb6bce1660d81895 100644 (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