Skip to content
Browse files

Fixed bug where admin controls would be shown to teachers in edit-mod…

…e (thanks dopey)
  • Loading branch information...
1 parent fc89096 commit 20cad2b64f492bd40284bebabf8b412b6f8408f8 martin committed Jul 28, 2002
Showing with 3 additions and 3 deletions.
  1. +3 −3 index.php
View
6 index.php
@@ -28,7 +28,7 @@
<TD VALIGN="TOP" NOWRAP>
<? $readings = list_all_readings();
- if ($site->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 "<LI>$reading";
}
}
- if ($USER->editing) {
+ if ($USER->editing and isadmin()) {
echo "<P align=right><A HREF=\"$CFG->wwwroot/course/mod.php?id=$site->id&section=0&add=reading\">".
get_string("addreading", "reading")."</A>...</P>";
} else {
@@ -99,7 +99,7 @@
</TD>
<TD WIDTH="30%" VALIGN="TOP">
<?
- if ($USER->editing) {
+ if ($USER->editing and isadmin()) {
$site->summary .= "<BR><CENTER><A HREF=\"admin/site.php\"><IMG SRC=\"pix/i/edit.gif\" BORDER=0></A>";
}
print_simple_box($site->summary, "", "100%", $THEME->cellheading);

0 comments on commit 20cad2b

Please sign in to comment.
Something went wrong with that request. Please try again.