Permalink
Browse files

Cleanups for footer on home page

  • Loading branch information...
1 parent 11c6da5 commit d82c85456b8bc13b1e66fde1d4564652bbd0ea5b martin committed Aug 15, 2002
Showing with 11 additions and 7 deletions.
  1. +1 −5 index.php
  2. +10 −2 lib/moodlelib.php
View
@@ -110,9 +110,5 @@
</TR>
</TABLE>
-<? include("$CFG->dirroot/theme/$CFG->theme/footer.html"); ?>
-
-<P ALIGN=center>
-<A WIDTH=85 HEIGHT=25 HREF="http://moodle.com/"><IMG SRC="pix/madewithmoodle.gif" BORDER=0></A>
-</P>
+<? print_footer("home") ?>
View
@@ -43,9 +43,17 @@ function print_footer ($course=NULL) {
global $USER, $CFG, $THEME;
if ($course) {
- $homelink = "<A TARGET=_top HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>";
+ if ($course == "home") { // special case for site home page
+ if (!$dversion = get_field("config", "value", "name", "version")) {
+ $dversion = "unknown!";
+ }
+ $homelink = "<P ALIGN=center><A TITLE=\"Version $dversion: Click to visit moodle.com\" HREF=\"http://moodle.com/\">";
+ $homelink .= "<IMG WIDTH=85 HEIGHT=25 SRC=\"pix/madewithmoodle.gif\" BORDER=0></A></P>";
+ } else {
+ $homelink = "<A TARGET=_top HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>";
+ }
} else {
- $homelink = "<A TARGET=_top HREF=\"$CFG->wwwroot\">Home</A>";
+ $homelink = "<A TARGET=_top HREF=\"$CFG->wwwroot\">".get_string("home")."</A>";
}
if ($USER->realuser) {
if ($realuser = get_record("user", "id", $USER->realuser)) {

0 comments on commit d82c854

Please sign in to comment.