MDL-59831 core_user: show all groups in select when in visible groups
This commit is contained in:
+2
-2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user