From: moodler Date: Thu, 9 Aug 2007 06:27:22 +0000 (+0000) Subject: Merged 1.8 fix for groups in choice activity X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2b85d965a59dd2d1dcc3b7cf76b1ab58ea3ed206;p=moodle.git Merged 1.8 fix for groups in choice activity --- diff --git a/mod/choice/lib.php b/mod/choice/lib.php index 75a4d5cd65..ee922a2370 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -317,7 +317,12 @@ function choice_show_results($choice, $course, $cm, $forcepublish='') { } $groupmode = groupmode($course, $cm); - $currentgroup = get_current_group($course->id); + + if ($groupmode > 0) { + $currentgroup = get_current_group($course->id); + } else { + $currentgroup = 0; + } $users = get_users_by_capability($context, 'mod/choice:choose', 'u.id, u.picture, u.firstname, u.lastname, u.idnumber', 'u.firstname ASC', '', '', $currentgroup, '', false);