From 5506f0482cdd86e112706e6ace953bb1c4dbfbaf Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Thu, 12 Dec 2013 13:29:41 +0800 Subject: [PATCH] MDL-43250 Assign: separate groups mode fix When in separate groups mode, only get graders in a group that is in the course module grouping. Conflicts: mod/assign/locallib.php mod/assign/tests/locallib_test.php --- mod/assign/locallib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 1e0970acf21..cf3c8f51ef1 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -3359,8 +3359,8 @@ class assign { $potentialgraders = get_enrolled_users($this->context, "mod/assign:grade"); $graders = array(); - if (groups_get_activity_groupmode($this->get_course_module()) == SEPARATEGROUPS) { // Separate groups are being used - if ($groups = groups_get_all_groups($this->get_course()->id, $userid)) { // Try to find all groups + if (groups_get_activity_groupmode($this->get_course_module()) == SEPARATEGROUPS) { + if ($groups = groups_get_all_groups($this->get_course()->id, $userid, $this->get_course_module()->groupingid)) { foreach ($groups as $group) { foreach ($potentialgraders as $grader) { if ($grader->id == $userid) {