From 20cad2b64f492bd40284bebabf8b412b6f8408f8 Mon Sep 17 00:00:00 2001 From: martin Date: Sun, 28 Jul 2002 16:35:34 +0000 Subject: [PATCH] Fixed bug where admin controls would be shown to teachers in edit-mode (thanks dopey) --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index c455013755..b62f76cff1 100644 --- a/index.php +++ b/index.php @@ -28,7 +28,7 @@ newsitems > 0 or $readings or $USER->editing) { + if ($site->newsitems > 0 or $readings or ($USER->editing and isadmin())) { print_simple_box(get_string("mainmenu"), $align="CENTER", $width="100%", $color="$THEME->cellheading"); @@ -45,7 +45,7 @@ echo "
  • $reading"; } } - if ($USER->editing) { + if ($USER->editing and isadmin()) { echo "

    wwwroot/course/mod.php?id=$site->id§ion=0&add=reading\">". get_string("addreading", "reading")."...

    "; } else { @@ -99,7 +99,7 @@ editing) { + if ($USER->editing and isadmin()) { $site->summary .= "
    "; } print_simple_box($site->summary, "", "100%", $THEME->cellheading); -- 2.39.5