From 15e4b2ecd9b0b19be2a3df4119133e3f8e31587a Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 20 Nov 2002 14:58:24 +0000 Subject: [PATCH] User pictures no longer are links on main view page --- lib/moodlelib.php | 12 +++++++++--- user/view.php | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 6689751a87..815cedf54a 100644 --- a/lib/moodlelib.php +++ b/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 = "wwwroot/user/view.php?id=$userid&course=$courseid\">"; + if ($link) { + $output = "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 .= "wwwroot/user/default/$file\" BORDER=0 WIDTH=$size HEIGHT=$size ALT=\"\">"; } - $output .= ""; + if ($link) { + $output .= ""; + } if ($returnstring) { return $output; diff --git a/user/view.php b/user/view.php index 6ebb15d5a9..455f7a6099 100644 --- a/user/view.php +++ b/user/view.php @@ -52,7 +52,7 @@ echo "
"; echo ""; echo "
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 ""; -- 2.39.5