This commit is contained in:
moodler 2004-10-17 04:08:32 +00:00
parent 5df6740bd3
commit 193ba8e7c4
5 changed files with 11 additions and 3 deletions

View file

@ -266,6 +266,10 @@ function quiz_upgrade($oldversion) {
KEY `question` (`question`) KEY `question` (`question`)
) TYPE=MyISAM COMMENT='Options for questions of type calculated'; "); ) TYPE=MyISAM COMMENT='Options for questions of type calculated'; ");
} }
if ($oldversion < 2004101700) {
table_column("quiz_answers", "answer", "answer", "text", "", "", "", "not null");
}
return true; return true;
} }

View file

@ -47,7 +47,7 @@ CREATE TABLE `prefix_quiz` (
CREATE TABLE `prefix_quiz_answers` ( CREATE TABLE `prefix_quiz_answers` (
`id` int(10) unsigned NOT NULL auto_increment, `id` int(10) unsigned NOT NULL auto_increment,
`question` 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 '',
`fraction` varchar(10) NOT NULL default '0.0', `fraction` varchar(10) NOT NULL default '0.0',
`feedback` text NOT NULL, `feedback` text NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),

View file

@ -224,6 +224,10 @@ function quiz_upgrade($oldversion) {
modify_database ( "", "COMMIT;"); modify_database ( "", "COMMIT;");
} }
if ($oldversion < 2004101700) {
table_column("quiz_answers", "answer", "answer", "text", "", "", "", "not null");
}
return true; return true;
} }

View file

@ -46,7 +46,7 @@ CREATE TABLE prefix_quiz (
CREATE TABLE prefix_quiz_answers ( CREATE TABLE prefix_quiz_answers (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
question integer NOT NULL default '0', question integer NOT NULL default '0',
answer varchar(255) NOT NULL default '', answer text NOT NULL default '',
fraction varchar(10) NOT NULL default '0.0', fraction varchar(10) NOT NULL default '0.0',
feedback text NOT NULL default '' feedback text NOT NULL default ''
); );

View file

@ -5,7 +5,7 @@
// This fragment is called by moodle_needs_upgrading() and /admin/index.php // This fragment is called by moodle_needs_upgrading() and /admin/index.php
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004091700; // The (date) version of this module $module->version = 2004101700; // The (date) version of this module
$module->requires = 2004091700; // Requires this Moodle version $module->requires = 2004091700; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)? $module->cron = 0; // How often should cron check this module (seconds)?