Permalink
Browse files

Fix for Bug #2435 - Hidden teachers and site admins are shown in no r…

…esponse list.
  • Loading branch information...
1 parent a5fd09d commit af40722cc5d789badef51e89fdb2b5679bdf7b22 danmarsden committed Apr 5, 2005
Showing with 14 additions and 10 deletions.
  1. +7 −5 mod/choice/report.php
  2. +7 −5 mod/choice/view.php
View
@@ -113,11 +113,13 @@
echo "<table width=\"100%\">";
foreach ($userlist as $user) {
- echo "<tr><td width=\"10\" nowrap=\"nowrap\">";
- print_user_picture($user->id, $course->id, $user->picture);
- echo "</td><td width=\"100%\" nowrap=\"nowrap\">";
- echo "<p>".fullname($user, true)."</p>";
- echo "</td></tr>";
+ if (!($optionid==0 && isadmin($user->id)) && !($optionid==0 && isteacher($course->id, $user->id) && !(isteacheredit($course->id, $user->id)) ) ) { //make sure admins and hidden teachers are not shown in not answered yet column.
+ echo "<tr><td width=\"10\" nowrap=\"nowrap\">";
+ print_user_picture($user->id, $course->id, $user->picture);
+ echo "</td><td width=\"100%\" nowrap=\"nowrap\">";
+ echo "<p>".fullname($user, true)."</p>";
+ echo "</td></tr>";
+ }
}
echo "</table>";
View
@@ -245,11 +245,13 @@
echo "<table width=\"100%\">";
foreach ($userlist as $user) {
- echo "<tr><td width=\"10\" nowrap=\"nowrap\">";
- print_user_picture($user->id, $course->id, $user->picture);
- echo "</td><td width=\"100%\" nowrap=\"nowrap\">";
- echo "<p>".fullname($user, $isteacher)."</p>";
- echo "</td></tr>";
+ if (!($optionid==0 && isadmin($user->id)) && !($optionid==0 && isteacher($course->id, $user->id) && !(isteacheredit($course->id, $user->id)) ) ) { //make sure admins and hidden teachers are not shown in not answered yet column.
+ echo "<tr><td width=\"10\" nowrap=\"nowrap\">";
+ print_user_picture($user->id, $course->id, $user->picture);
+ echo "</td><td width=\"100%\" nowrap=\"nowrap\">";
+ echo "<p>".fullname($user, $isteacher)."</p>";
+ echo "</td></tr>";
+ }
}
echo "</table>";

0 comments on commit af40722

Please sign in to comment.