Commit d04310cb authored by Dan Poltawski's avatar Dan Poltawski
Browse files

Merge branch 'MDL-57362-master' of git://

parents 0c90bfe3 0884ddea
......@@ -3102,7 +3102,8 @@ class assign {
// Checks for the edge case when user belongs to no groups and groupmode is sep.
if ($this->get_course_module()->effectivegroupmode == SEPARATEGROUPS) {
$groupflag = !empty(groups_get_activity_allowed_groups($this->get_course_module()));
$groupflag = has_capability('moodle/site:accessallgroups', $this->get_context());
$groupflag = $groupflag || !empty(groups_get_activity_allowed_groups($this->get_course_module()));
return (bool)$groupflag;
return true;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment