moodle/mod/hotpot/db/postgres7.php
moodler df0fcc6f78 The initial installation is now properly handled.
Hot Potatoes is disabled by default in new installations.
2005-04-25 16:29:50 +00:00

27 lines
521 B
PHP

<?PHP
function hotpot_upgrade($oldversion) {
$ok = true;
// update from HotPot v1 to HotPot v2
if ($oldversion < 2005031400) {
$ok = $ok && hotpot_get_update_to_v2();
$ok = $ok && hotpot_update_to_v2_from_v1();
}
return $ok;
}
function hotpot_get_update_to_v2() {
global $CFG;
$filepath = "$CFG->dirroot/mod/hotpot/db/update_to_v2.php";
if (file_exists($filepath) && is_readable($filepath)) {
include_once $filepath;
$ok = true;
} else {
$ok = false;
}
return $ok;
}
?>