MDL-57362 assignlib: Check for sep groups edge case
This commit is contained in:
@@ -2837,7 +2837,11 @@ class assign {
|
||||
if (!has_any_capability(array('mod/assign:viewgrades', 'mod/assign:grade'), $this->context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 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()));
|
||||
return (bool)$groupflag;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user