"<p><a href=\"teacher.php\">".get_string("assignteachers")."</a></p>".
"<p><a href=\"../course/delete.php\">".get_string("deletecourse")."</a></p>".
"<p><a href=\"../course/categories.php\">".get_string("categories")."</a></p>";
- if (!empty($CFG->backup_version)) {
- //MODIFY RELATIVE PATH TO backup.php
- $backup_path = "../backup/backup.php";
- //END MODIFY
- $table->data[0][1] .= "<p><a href=\"".$backup_path."\">".get_string("coursebackup")."</a></p>";
- }
+ $table->data[0][1] .= "<p><a href=\"../backup/backup.php\">".get_string("coursebackup")."</a></p>";
+ $table->data[0][1] .= "<p><a href=\"../files/index.php?id=$site->id\">".get_string("courserestore")."</a></p>";
if ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual") {
$table->data[0][2] = "<p><a href=\"user.php?newuser=true\">".get_string("addnewuser")."</a></p>";
}
function html_header($course, $wdir, $formfield=""){
+ global $CFG;
+
$strfiles = get_string("files");
if ($wdir == "/") {
- print_header("$course->shortname: $strfiles", "$course->fullname",
- "<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A>
- -> $strfiles", $formfield);
+ $fullnav = "$strfiles";
} else {
$dirs = explode("/", $wdir);
$numdirs = count($dirs);
$link .= "/".urlencode($dirs[$i]);
$navigation .= "<A HREF=\"index.php?id=$course->id&wdir=$link\">".$dirs[$i]."</A>";
}
+ $fullnav = "<a href=\"index.php?id=$course->id&wdir=/\">$strfiles</a> $navigation";
+ }
+ if (! $site = get_site()) {
+ error("Invalid site!");
+ }
+
+ if ($course->id == $site->id) {
+ print_header("$course->shortname: $strfiles", "$course->fullname",
+ "<a href=\"../$CFG->admin/index.php\">".get_string("administration").
+ "</a> -> $fullnav", $formfield);
+ } else {
print_header("$course->shortname: $strfiles", "$course->fullname",
- "<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A> ->
- <A HREF=\"index.php?id=$course->id&wdir=/\">$strfiles</A> $navigation", $formfield);
+ "<a href=\"../course/view.php?id=$course->id\">$course->shortname".
+ "</a> -> $fullnav", $formfield);
}
echo "<table border=0 align=center cellspacing=3 cellpadding=3 width=640>";
echo "<tr>";