Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Admin improvements

  • Loading branch information...
commit 1c1238c27412bd7d894baf9c7ff7d3af2c01f9be 1 parent bc89248
martin authored
Showing with 22 additions and 6 deletions.
  1. +22 −6 course/social.php
View
28 course/social.php
@@ -22,7 +22,7 @@
print_simple_box("People", $align="CENTER", $width="100%", $color="$THEME->cellheading");
$moddata[]="<A HREF=\"../user/index.php?id=$course->id\">Participants</A>";
$modicon[]="<IMG SRC=\"../user/users.gif\" HEIGHT=16 WIDTH=16 ALT=\"List of everyone\">";
- $moddata[]="<A HREF=\"../user/view.php?id=$USER->id&course=$course->id\">Edit my own info</A>";
+ $moddata[]="<A HREF=\"../user/view.php?id=$USER->id&course=$course->id\">Edit my profile</A>";
$modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"Me\">";
print_side_block("", $moddata, "", $modicon);
@@ -36,15 +36,31 @@
$readingdata[] = $reading;
$readingicon[] = "<IMG SRC=\"../mod/reading/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"Reading\">";
}
+ if ($USER->editing) {
+ $readingdata[] = "<A HREF=\"mod.php?id=$course->id&week=0&add=reading\">Add reading...</A>";
+ $readingicon[] = "&nbsp;";
+ }
}
print_side_block("", $readingdata, "", $readingicon);
if (isteacher($USER->id)) {
print_simple_box("Admin", $align="CENTER", $width="100%", $color="$THEME->cellheading");
- echo "<FONT SIZE=1>";
- echo "<LI>";
- print_editing_switch($course->id);
- echo "</FONT>";
+ $adminicon[]="<IMG SRC=\"../pix/i/edit.gif\" HEIGHT=16 WIDTH=16 ALT=\"Edit\">";
+ if ($USER->editing) {
+ $admindata[]="<A HREF=\"view.php?id=$course->id&edit=off\">Turn editing off</A>";
+ } else {
+ $admindata[]="<A HREF=\"view.php?id=$course->id&edit=on\">Turn editing on</A>";
+ }
+
+ $admindata[]="<A HREF=\"edit.php?id=$course->id\">Course settings...</A>";
+ $adminicon[]="<IMG SRC=\"../pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"Course\">";
+ $admindata[]="<A HREF=\"log.php?id=$course->id\">Logs...</A>";
+ $adminicon[]="<IMG SRC=\"../pix/i/log.gif\" HEIGHT=16 WIDTH=16 ALT=\"Log\">";
+ $admindata[]="<A HREF=\"../files/index.php?id=$course->id\">Files...</A>";
+ $adminicon[]="<IMG SRC=\"../files/pix/files.gif\" HEIGHT=16 WIDTH=16 ALT=\"Files\">";
+
+ print_side_block("", $admindata, "", $adminicon);
+
}
?>
@@ -62,7 +78,7 @@
} else {
$subtext = "Subscribe me by mail";
}
- $headertext = "<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR><TD>Discussion<TD ALIGN=RIGHT><FONT SIZE=1><A HREF=\"../mod/discuss/subscribe.php?id=$social->id\">$subtext</A></TD></TR></TABLE>";
+ $headertext = "<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR><TD>Discussion Topics<TD ALIGN=RIGHT><FONT SIZE=1><A HREF=\"../mod/discuss/subscribe.php?id=$social->id\">$subtext</A></TD></TR></TABLE>";
print_simple_box("$headertext", $align="CENTER", $width="100%", $color="$THEME->cellheading"); ?>
<IMG HEIGHT=7 SRC="../pix/spacer.gif"><BR>
Please sign in to comment.
Something went wrong with that request. Please try again.