2002-10-05 17:20:24 +00:00
|
|
|
<?PHP // $Id$
|
|
|
|
|
|
|
|
function quiz_upgrade($oldversion) {
|
|
|
|
// This function does anything necessary to upgrade
|
|
|
|
// older versions to match current functionality
|
|
|
|
|
|
|
|
global $CFG;
|
|
|
|
|
2002-10-18 16:05:21 +00:00
|
|
|
if ($oldversion < 2002101800) {
|
|
|
|
execute_sql(" ALTER TABLE `quiz_attempts` ".
|
|
|
|
" ADD `timestart` INT(10) UNSIGNED DEFAULT '0' NOT NULL AFTER `sumgrades` , ".
|
|
|
|
" ADD `timefinish` INT(10) UNSIGNED DEFAULT '0' NOT NULL AFTER `timestart` ");
|
|
|
|
execute_sql(" UPDATE `quiz_attempts` SET timestart = timemodified ");
|
|
|
|
execute_sql(" UPDATE `quiz_attempts` SET timefinish = timemodified ");
|
2002-10-05 17:20:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|