diff --git a/mod/bigbluebuttonbn/classes/local/bigbluebutton/recordings/recording_data.php b/mod/bigbluebuttonbn/classes/local/bigbluebutton/recordings/recording_data.php index 453e0bdfed0..7d52dbe40f7 100644 --- a/mod/bigbluebuttonbn/classes/local/bigbluebutton/recordings/recording_data.php +++ b/mod/bigbluebuttonbn/classes/local/bigbluebutton/recordings/recording_data.php @@ -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; diff --git a/mod/bigbluebuttonbn/tests/external/get_recordings_test.php b/mod/bigbluebuttonbn/tests/external/get_recordings_test.php index 31f9c11680a..73dd34a8b08 100644 --- a/mod/bigbluebuttonbn/tests/external/get_recordings_test.php +++ b/mod/bigbluebuttonbn/tests/external/get_recordings_test.php @@ -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 ],