]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12546 - The choice module was calling get_users_by_capability, which hammers...
authortjhunt <tjhunt>
Tue, 11 Dec 2007 18:49:56 +0000 (18:49 +0000)
committertjhunt <tjhunt>
Tue, 11 Dec 2007 18:49:56 +0000 (18:49 +0000)
Actually, since the fix for MDL-12331, which changed the get_users_by_capability call at the top of this function, the check it was doing is entirely redundant anyway, so I removed it.

Merged from MOODLE_19_STABLE.

mod/choice/lib.php

index 84525526ea8ca6f762641f2b8b392a6494f734dc..24e9f1fa70fdc9b691dbdb1548cf1ee64ae6c015 100644 (file)
@@ -367,10 +367,7 @@ function choice_show_results($choice, $course, $cm, $forcepublish='') {
                 $answer = $answers[$user->id];
                 $useranswer[(int)$answer->optionid][] = $user;
             } else {
-                $usershownotans = get_users_by_capability($context, 'mod/choice:choose', 'u.id', 'u.id ASC', '', '', $currentgroup, '', false);
-                if ($user->id == $usershownotans[$user->id]->id) {
-                    $useranswer[0][] = $user;
-                }
+                $useranswer[0][] = $user;
             }
         }
     }