Skip to content

Commit

Permalink
Cleanups for footer on home page
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Aug 15, 2002
1 parent 11c6da5 commit d82c854
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 1 addition & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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") ?>

12 changes: 10 additions & 2 deletions lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit d82c854

Please sign in to comment.