From: danmarsden Date: Mon, 29 Oct 2007 00:21:53 +0000 (+0000) Subject: missed one line. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=770778a502327a8876d20e57407dbbe09eae09a2;p=moodle.git missed one line. Fix for MDL-10085 and MDL-8118 Problem with number of Responses in choice wrong, and displayed users incorrect on results. --- diff --git a/mod/choice/lib.php b/mod/choice/lib.php index f6b6e25897..80d88665bb 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -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; } }