From 580a5588f10ff3939cfa556902e14eaef96230ba Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 28 Aug 2017 15:45:10 +0800 Subject: [PATCH] MDL-59831 core_user: show all groups in select when in visible groups --- user/renderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/renderer.php b/user/renderer.php index b7986d4dafe..d881f0cd57f 100644 --- a/user/renderer.php +++ b/user/renderer.php @@ -265,8 +265,8 @@ class core_user_renderer extends plugin_renderer_base { // Filter options for groups, if available. if ($course->groupmode != NOGROUPS) { - if (has_capability('moodle/site:accessallgroups', $context)) { - // List all groups if the user can access all groups. + if (has_capability('moodle/site:accessallgroups', $context) || $course->groupmode == VISIBLEGROUPS) { + // List all groups if the user can access all groups, or we are in visible group mode. $groups = $manager->get_all_groups(); } else { // Otherwise, just list the groups the user belongs to.