Altered buttons from index and view pages

This commit is contained in:
martin 2002-07-27 10:23:45 +00:00
parent 2b8cef8038
commit 803b2c7606
2 changed files with 18 additions and 7 deletions

View File

@ -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 File

@ -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);