moodle/mod/quiz/db/postgres7.php
moodler 49220fa70c Various quiz changes. Most importantly is the new framework for importing
quiz questions.   Importing works but is still being tested.
2003-02-16 07:08:57 +00:00

23 lines
731 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", "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;
}
?>