]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for bug 1892:
authordefacer <defacer>
Mon, 6 Sep 2004 08:06:55 +0000 (08:06 +0000)
committerdefacer <defacer>
Mon, 6 Sep 2004 08:06:55 +0000 (08:06 +0000)
Hidden teachers are not shown anymore in the less detailed participants view.

PS1: Can you believe I didn't know you could hide a teacher? :o
PS2: I just _LOVE_ using lambda functions! It's soooooooo very cool it makes
     me think I may be programming in the wrong language! :P

user/index.php

index 604bc0ba35245ad4a95aa64b46b1de3d265b69f4..e286b556535aa4b9d791207747848d7c01d005c7 100644 (file)
             }
             echo '</h2>';
             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);
             }