moodle/mod/quiz/db/postgres7.php
moodler a2fe7cc0dc Changed three fields to avoid SQL problems with PostgreSQL etc:
quiz_truefalse:  true->trueanswer  and false->falseanswer
quiz_questions:  type->qtype
2003-01-03 16:01:48 +00:00

23 lines
713 B
PHP

<?PHP // $Id$
function quiz_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
global $CFG;
if ($oldversion < 2003010100) {
execute_sql(" ALTER TABLE {$CFG->prefix}quiz ADD review integer DEFAULT '0' NOT NULL AFTER `grademethod` ");
}
if ($oldversion < 2003010301) {
table_column("quiz_truefalse", "true", "trueanswer", "INTEGER", "UNSIGNED", "0", "NOT NULL", "");
table_column("quiz_truefalse", "false", "falseanswer", "INTEGER", "UNSIGNED", "0", "NOT NULL", "");
table_column("quiz_questions", "type", "qtype", "INTEGER", "UNSIGNED", "0", "NOT NULL", "");
}
return true;
}
?>