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
This commit is contained in:
moodler
2007-08-09 06:25:49 +00:00
parent 196684087f
commit 9b2aa32147
+6 -1
View File
@@ -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);