From: moodler Date: Sat, 3 May 2003 05:57:29 +0000 (+0000) Subject: Moved the "turn editing on" button and tidied some other things up a bit X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3565715c76466ae6a677c6463760739ac77c8899;p=moodle.git Moved the "turn editing on" button and tidied some other things up a bit --- diff --git a/index.php b/index.php index a74863a5d5..0d59bbab9e 100644 --- a/index.php +++ b/index.php @@ -14,13 +14,12 @@ if (moodle_needs_upgrading()) { redirect("$CFG->wwwroot/admin/index.php"); } - $headerbutton = update_course_icon($site->id); + } + + if (empty($USER->id)) { + $loginstring = "wwwroot/login/index.php\">".get_string("login").""; } else { - if (isset($USER->id)) { - $headerbutton = "wwwroot/login/logout.php\">".get_string("logout").""; - } else { - $headerbutton = "wwwroot/login/index.php\">".get_string("login").""; - } + $loginstring = "".user_login_string($site).""; } $currlang = current_language(); @@ -29,7 +28,7 @@ print_header("$site->fullname", "$site->fullname", "home", "", "summary))."\">", - true, "", "
$headerbutton$langmenu
"); + true, "", "
$loginstring$langmenu
"); $firstcolumn = false; // for now $side = 175; @@ -37,14 +36,14 @@ ?> - - +
+ id); - if ($site->newsitems > 0 or $sections[0]->sequence or isediting($site->id)) { + if ($site->newsitems > 0 or $sections[0]->sequence or isediting($site->id) or isadmin()) { - echo ""; + echo ""; } - echo ""; - echo ""; + echo ""; + echo ""; ?> - -
"; + echo ""; $firstcolumn=true; if ($sections[0]->sequence or isediting($site->id)) { @@ -53,6 +52,11 @@ $mods, $modnames, $modnamesused, true, $side, isediting($site->id)); } + if (isadmin()) { + echo "
".update_course_icon($site->id)."
"; + echo "
"; + } + if ($site->newsitems > 0 ) { $categories = get_categories(); if (count($categories) > 1) { @@ -67,15 +71,16 @@ if (iscreator()) { if (!$firstcolumn) { - echo "
"; $firstcolumn=true; + echo ""; + $firstcolumn=true; } print_admin_links($site->id, $side); } if ($firstcolumn) { - echo ""; + echo ""; if ($site->newsitems == 0 ) { print_heading_block(get_string("availablecourses")); @@ -99,11 +104,11 @@ } else { $subtext = get_string("subscribe", "forum"); } - $headertext = " - -
$newsforum->name - id\">$subtext -
"; + $headertext = " + +
$newsforum->name + id\">$subtext +
"; } else { $headertext = $newsforum->name; } @@ -112,20 +117,20 @@ forum_print_latest_discussions($newsforum->id, $site->newsitems); } - echo "
"; + echo ""; if (isediting($site->id)) { - $site->summary .= "
"; + $site->summary .= "
"; } print_simple_box($site->summary, "", "100%", $THEME->cellcontent2, 5, "siteinfo"); print_spacer(1,$side); - echo "
+ +