mirror of
https://github.com/moodle/moodle.git
synced 2025-07-15 19:36:50 +02:00
46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?PHP //$Id$
|
|
//
|
|
// This file keeps track of upgrades to Moodle.
|
|
//
|
|
// Sometimes, changes between versions involve
|
|
// alterations to database structures and other
|
|
// major things that may break installations.
|
|
//
|
|
// The upgrade function in this file will attempt
|
|
// to perform all the necessary actions to upgrade
|
|
// your older installtion to the current version.
|
|
//
|
|
// If there's something it cannot do itself, it
|
|
// will tell you what you need to do.
|
|
//
|
|
// Versions are defined by /version.php
|
|
//
|
|
// This file is tailored to PostgreSQL 7
|
|
|
|
function main_upgrade($oldversion=0) {
|
|
|
|
if ($oldversion < 2003010101) {
|
|
delete_records("log_display", "module", "user");
|
|
$new->module = "user";
|
|
$new->action = "view";
|
|
$new->mtable = "user";
|
|
$new->field = "CONCAT(firstname,\" \",lastname)";
|
|
insert_record("log_display", $new);
|
|
|
|
delete_records("log_display", "module", "course");
|
|
$new->module = "course";
|
|
$new->action = "view";
|
|
$new->mtable = "course";
|
|
$new->field = "fullname";
|
|
insert_record("log_display", $new);
|
|
$new->action = "update";
|
|
insert_record("log_display", $new);
|
|
$new->action = "enrol";
|
|
insert_record("log_display", $new);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
?>
|