]> git.mjollnir.org Git - moodle.git/commitdiff
Merged fix from STABLE to hide hidden teachers in a course with separate groups
authormoodler <moodler>
Thu, 11 Nov 2004 08:10:01 +0000 (08:10 +0000)
committermoodler <moodler>
Thu, 11 Nov 2004 08:10:01 +0000 (08:10 +0000)
user/index.php

index 0abf0433e51eeed40afaf0a8e4e7fee9ed3f9b76..dc26787a75368857a087301dbbca50b22eaab888 100644 (file)
                 echo '<img src="'.$CFG->pixpath.'/i/edit.gif" height="16" width="16" alt="" /></a>';
             }
             echo '</h2>';
-            if($compactmode) {
+            if ($compactmode) {
                 // First of all, remove teachers with no authority
                 $teachers = array_filter($teachers, create_function('$t','return ($t->authority > 0);'));
 
                 // And now show the remainder as usual
                 $exceptions .= implode(',', array_keys($teachers));
                 print_user_table($teachers, $isteacher);
-            }
-            else {
+
+            else {
                 foreach ($teachers as $teacher) {
                     if ($isseparategroups) {
-                        if ($teacher->editall or ismember($currentgroup, $teacher->id)) {
+                        if ($teacher->editall or ismember($currentgroup, $teacher->id) and ($teacher->authority > 0)) {
                             print_user($teacher, $course);
                             $exceptions .= "$teacher->id,";
                         }