Skip to content

Commit

Permalink
Altered buttons from index and view pages
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Jul 27, 2002
1 parent 2b8cef8 commit 803b2c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
6 changes: 2 additions & 4 deletions user/index.php
Expand Up @@ -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>";
Expand All @@ -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>";

Expand Down
19 changes: 16 additions & 3 deletions user/view.php
Expand Up @@ -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);

Expand Down

0 comments on commit 803b2c7

Please sign in to comment.