From 9b2aa32147e9b635f828ccffb74cf5880698c835 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 9 Aug 2007 06:25:49 +0000 Subject: [PATCH] FIxed display of results when groups have been defined It was only showing the current group EVEN even the choice acticity itself was not in group mode --- mod/choice/lib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod/choice/lib.php b/mod/choice/lib.php index cf99e095999..e93873d3308 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -312,7 +312,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);