2002-12-15 02:41:07 +00:00
|
|
|
<?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` ");
|
|
|
|
}
|
|
|
|
|
2003-01-03 16:01:48 +00:00
|
|
|
if ($oldversion < 2003010301) {
|
2003-02-16 07:08:57 +00:00
|
|
|
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", "");
|
2003-01-03 16:01:48 +00:00
|
|
|
}
|
|
|
|
|
2002-12-15 02:41:07 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|