User pictures no longer are links on main view page

This commit is contained in:
moodler 2002-11-20 14:58:24 +00:00
parent a406cdec66
commit 15e4b2ecd9
2 changed files with 10 additions and 4 deletions

View file

@ -216,10 +216,14 @@ function print_file_picture($path, $courseid=0, $height="", $width="", $link="")
} }
} }
function print_user_picture($userid, $courseid, $picture, $large=false, $returnstring=false) { function print_user_picture($userid, $courseid, $picture, $large=false, $returnstring=false, $link=true) {
global $CFG; global $CFG;
if ($link) {
$output = "<A HREF=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">"; $output = "<A HREF=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">";
} else {
$output = "";
}
if ($large) { if ($large) {
$file = "f1.jpg"; $file = "f1.jpg";
$size = 100; $size = 100;
@ -236,7 +240,9 @@ function print_user_picture($userid, $courseid, $picture, $large=false, $returns
} else { } else {
$output .= "<IMG SRC=\"$CFG->wwwroot/user/default/$file\" BORDER=0 WIDTH=$size HEIGHT=$size ALT=\"\">"; $output .= "<IMG SRC=\"$CFG->wwwroot/user/default/$file\" BORDER=0 WIDTH=$size HEIGHT=$size ALT=\"\">";
} }
if ($link) {
$output .= "</A>"; $output .= "</A>";
}
if ($returnstring) { if ($returnstring) {
return $output; return $output;

View file

@ -52,7 +52,7 @@
echo "<TABLE WIDTH=80% ALIGN=CENTER BORDER=0 CELLPADDING=1 CELLSPACING=1><TR><TD BGCOLOR=#888888>"; echo "<TABLE WIDTH=80% ALIGN=CENTER BORDER=0 CELLPADDING=1 CELLSPACING=1><TR><TD BGCOLOR=#888888>";
echo "<TABLE WIDTH=100% BORDER=0 CELLPADDING=3 CELLSPACING=0><TR>"; echo "<TABLE WIDTH=100% BORDER=0 CELLPADDING=3 CELLSPACING=0><TR>";
echo "<TD WIDTH=100 BGCOLOR=\"$THEME->body\" VALIGN=top>"; echo "<TD WIDTH=100 BGCOLOR=\"$THEME->body\" VALIGN=top>";
print_user_picture($user->id, $course->id, $user->picture, true); print_user_picture($user->id, $course->id, $user->picture, true, false, false);
echo "</TD><TD WIDTH=100% BGCOLOR=#FFFFFF>"; echo "</TD><TD WIDTH=100% BGCOLOR=#FFFFFF>";