MDL-74398 mod_bigbluebuttonbn: Fix issue with Visible groups

* In visible group user should see all recordings. This fixes an issue while integrating
MDL-74052 with this issue.
This commit is contained in:
Laurent David
2022-04-07 19:25:50 +02:00
parent ac3e77b1b1
commit 978bdb5b4d
2 changed files with 8 additions and 1 deletions
@@ -302,6 +302,12 @@ class recording_data {
}
// When groups are enabled, exclude those to which the user doesn't have access to.
if ($instance->uses_groups() && !$instance->can_manage_recordings()) {
if (groups_get_activity_groupmode($instance->get_cm()) == VISIBLEGROUPS) {
// In case we are in visible group mode, we show all recordings.
return true;
}
// Else we check if the Recording group is the same as the instance. Instance group
// being the group chosen for this instance.
return intval($rec->get('groupid')) === $instance->get_group_id();
}
return true;
+2 -1
View File
@@ -382,7 +382,8 @@ class get_recordings_test extends \externallib_advanced_testcase {
't1' => ['Recording1', 'Recording2', 'Recording3'], // A moderator should see all recordings.
's1' => ['Recording1'], // S1 can only see the recordings from his group.
's2' => ['Recording2'], // S2 can only see the recordings from his group.
's3' => ['Recording3'] // S3 should see recordings which have no groups.
's3' => ['Recording3', 'Recording2', 'Recording1']
// S3 should see recordings which have no groups and his groups's recording.
],
'coursemode' => VISIBLEGROUPS
],