]> git.mjollnir.org Git - moodle.git/commitdiff
User pictures no longer are links on main view page
authormoodler <moodler>
Wed, 20 Nov 2002 14:58:24 +0000 (14:58 +0000)
committermoodler <moodler>
Wed, 20 Nov 2002 14:58:24 +0000 (14:58 +0000)
lib/moodlelib.php
user/view.php

index 6689751a875e71daecb1e0cf12ef760c7632eb56..815cedf54ab7f37e2156e9eccbf9fff072873acc 100644 (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;
 
-    $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;
index 6ebb15d5a93f6242bd2ed55fed5cdf223849226c..455f7a6099e54dce1cd20b434c7285acff85e47f 100644 (file)
@@ -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>";