]> git.mjollnir.org Git - moodle.git/commitdiff
missed one line.
authordanmarsden <danmarsden>
Mon, 29 Oct 2007 00:21:53 +0000 (00:21 +0000)
committerdanmarsden <danmarsden>
Mon, 29 Oct 2007 00:21:53 +0000 (00:21 +0000)
Fix for MDL-10085  and MDL-8118 Problem with number of Responses in choice wrong, and displayed users incorrect on results.

mod/choice/lib.php

index f6b6e2589781191f49f95e874684ea74e4eb9e4e..80d88665bb02f12d174ce7c8a0a34630b17db9ea 100644 (file)
@@ -243,7 +243,7 @@ function choice_user_submit_response($formanswer, $choice, $userid, $courseid, $
     if ($countanswers) {
         $countans = 0;
         foreach ($countanswers as $ca) { //only return enrolled users.
-            if (has_capability('mod/choice:choose', $context)) {
+            if (has_capability('mod/choice:choose', $context, $ca->userid, false)) {
                 $countans = $countans+1;
             }
         }