mirror of
https://github.com/moodle/moodle.git
synced 2025-03-09 18:30:03 +01:00
Merge branch 'em_MDL-26476_20_grp' of git://github.com/skodak/moodle
This commit is contained in:
commit
f5c452a3b3
@ -906,8 +906,8 @@ class cm_info extends stdClass {
|
||||
} else if (!empty($CFG->enablegroupmembersonly) and !empty($this->groupmembersonly)
|
||||
and !has_capability('moodle/site:accessallgroups', $modcontext, $userid)) {
|
||||
// If the activity has 'group members only' and you don't have accessallgroups...
|
||||
$groups = $this->modinfo->get_groups();
|
||||
if (empty($this->groups[$this->groupingid])) {
|
||||
$groups = $this->modinfo->get_groups($this->groupingid);
|
||||
if (empty($groups)) {
|
||||
// ...and you don't belong to a group, then set it so you can't see/access it
|
||||
$this->uservisible = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user