$strdatabaseupgrades = get_string("databaseupgrades");
print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades);
if (insert_record("config", $dversion)) {
- notify("You are currently using Moodle version $version");
+ notify("You are currently using Moodle version $release ($version)");
print_continue("index.php");
die;
} else {
}
}
+ // Updated human-readable release version if necessary
+
+ if ($drelease = get_field("config", "value", "name", "release")) {
+ if ($release <> $drelease) { // Update the release version
+ set_field("config", "value", "$release", "name", "release");
+ }
+ } else {
+ $drelease->name = "release";
+ $drelease->value = $release;
+ insert_record("config", $drelease);
+ }
+
// Find and check all modules and load them up or upgrade them if necessary
if ($course) {
if ($course == "home") { // special case for site home page - please do not remove
if (!$dversion = get_field("config", "value", "name", "version")) {
- $dversion = "unknown!";
+ $dversion = "xxx";
}
- $homelink = "<P ALIGN=center><A TITLE=\"Version $dversion: Click to visit moodle.com\" HREF=\"http://moodle.com/\">";
+ if (!$drelease = get_field("config", "value", "name", "release")) {
+ $drelease = "xxx";
+ }
+ $homelink = "<P ALIGN=center><A TITLE=\"Moodle $drelease ($dversion)\" HREF=\"http://moodle.com/\">";
$homelink .= "<BR><IMG WIDTH=130 HEIGHT=19 SRC=\"pix/madewithmoodle2.gif\" BORDER=0></A></P>";
} else {
$homelink = "<A TARGET=_top HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>";
// Moodle installed, which can be compared against
// a previous version (see the "config" table).
//
-// To do this, visit the "admin" page.
+// To do this, visit the "admin" page or the site
+// home page while logged in as an admin.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// If there's something it cannot do itself, it
// will tell you what you need to do.
-$version = 2002090501;
+$version = 2002090501; // The current version is a date (YYYYMMDDXX) where
+ // XX is a number that increments during the day
+
+$release = "1.0.3.1"; // For humans only, not used for the upgrade process
function upgrade_moodle($oldversion=0) {