Browse files

Altered buttons from index and view pages

  • Loading branch information...
1 parent 2b8cef8 commit 803b2c76061d6e5154fb411f14f3588d87cbc8ef martin committed Jul 27, 2002
Showing with 18 additions and 7 deletions.
  1. +2 −4 user/index.php
  2. +16 −3 user/view.php
View
6 user/index.php
@@ -54,7 +54,7 @@
function print_user($user, $course, $teacherlinks) {
- global $COUNTRIES;
+ global $USER, $COUNTRIES;
echo "<TABLE WIDTH=80% ALIGN=CENTER BORDER=0 CELLPADDING=1 CELLSPACING=1><TR><TD BGCOLOR=#888888>";
echo "<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR>";
@@ -80,13 +80,11 @@ function print_user($user, $course, $teacherlinks) {
if ($teacherlinks) {
$timemidnight = usergetmidnight(time());
echo "<A HREF=\"../course/user.php?id=$course->id&user=$user->id\">".get_string("activity")."</A><BR>";
- echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id&date=$timemidnight\">".get_string("todaylogs")."</A><BR>";
- echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id\">".get_string("alllogs")."</A><BR>";
echo "<A HREF=\"../course/unenrol.php?id=$course->id&user=$user->id\">".get_string("unenrol")."</A><BR>";
if (isstudent($course->id, $user->id)) {
echo "<A HREF=\"../course/loginas.php?id=$course->id&user=$user->id\">".get_string("loginas")."</A><BR>";
}
- }
+ }
echo "<A HREF=\"view.php?id=$user->id&course=$course->id\">".get_string("fullprofile")."...</A>";
echo "</FONT>";
View
19 user/view.php
@@ -116,14 +116,27 @@
echo "</TD></TR></TABLE></TABLE>";
// Print other functions
- if ($user->id == $USER->id and !isguest() ) {
- echo "<CENTER><TABLE ALIGN=CENTER><TR>";
+ echo "<CENTER><TABLE ALIGN=CENTER><TR>";
+ if (isteacher($course->id) or ($user->id == $USER->id and !isguest()) ) {
echo "<TD NOWRAP><P><FORM ACTION=\"../course/unenrol.php\" METHOD=GET>";
echo "<INPUT type=hidden name=id value=\"$course->id\">";
+ echo "<INPUT type=hidden name=user value=\"$user->id\">";
echo "<INPUT type=submit value=\"".get_string("unenrolme", "", $course->shortname)."\">";
echo "</FORM></P></TD>";
- echo "</TR></TABLE></CENTER>\n";
}
+ if (isteacher($course->id)) {
+ echo "<TD NOWRAP><P><FORM ACTION=\"../course/user.php\" METHOD=GET>";
+ echo "<INPUT type=hidden name=id value=\"$course->id\">";
+ echo "<INPUT type=hidden name=user value=\"$user->id\">";
+ echo "<INPUT type=submit value=\"".get_string("activityreport")."\">";
+ echo "</FORM></P></TD>";
+ echo "<TD NOWRAP><P><FORM ACTION=\"../course/loginas.php\" METHOD=GET>";
+ echo "<INPUT type=hidden name=id value=\"$course->id\">";
+ echo "<INPUT type=hidden name=user value=\"$user->id\">";
+ echo "<INPUT type=submit value=\"".get_string("loginas")."\">";
+ echo "</FORM></P></TD>";
+ }
+ echo "</TR></TABLE></CENTER>\n";
print_user_discussions($course, $user);

0 comments on commit 803b2c7

Please sign in to comment.