2001-11-22 06:23:56 +00:00
|
|
|
<?PHP // $Id$
|
|
|
|
|
2004-08-16 15:41:57 +00:00
|
|
|
/// Check that config.php exists, if not then call the install script
|
2003-01-13 14:05:29 +00:00
|
|
|
if (!file_exists("../config.php")) {
|
2004-08-16 15:41:57 +00:00
|
|
|
header('Location: ../install.php');
|
2003-01-13 14:05:29 +00:00
|
|
|
die;
|
|
|
|
}
|
|
|
|
|
2003-01-05 14:19:20 +00:00
|
|
|
require_once("../config.php");
|
2004-08-19 09:38:20 +00:00
|
|
|
include_once("$CFG->dirroot/lib/adminlib.php"); // Contains various admin-only functions
|
2001-11-22 06:23:56 +00:00
|
|
|
|
|
|
|
|
2002-09-19 12:01:55 +00:00
|
|
|
/// Check that PHP is of a sufficient version
|
|
|
|
|
2003-01-13 14:05:29 +00:00
|
|
|
if (!check_php_version("4.1.0")) {
|
2002-09-19 12:01:55 +00:00
|
|
|
$version = phpversion();
|
|
|
|
print_heading("Sorry, Moodle requires PHP 4.1.0 or later (currently using version $version)");
|
|
|
|
die;
|
|
|
|
}
|
|
|
|
|
2004-04-15 14:46:54 +00:00
|
|
|
|
2003-01-28 02:52:13 +00:00
|
|
|
/// Check some PHP server settings
|
|
|
|
|
|
|
|
$documentationlink = "please read the <A HREF=\"../doc/?frame=install.html&sub=webserver\">install documentation</A>";
|
|
|
|
|
2003-05-17 02:05:10 +00:00
|
|
|
if (ini_get_bool('session.auto_start')) {
|
|
|
|
error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
|
2003-01-28 02:52:13 +00:00
|
|
|
}
|
2003-05-17 02:05:10 +00:00
|
|
|
|
|
|
|
if (ini_get_bool('magic_quotes_runtime')) {
|
2003-01-28 02:52:13 +00:00
|
|
|
error("The PHP server variable 'magic_quotes_runtime' should be Off - $documentationlink");
|
|
|
|
}
|
|
|
|
|
2003-05-17 02:05:10 +00:00
|
|
|
if (!ini_get_bool('file_uploads')) {
|
|
|
|
error("The PHP server variable 'file_uploads' is not turned On - $documentationlink");
|
2003-01-28 02:52:13 +00:00
|
|
|
}
|
|
|
|
|
2003-05-17 02:05:10 +00:00
|
|
|
|
2002-09-19 12:01:55 +00:00
|
|
|
/// Check that config.php has been edited
|
|
|
|
|
2002-05-27 13:02:48 +00:00
|
|
|
if ($CFG->wwwroot == "http://example.com/moodle") {
|
2001-11-22 06:23:56 +00:00
|
|
|
error("Moodle has not been configured yet. You need to to edit config.php first.");
|
|
|
|
}
|
|
|
|
|
2003-01-13 14:05:29 +00:00
|
|
|
|
|
|
|
/// Check settings in config.php
|
|
|
|
|
2003-12-05 03:10:45 +00:00
|
|
|
$dirroot = dirname(realpath("../index.php"));
|
2003-06-03 03:00:37 +00:00
|
|
|
if (!empty($dirroot) and $dirroot != $CFG->dirroot) {
|
2003-01-13 14:05:29 +00:00
|
|
|
error("Please fix your settings in config.php:
|
|
|
|
<P>You have:
|
2003-01-18 14:24:40 +00:00
|
|
|
<P>\$CFG->dirroot = \"".addslashes($CFG->dirroot)."\";
|
2003-01-13 14:05:29 +00:00
|
|
|
<P>but it should be:
|
2003-01-18 14:24:40 +00:00
|
|
|
<P>\$CFG->dirroot = \"".addslashes($dirroot)."\";",
|
|
|
|
"./");
|
2003-01-13 14:05:29 +00:00
|
|
|
}
|
|
|
|
|
2003-05-26 14:38:41 +00:00
|
|
|
/// Set some necessary variables during set-up to avoid PHP warnings later on this page
|
|
|
|
if (!isset($CFG->framename)) {
|
|
|
|
$CFG->framename = "_top";
|
|
|
|
}
|
|
|
|
if (!isset($CFG->release)) {
|
|
|
|
$CFG->release = "";
|
|
|
|
}
|
|
|
|
if (!isset($CFG->version)) {
|
|
|
|
$CFG->version = "";
|
|
|
|
}
|
|
|
|
|
2003-12-08 06:11:56 +00:00
|
|
|
/// Turn off time limits, sometimes upgrades can be slow.
|
2003-05-26 14:38:41 +00:00
|
|
|
|
2004-05-18 14:12:21 +00:00
|
|
|
@set_time_limit(0);
|
2003-01-13 14:05:29 +00:00
|
|
|
|
2002-12-24 05:39:45 +00:00
|
|
|
/// Check if the main tables have been installed yet or not.
|
|
|
|
|
|
|
|
if (! $tables = $db->Metatables() ) { // No tables yet at all.
|
|
|
|
$maintables = false;
|
|
|
|
|
|
|
|
} else { // Check for missing main tables
|
|
|
|
$maintables = true;
|
|
|
|
$mtables = array("config", "course", "course_categories", "course_modules",
|
|
|
|
"course_sections", "log", "log_display", "modules",
|
|
|
|
"user", "user_admins", "user_students", "user_teachers");
|
|
|
|
foreach ($mtables as $mtable) {
|
|
|
|
if (!in_array($CFG->prefix.$mtable, $tables)) {
|
|
|
|
$maintables = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2002-08-17 08:38:43 +00:00
|
|
|
|
2002-12-24 05:39:45 +00:00
|
|
|
if (! $maintables) {
|
2003-05-26 14:38:41 +00:00
|
|
|
if (empty($agreelicence)) {
|
2002-08-17 08:38:43 +00:00
|
|
|
$strlicense = get_string("license");
|
2003-05-19 13:12:27 +00:00
|
|
|
print_header($strlicense, $strlicense, $strlicense, "", "", false, " ", " ");
|
2003-05-06 15:58:20 +00:00
|
|
|
print_heading("<A HREF=\"http://moodle.org\">Moodle</A> - Modular Object-Oriented Dynamic Learning Environment");
|
2002-08-17 08:38:43 +00:00
|
|
|
print_heading(get_string("copyrightnotice"));
|
2003-05-06 15:58:20 +00:00
|
|
|
print_simple_box_start("center");
|
2002-08-17 08:38:43 +00:00
|
|
|
echo text_to_html(get_string("gpl"));
|
|
|
|
print_simple_box_end();
|
2003-05-26 14:38:41 +00:00
|
|
|
echo "<br />";
|
2002-08-17 08:38:43 +00:00
|
|
|
notice_yesno(get_string("doyouagree"), "index.php?agreelicence=true",
|
2003-05-26 14:38:41 +00:00
|
|
|
"http://moodle.org/doc/?frame=licence.html");
|
2002-08-17 08:38:43 +00:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2002-08-15 05:44:37 +00:00
|
|
|
$strdatabasesetup = get_string("databasesetup");
|
|
|
|
$strdatabasesuccess = get_string("databasesuccess");
|
2003-05-19 13:12:27 +00:00
|
|
|
print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup, "", "", false, " ", " ");
|
2002-05-27 13:02:48 +00:00
|
|
|
if (file_exists("$CFG->libdir/db/$CFG->dbtype.sql")) {
|
2002-07-31 14:19:35 +00:00
|
|
|
$db->debug = true;
|
2002-05-27 13:02:48 +00:00
|
|
|
if (modify_database("$CFG->libdir/db/$CFG->dbtype.sql")) {
|
2002-07-31 14:19:35 +00:00
|
|
|
$db->debug = false;
|
2002-12-23 14:19:45 +00:00
|
|
|
notify($strdatabasesuccess, "green");
|
2002-05-27 13:02:48 +00:00
|
|
|
} else {
|
2002-07-31 14:19:35 +00:00
|
|
|
$db->debug = false;
|
2002-05-27 13:02:48 +00:00
|
|
|
error("Error: Main databases NOT set up successfully");
|
|
|
|
}
|
2001-11-22 06:23:56 +00:00
|
|
|
} else {
|
2002-08-15 05:44:37 +00:00
|
|
|
error("Error: Your database ($CFG->dbtype) is not yet fully supported by Moodle. See the lib/db directory.");
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
2002-08-15 05:44:37 +00:00
|
|
|
print_continue("index.php");
|
2001-11-22 06:23:56 +00:00
|
|
|
die;
|
|
|
|
}
|
|
|
|
|
2004-07-29 18:44:57 +00:00
|
|
|
|
2002-09-19 12:01:55 +00:00
|
|
|
/// Check version of Moodle code on disk compared with database
|
|
|
|
/// and upgrade if possible.
|
2002-07-27 13:09:08 +00:00
|
|
|
|
2002-10-05 17:09:31 +00:00
|
|
|
include_once("$CFG->dirroot/version.php"); # defines $version
|
|
|
|
include_once("$CFG->dirroot/lib/db/$CFG->dbtype.php"); # defines upgrades
|
2002-07-27 13:09:08 +00:00
|
|
|
|
2004-09-04 15:47:30 +00:00
|
|
|
$stradministration = get_string("administration");
|
|
|
|
|
2002-09-19 12:01:55 +00:00
|
|
|
if ($CFG->version) {
|
|
|
|
if ($version > $CFG->version) { // upgrade
|
2004-09-04 15:47:30 +00:00
|
|
|
|
|
|
|
$a->oldversion = "$CFG->release ($CFG->version)";
|
|
|
|
$a->newversion = "$release ($version)";
|
2002-08-15 05:44:37 +00:00
|
|
|
$strdatabasechecking = get_string("databasechecking", "", $a);
|
2004-09-04 15:47:30 +00:00
|
|
|
|
|
|
|
if (empty($_GET['confirmupgrade'])) {
|
|
|
|
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
|
|
|
|
"", "", false, " ", " ");
|
|
|
|
notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=yes', 'index.php');
|
|
|
|
exit;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$strdatabasesuccess = get_string("databasesuccess");
|
|
|
|
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
|
|
|
|
"", "", false, " ", " ");
|
|
|
|
print_heading($strdatabasechecking);
|
|
|
|
$db->debug=true;
|
|
|
|
if (main_upgrade($CFG->version)) {
|
|
|
|
$db->debug=false;
|
|
|
|
if (set_config("version", $version)) {
|
|
|
|
notify($strdatabasesuccess, "green");
|
|
|
|
print_continue("index.php");
|
|
|
|
exit;
|
|
|
|
} else {
|
|
|
|
notify("Upgrade failed! (Could not update version in config table)");
|
|
|
|
}
|
2002-07-27 13:09:08 +00:00
|
|
|
} else {
|
2004-09-04 15:47:30 +00:00
|
|
|
$db->debug=false;
|
|
|
|
notify("Upgrade failed! See /version.php");
|
2002-07-27 13:09:08 +00:00
|
|
|
}
|
|
|
|
}
|
2002-09-19 12:01:55 +00:00
|
|
|
} else if ($version < $CFG->version) {
|
2002-07-27 13:09:08 +00:00
|
|
|
notify("WARNING!!! The code you are using is OLDER than the version that made these databases!");
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
2003-05-06 15:58:20 +00:00
|
|
|
$strcurrentversion = get_string("currentversion");
|
2004-09-04 15:47:30 +00:00
|
|
|
print_header($strcurrentversion, $stradministration, $strcurrentversion,
|
2003-05-19 13:12:27 +00:00
|
|
|
"", "", false, " ", " ");
|
2002-09-27 06:13:59 +00:00
|
|
|
|
|
|
|
if (set_config("version", $version)) {
|
2004-09-04 15:47:30 +00:00
|
|
|
print_heading("Moodle $release ($version)");
|
2002-08-15 05:44:37 +00:00
|
|
|
print_continue("index.php");
|
2002-07-27 13:09:08 +00:00
|
|
|
die;
|
|
|
|
} else {
|
2002-07-31 14:19:35 +00:00
|
|
|
$db->debug=true;
|
2002-10-23 04:10:10 +00:00
|
|
|
if (main_upgrade(0)) {
|
2002-08-15 05:44:37 +00:00
|
|
|
print_continue("index.php");
|
2002-07-29 15:09:16 +00:00
|
|
|
} else {
|
|
|
|
error("A problem occurred inserting current version into databases");
|
|
|
|
}
|
2002-07-31 14:19:35 +00:00
|
|
|
$db->debug=false;
|
2002-07-27 13:09:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-09-04 15:47:30 +00:00
|
|
|
|
2002-09-19 12:01:55 +00:00
|
|
|
/// Updated human-readable release version if necessary
|
2002-09-06 14:06:48 +00:00
|
|
|
|
2002-09-27 06:13:59 +00:00
|
|
|
if ($release <> $CFG->release) { // Update the release version
|
2003-05-06 15:58:20 +00:00
|
|
|
$strcurrentrelease = get_string("currentrelease");
|
2003-05-19 13:12:27 +00:00
|
|
|
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, " ", " ");
|
2003-05-29 03:24:50 +00:00
|
|
|
print_heading("Moodle $release");
|
2002-09-27 06:13:59 +00:00
|
|
|
if (!set_config("release", $release)) {
|
|
|
|
notify("ERROR: Could not update release version in database!!");
|
2002-09-06 14:06:48 +00:00
|
|
|
}
|
2002-09-27 06:13:59 +00:00
|
|
|
print_continue("index.php");
|
|
|
|
print_simple_box_start("CENTER");
|
2002-12-29 17:32:32 +00:00
|
|
|
include("$CFG->dirroot/lang/en/docs/release.html");
|
2002-09-27 06:13:59 +00:00
|
|
|
print_simple_box_end();
|
|
|
|
print_continue("index.php");
|
|
|
|
exit;
|
2002-09-06 14:06:48 +00:00
|
|
|
}
|
2004-07-29 18:01:32 +00:00
|
|
|
|
|
|
|
|
2004-09-04 15:47:30 +00:00
|
|
|
|
|
|
|
/// Insert default values for any important configuration variables
|
|
|
|
|
|
|
|
include_once("$CFG->dirroot/lib/defaults.php");
|
|
|
|
|
|
|
|
foreach ($defaults as $name => $value) {
|
|
|
|
if (!isset($CFG->$name)) {
|
|
|
|
$CFG->$name = $value;
|
|
|
|
set_config($name, $value);
|
|
|
|
$configchange = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// If any new configurations were found then send to the config page to check
|
|
|
|
|
|
|
|
if (!empty($configchange)) {
|
|
|
|
redirect("config.php");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-08-01 13:59:17 +00:00
|
|
|
/// Upgrade backup/restore system if necessary
|
|
|
|
require_once("$CFG->dirroot/backup/lib.php");
|
|
|
|
upgrade_backup_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
|
|
|
|
|
2004-04-18 23:20:53 +00:00
|
|
|
/// Upgrade blocks system if necessary
|
|
|
|
require_once("$CFG->dirroot/lib/blocklib.php");
|
|
|
|
upgrade_blocks_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
|
|
|
|
|
|
|
|
/// Check all blocks and load (or upgrade them if necessary)
|
|
|
|
upgrade_blocks_plugins("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
|
2004-01-28 04:26:58 +00:00
|
|
|
|
2004-08-19 09:38:20 +00:00
|
|
|
/// Check all enrolment plugins and upgrade if necessary
|
|
|
|
upgrade_enrol_plugins("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2004-08-19 09:38:20 +00:00
|
|
|
/// Find and check all main modules and load them up or upgrade them if necessary
|
|
|
|
upgrade_activity_modules("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2001-12-04 14:02:36 +00:00
|
|
|
|
2002-09-19 12:01:55 +00:00
|
|
|
|
|
|
|
/// Set up the overall site name etc.
|
2002-07-11 05:30:10 +00:00
|
|
|
if (! $site = get_site()) {
|
2002-10-25 02:02:02 +00:00
|
|
|
redirect("site.php");
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
|
2002-09-19 12:01:55 +00:00
|
|
|
/// Set up the admin user
|
2002-12-20 14:44:14 +00:00
|
|
|
if (! record_exists("user_admins")) { // No admin user yet
|
2002-10-25 02:02:02 +00:00
|
|
|
redirect("user.php");
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Check for valid admin user
|
2004-03-22 01:58:40 +00:00
|
|
|
require_login();
|
|
|
|
|
2003-08-10 08:01:14 +00:00
|
|
|
if (!isadmin()) {
|
|
|
|
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-09-19 12:01:55 +00:00
|
|
|
/// At this point everything is set up and the user is an admin, so print menu
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2002-08-03 08:16:31 +00:00
|
|
|
$stradministration = get_string("administration");
|
2003-08-10 08:01:14 +00:00
|
|
|
print_header("$site->shortname: $stradministration","$site->fullname", "$stradministration");
|
2003-08-22 13:46:21 +00:00
|
|
|
print_simple_box_start("center", "100%", "$THEME->cellcontent2", 20);
|
2003-08-10 08:01:14 +00:00
|
|
|
print_heading($stradministration);
|
|
|
|
|
2004-02-05 09:55:50 +00:00
|
|
|
if (!empty($CFG->upgrade)) { // Print notice about extra upgrading that needs to be done
|
|
|
|
print_simple_box(get_string("upgrade$CFG->upgrade", "admin",
|
|
|
|
"$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"), "center");
|
|
|
|
print_spacer(10,10);
|
|
|
|
}
|
|
|
|
|
2003-08-22 14:03:40 +00:00
|
|
|
$table->tablealign = "right";
|
2003-08-10 08:01:14 +00:00
|
|
|
$table->align = array ("right", "left");
|
2003-08-22 13:46:21 +00:00
|
|
|
$table->wrap = array ("nowrap", "nowrap");
|
2003-08-18 16:40:27 +00:00
|
|
|
$table->cellpadding = 4;
|
|
|
|
$table->cellspacing = 3;
|
2003-08-22 14:03:40 +00:00
|
|
|
$table->width = "40%";
|
2003-08-18 16:40:27 +00:00
|
|
|
|
2003-08-22 14:03:40 +00:00
|
|
|
$configdata = "<font size=+1> </font><a href=\"config.php\">".get_string("configvariables")."</a> - <font size=1>".
|
2003-08-18 16:40:27 +00:00
|
|
|
get_string("adminhelpconfigvariables")."</font><br />";
|
2003-08-22 14:03:40 +00:00
|
|
|
$configdata .= "<font size=+1> </font><a href=\"site.php\">".get_string("sitesettings")."</a> - <font size=1>".
|
2003-08-18 16:40:27 +00:00
|
|
|
get_string("adminhelpsitesettings")."</font><br />";
|
2003-08-22 14:03:40 +00:00
|
|
|
$configdata .= "<font size=+1> </font><a href=\"../theme/index.php\">".get_string("themes")."</a> - <font size=1>".
|
2003-08-18 16:40:27 +00:00
|
|
|
get_string("adminhelpthemes")."</font><br />";
|
2003-08-22 14:03:40 +00:00
|
|
|
$configdata .= "<font size=+1> </font><a href=\"lang.php\">".get_string("language")."</a> - <font size=1>".
|
2003-08-18 16:40:27 +00:00
|
|
|
get_string("adminhelplanguage")."</font><br />";
|
2003-08-22 14:03:40 +00:00
|
|
|
$configdata .= "<font size=+1> </font><a href=\"modules.php\">".get_string("managemodules")."</a> - <font size=1>".
|
2003-08-18 16:40:27 +00:00
|
|
|
get_string("adminhelpmanagemodules")."</font><br />";
|
2004-04-18 23:20:53 +00:00
|
|
|
$configdata .= "<font size=+1> </font><a href=\"blocks.php\">".get_string("manageblocks")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpmanageblocks")."</font><br />";
|
2004-02-22 12:17:27 +00:00
|
|
|
$configdata .= "<font size=+1> </font><a href=\"filters.php\">".get_string("managefilters")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpmanagefilters")."</font><br />";
|
2004-02-08 14:24:44 +00:00
|
|
|
if (!isset($CFG->disablescheduledbackups)) {
|
|
|
|
$configdata .= "<font size=+1> </font><a href=\"backup.php\">".get_string("backup")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpbackup")."</font><br />";
|
|
|
|
}
|
2004-08-21 10:12:09 +00:00
|
|
|
$configdata .= "<font size=+1> </font><a href=\"editor.php\">". get_string("editorsettings") ."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpeditorsettings")."</font><br />";
|
2003-08-18 16:40:27 +00:00
|
|
|
|
2003-08-22 14:03:40 +00:00
|
|
|
$table->data[] = array("<font size=+1><b><a href=\"configure.php\">".get_string("configuration")."</a></b>",
|
|
|
|
$configdata);
|
2003-08-18 16:40:27 +00:00
|
|
|
|
|
|
|
|
2003-08-22 14:03:40 +00:00
|
|
|
$userdata = "<font size=+1> </font><a href=\"auth.php\">".get_string("authentication")."</a> - <font size=1>".
|
2003-08-18 16:40:27 +00:00
|
|
|
get_string("adminhelpauthentication")."</font><br />";
|
2004-07-25 14:14:56 +00:00
|
|
|
$userdata .= "<font size=+1> </font><a href=\"user.php\">".get_string("edituser")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpedituser")."</font><br />";
|
2004-08-16 15:41:57 +00:00
|
|
|
$userdata .= "<font size=+1> </font><a href=\"$CFG->wwwroot/$CFG->admin/user.php?newuser=true\">".
|
|
|
|
get_string("addnewuser")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpaddnewuser")."</font><br />";
|
|
|
|
$userdata .= "<font size=+1> </font><a href=\"$CFG->wwwroot/$CFG->admin/uploaduser.php\">".
|
|
|
|
get_string("uploadusers")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpuploadusers")."</font><br />";
|
2004-07-25 14:14:56 +00:00
|
|
|
|
|
|
|
$userdata .= "<hr><font size=+1> </font><a href=\"enrol.php\">".get_string("enrolments")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpenrolments")."</font><br />";
|
|
|
|
$userdata .= "<font size=+1> </font><a href=\"../course/index.php?edit=off\">".get_string("assignstudents")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpassignstudents")."</font><br />";
|
|
|
|
|
2003-08-22 14:03:40 +00:00
|
|
|
$userdata .= "<font size=+1> </font><a href=\"../course/index.php?edit=on\">".get_string("assignteachers")."</a> - <font size=1>".
|
2003-08-18 16:40:27 +00:00
|
|
|
get_string("adminhelpassignteachers").
|
2003-08-22 13:42:27 +00:00
|
|
|
" <img src=\"../pix/t/user.gif\" height=11 width=11></font><br />";
|
2004-07-25 14:14:56 +00:00
|
|
|
$userdata .= "<font size=+1> </font><a href=\"creators.php\">".get_string("assigncreators")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpassigncreators")."</font><br />";
|
|
|
|
$userdata .= "<font size=+1> </font><a href=\"admin.php\">".get_string("assignadmins")."</a> - <font size=1>".
|
|
|
|
get_string("adminhelpassignadmins")."</font><br />";
|
2003-08-18 16:40:27 +00:00
|
|
|
|
2003-08-22 14:03:40 +00:00
|
|
|
$table->data[] = array("<font size=+1><b><a href=\"users.php\">".get_string("users")."</a></b>", $userdata);
|
2003-08-18 16:40:27 +00:00
|
|
|
|
2003-08-22 14:03:40 +00:00
|
|
|
$table->data[] = array("<font size=+1><b><a href=\"../course/index.php?edit=on\">".get_string("courses")."</a></b>",
|
|
|
|
"<font size=+1> </font>".get_string("adminhelpcourses"));
|
2003-09-14 18:56:45 +00:00
|
|
|
$table->data[] = array("<font size=+1><b><a href=\"../course/log.php?id=$site->id\">".get_string("logs")."</a></b>",
|
2003-08-22 14:03:40 +00:00
|
|
|
"<font size=+1> </font>".get_string("adminhelplogs"));
|
|
|
|
$table->data[] = array("<font size=+1><b><a href=\"../files/index.php?id=$site->id\">".get_string("sitefiles")."</a></b>",
|
|
|
|
"<font size=+1> </font>".get_string("adminhelpsitefiles"));
|
2003-10-19 05:19:14 +00:00
|
|
|
if (file_exists("$CFG->dirroot/$CFG->admin/$CFG->dbtype")) {
|
2003-08-22 14:03:40 +00:00
|
|
|
$table->data[] = array("<font size=+1><b><a href=\"$CFG->dbtype/frame.php\">".get_string("managedatabase")."</a></b>",
|
|
|
|
"<font size=+1> </font>".get_string("adminhelpmanagedatabase"));
|
2003-08-10 08:01:14 +00:00
|
|
|
}
|
|
|
|
|
2002-08-03 04:44:35 +00:00
|
|
|
print_table($table);
|
2003-08-10 08:01:14 +00:00
|
|
|
|
2003-08-10 09:12:17 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO REMOVE OR MODIFY THE COPYRIGHT NOTICE BELOW ////
|
2003-08-10 08:01:14 +00:00
|
|
|
$copyrighttext = "<a href=\"http://moodle.org/\">Moodle</a> ".
|
|
|
|
"<a href=\"../doc/?frame=release.html\">$CFG->release</a> ($CFG->version)<br />".
|
2004-03-10 13:23:00 +00:00
|
|
|
"Copyright © 1999-2004 Martin Dougiamas<br />".
|
2003-08-10 09:12:17 +00:00
|
|
|
"<a href=\"../doc/?frame=licence.html\">GNU Public License</a>";
|
2003-08-10 08:01:14 +00:00
|
|
|
echo "<center><p><font size=1>$copyrighttext</font></p></center>";
|
2003-08-10 09:12:17 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////////////
|
2003-08-10 08:01:14 +00:00
|
|
|
|
2003-05-12 11:30:19 +00:00
|
|
|
|
2003-08-10 08:01:14 +00:00
|
|
|
echo "<table border=0 align=center width=100%><tr>";
|
2003-08-25 14:56:46 +00:00
|
|
|
echo "<td align=center width=33%>";
|
2003-01-06 08:23:13 +00:00
|
|
|
print_single_button("$CFG->wwwroot/doc", NULL, get_string("documentation"));
|
2003-08-10 08:01:14 +00:00
|
|
|
echo "</td>";
|
2003-01-06 08:23:13 +00:00
|
|
|
|
2003-08-25 14:56:46 +00:00
|
|
|
echo "<td align=center width=33%>";
|
|
|
|
print_single_button("phpinfo.php", NULL, get_string("phpinfo"));
|
|
|
|
echo "</td>";
|
|
|
|
|
|
|
|
echo "<td align=center width=33%>";
|
2003-05-12 11:30:19 +00:00
|
|
|
print_single_button("register.php", NULL, get_string("registration"));
|
2003-08-10 08:01:14 +00:00
|
|
|
echo "</td>";
|
|
|
|
echo "<tr></table>";
|
2003-05-12 11:30:19 +00:00
|
|
|
|
2003-08-10 08:01:14 +00:00
|
|
|
print_simple_box_end();
|
2002-09-27 06:19:18 +00:00
|
|
|
|
2002-10-10 07:26:10 +00:00
|
|
|
print_footer($site);
|
2002-09-19 12:01:55 +00:00
|
|
|
|
2001-11-22 06:23:56 +00:00
|
|
|
?>
|