mirror of
https://github.com/moodle/moodle.git
synced 2025-01-22 08:11:26 +01:00
958aafe2b4
record upon showing the quiz, and completing it upon submit. Two new fields in quiz_attempts... should be upgrade friendly. (Old attempts will show up as being of duration zero) Also some small fixes here and there.
21 lines
646 B
PHP
21 lines
646 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 < 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 ");
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
?>
|