mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-22033 groupings now enabled unconditionally, groupmembersonly kept as experimental - this simplifies groups code logic a bit, user interface changes should not be significant because the groupings are not visible much until at least one created; hopefully the new description of groupmembersonly will have to preventsome gradebook complaints
This commit is contained in:
parent
e8c2189d78
commit
98da60215e
31 changed files with 137 additions and 214 deletions
|
@ -891,7 +891,7 @@ class assignment_base {
|
|||
}
|
||||
|
||||
// if groupmembersonly used, remove users who are not in any group
|
||||
if ($users and !empty($CFG->enablegroupings) and $cm->groupmembersonly) {
|
||||
if ($users and !empty($CFG->enablegroupmembersonly) and $cm->groupmembersonly) {
|
||||
if ($groupingusers = groups_get_grouping_members($cm->groupingid, 'u.id', 'u.id')) {
|
||||
$users = array_intersect($users, array_keys($groupingusers));
|
||||
}
|
||||
|
@ -1143,7 +1143,7 @@ class assignment_base {
|
|||
}
|
||||
|
||||
// if groupmembersonly used, remove users who are not in any group
|
||||
if ($users and !empty($CFG->enablegroupings) and $cm->groupmembersonly) {
|
||||
if ($users and !empty($CFG->enablegroupmembersonly) and $cm->groupmembersonly) {
|
||||
if ($groupingusers = groups_get_grouping_members($cm->groupingid, 'u.id', 'u.id')) {
|
||||
$users = array_intersect($users, array_keys($groupingusers));
|
||||
}
|
||||
|
@ -2952,7 +2952,7 @@ function assignment_count_real_submissions($cm, $groupid=0) {
|
|||
}
|
||||
|
||||
// if groupmembersonly used, remove users who are not in any group
|
||||
if ($users and !empty($CFG->enablegroupings) and $cm->groupmembersonly) {
|
||||
if ($users and !empty($CFG->enablegroupmembersonly) and $cm->groupmembersonly) {
|
||||
if ($groupingusers = groups_get_grouping_members($cm->groupingid, 'u.id', 'u.id')) {
|
||||
$users = array_intersect($users, array_keys($groupingusers));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue