mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
Changes to add login/logout button to the right-hand top corner of every page
... this is to help encourage people to log out after a session, especially on shared or public terminals.
This commit is contained in:
parent
17e5f694a0
commit
4efeb8c3e3
2 changed files with 14 additions and 2 deletions
|
@ -26,6 +26,14 @@ function print_header ($title="", $heading="", $navigation="", $focus="", $meta=
|
|||
} else {
|
||||
$styles = "$CFG->wwwroot/theme/standard/styles.css";
|
||||
}
|
||||
|
||||
if (!$button and $navigation) {
|
||||
if (isset($USER->id)) {
|
||||
$button = "<FONT SIZE=2><A HREF=\"$CFG->wwwroot/login/logout.php\">".get_string("logout")."</A></FONT>";
|
||||
} else {
|
||||
$button = "<FONT SIZE=2><A HREF=\"$CFG->wwwroot/login\">".get_string("login")."</A></FONT>";
|
||||
}
|
||||
}
|
||||
|
||||
if (!$cache) { // Do everything we can to prevent clients and proxies caching
|
||||
@header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue