moodle/mod/quiz/db/postgres7.php

23 lines
731 B
PHP
Raw Normal View History

<?PHP // $Id$
function quiz_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
global $CFG;
2003-01-01 13:17:27 +00:00
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", "10", "UNSIGNED", "0", "NOT NULL", "");
table_column("quiz_truefalse", "false", "falseanswer", "INTEGER", "10", "UNSIGNED", "0", "NOT NULL", "");
table_column("quiz_questions", "type", "qtype", "INTEGER", "10", "UNSIGNED", "0", "NOT NULL", "");
}
return true;
}
?>