]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some notices
authormoodler <moodler>
Fri, 15 Sep 2006 13:46:11 +0000 (13:46 +0000)
committermoodler <moodler>
Fri, 15 Sep 2006 13:46:11 +0000 (13:46 +0000)
course/lib.php

index 95bdc7cfa0b5121fe5d9ff9823864c60c25a3e1e..4ddd688f6221d19bca2bd6362023e12270effa69 100644 (file)
@@ -1527,14 +1527,12 @@ function print_course($course, $width="100%") {
     if ($teachers = get_course_teachers($course->id)) {
         echo "<span class=\"teachers\">\n";
         foreach ($teachers as $teacher) {
-            if ($teacher->authority > 0) {
-                if (!$teacher->role) {
-                    $teacher->role = $course->teacher;
-                }
-                $fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id))); // is the USER a teacher of that course
-                echo $teacher->role.': <a href="'.$CFG->wwwroot.'/user/view.php?id='.$teacher->id.
-                     '&amp;course='.SITEID.'">'.$fullname.'</a><br />';
+            if (empty($teacher->role)) {
+                $teacher->role = $course->teacher;
             }
+            $fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id))); // is the USER a teacher of that course
+            echo $teacher->role.': <a href="'.$CFG->wwwroot.'/user/view.php?id='.$teacher->id.
+                '&amp;course='.SITEID.'">'.$fullname.'</a><br />';
         }
         echo "</span>\n";
     }