Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

User pictures no longer are links on main view page

  • Loading branch information...
commit 15e4b2ecd9b0b19be2a3df4119133e3f8e31587a 1 parent a406cde
moodler authored
Showing with 10 additions and 4 deletions.
  1. +9 −3 lib/moodlelib.php
  2. +1 −1  user/view.php
View
12 lib/moodlelib.php
@@ -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;
- $output = "<A HREF=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">";
+ if ($link) {
+ $output = "<A HREF=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">";
+ } else {
+ $output = "";
+ }
if ($large) {
$file = "f1.jpg";
$size = 100;
@@ -236,7 +240,9 @@ function print_user_picture($userid, $courseid, $picture, $large=false, $returns
} else {
$output .= "<IMG SRC=\"$CFG->wwwroot/user/default/$file\" BORDER=0 WIDTH=$size HEIGHT=$size ALT=\"\">";
}
- $output .= "</A>";
+ if ($link) {
+ $output .= "</A>";
+ }
if ($returnstring) {
return $output;
View
2  user/view.php
@@ -52,7 +52,7 @@
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 "<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>";
Please sign in to comment.
Something went wrong with that request. Please try again.