Skip to content

Commit

Permalink
MDL-74398 mod_bigbluebuttonbn: Fix issue with Visible groups
Browse files Browse the repository at this point in the history
* In visible group user should see all recordings. This fixes an issue while integrating
MDL-74052 with this issue.
  • Loading branch information
laurentdavid committed Apr 7, 2022
1 parent ac3e77b commit 978bdb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -302,6 +302,12 @@ protected static function include_recording_table_row(?instance $instance, recor
}
// 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;
Expand Down
3 changes: 2 additions & 1 deletion mod/bigbluebuttonbn/tests/external/get_recordings_test.php
Expand Up @@ -382,7 +382,8 @@ public function recording_group_test_data() {
'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
],
Expand Down

0 comments on commit 978bdb5

Please sign in to comment.