]> git.mjollnir.org Git - moodle.git/commitdiff
The previous update was supposed to be an enlargement of answer in quiz_responses...
authorkaipe <kaipe>
Sat, 13 Nov 2004 19:25:13 +0000 (19:25 +0000)
committerkaipe <kaipe>
Sat, 13 Nov 2004 19:25:13 +0000 (19:25 +0000)
It is now correct and the mistake never made it to the stable version :-)

mod/quiz/db/mysql.php
mod/quiz/db/mysql.sql
mod/quiz/db/postgres7.php
mod/quiz/db/postgres7.sql
mod/quiz/version.php

index 499097a8d19df870dc77f90b45613f1ec74dbd84..755cf54fab80d3700a855111a386a68a982973d3 100644 (file)
@@ -267,8 +267,8 @@ function quiz_upgrade($oldversion) {
                 ) TYPE=MyISAM COMMENT='Options for questions of type calculated'; ");
     }
 
-    if ($oldversion < 2004101700) {
-        table_column("quiz_answers", "answer", "answer", "text", "", "", "", "not null");
+    if ($oldversion < 2004111400) {
+        table_column("quiz_responses", "answer", "answer", "text", "", "", "", "not null");
     }
     
     return true;
index 43017a15ecbacb13f9a24be645cee1cb6fa691a6..56e22d4d337821f61dbee0c729902565e1999265 100644 (file)
@@ -47,7 +47,7 @@ CREATE TABLE `prefix_quiz` (
 CREATE TABLE `prefix_quiz_answers` (
   `id` int(10) unsigned NOT NULL auto_increment,
   `question` int(10) unsigned NOT NULL default '0',
-  `answer` text NOT NULL default '',
+  `answer` varchar(255) NOT NULL default '',
   `fraction` varchar(10) NOT NULL default '0.0',
   `feedback` text NOT NULL,
   PRIMARY KEY  (`id`),
@@ -318,7 +318,7 @@ CREATE TABLE `prefix_quiz_responses` (
   `id` int(10) unsigned NOT NULL auto_increment,
   `attempt` int(10) unsigned NOT NULL default '0',
   `question` int(10) unsigned NOT NULL default '0',
-  `answer` varchar(255) NOT NULL default '',
+  `answer` text NOT NULL default '',
   `grade` varchar(10) NOT NULL default '0.0',
   PRIMARY KEY  (`id`),
   KEY `attempt` (`attempt`),
index dba8d9e7423e36a3788e0a0a62c99fc22437bd09..0d304d11c9ab18b3d5839b7d66e0a7cc481586c2 100644 (file)
@@ -225,8 +225,8 @@ function quiz_upgrade($oldversion) {
         modify_database ( "", "COMMIT;");
     }
 
-    if ($oldversion < 2004101700) {
-        table_column("quiz_answers", "answer", "answer", "text", "", "", "", "not null");
+    if ($oldversion < 2004111400) {
+        table_column("quiz_responses", "answer", "answer", "text", "", "", "", "not null");
     }
     
     return true;
index 63c15cb1ab6c377351f9aa78f6acd526a02c91c2..6c622bb6658227c3aa8b88f11d9f30670d2d432b 100644 (file)
@@ -46,7 +46,7 @@ CREATE TABLE prefix_quiz (
 CREATE TABLE prefix_quiz_answers (
   id SERIAL PRIMARY KEY,
   question integer NOT NULL default '0',
-  answer text NOT NULL default '',
+  answer varchar(255) NOT NULL default '',
   fraction varchar(10) NOT NULL default '0.0',
   feedback text NOT NULL default ''
 );
@@ -211,7 +211,7 @@ CREATE TABLE prefix_quiz_responses (
   id SERIAL PRIMARY KEY,
   attempt integer NOT NULL default '0',
   question integer NOT NULL default '0',
-  answer varchar(255) NOT NULL default '',
+  answer text NOT NULL default '',
   grade varchar(10) NOT NULL default '0.0'
 );
 # --------------------------------------------------------
index 59a29d30426104432233a5e7ccb733011ae3a62c..e57d76c4fc74b4d6148bcdc059dd9886c81f4bd7 100644 (file)
@@ -5,7 +5,7 @@
 //  This fragment is called by moodle_needs_upgrading() and /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2004101700;   // The (date) version of this module
+$module->version  = 2004111400;   // The (date) version of this module
 $module->requires = 2004091700;   // Requires this Moodle version
 $module->cron     = 0;            // How often should cron check this module (seconds)?