]> git.mjollnir.org Git - moodle.git/commitdiff
merged taking out extra isteacher()
authortoyomoyo <toyomoyo>
Mon, 6 Nov 2006 02:33:13 +0000 (02:33 +0000)
committertoyomoyo <toyomoyo>
Mon, 6 Nov 2006 02:33:13 +0000 (02:33 +0000)
user/view.php

index 4b24678b76d0d2df9627195f466d361b725c254c..0934815d1ad2262b98f1a5aaba7f8cbf4992be9e 100644 (file)
         print_row(get_string('msnid').':', s($user->msn));
     }
 
-    if (isteacher($course->id)) {
-        if ($mycourses = get_my_courses($user->id)) {
-            $courselisting = '';
-            foreach ($mycourses as $mycourse) {
-                if ($mycourse->visible and $mycourse->category) {
-                    if ($mycourse->id != $course->id){
-                        $courselisting .= "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$mycourse->id\">$mycourse->fullname</a>, ";
-                    }
-                    else {
-                        $courselisting .= "$mycourse->fullname, ";
-                    }
+    if ($mycourses = get_my_courses($user->id)) {
+        $courselisting = '';
+        foreach ($mycourses as $mycourse) {
+            if ($mycourse->visible and $mycourse->category) {
+                if ($mycourse->id != $course->id){
+                    $courselisting .= "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$mycourse->id\">$mycourse->fullname</a>, ";
+                }
+                else {
+                    $courselisting .= "$mycourse->fullname, ";
                 }
             }
-            print_row(get_string('courses').':', rtrim($courselisting,', '));
         }
+        print_row(get_string('courses').':', rtrim($courselisting,', '));
     }
 
     if (!isset($hiddenfields['lastaccess'])) {