MDL-86192 mod_bigbluebuttonbn: Make sure we can return all recordings
When we fetch recordings from an instance we filter out by groups automatically depending on the group set in the instance. This is not compatible with the approach of the overview page where we filter by all groups of a user.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
issueNumber: MDL-86192
|
||||
notes:
|
||||
mod_bigbluebuttonbn:
|
||||
- message: >-
|
||||
Add a new parameter to the
|
||||
mod_bigbluebuttonbn\recording::get_recordings_for_instance so to ignore
|
||||
instance group settings and return all recordings. This is an optional
|
||||
argement and no change is expected from existing calls.
|
||||
type: improved
|
||||
@@ -111,6 +111,8 @@ class recording extends persistent {
|
||||
* @param instance $instance
|
||||
* @param bool $includeimported
|
||||
* @param bool $onlyimported
|
||||
* @param bool $filterbygroups if true it will filter by groups according to the instance groups, if false will ignore groups
|
||||
* and groupings from the current instance and return all recordings linked to the instance.
|
||||
*
|
||||
* @return recording[] containing the recordings indexed by recordID, each recording is also a
|
||||
* non sequential associative array itself that corresponds to the actual recording in BBB
|
||||
@@ -118,14 +120,15 @@ class recording extends persistent {
|
||||
public static function get_recordings_for_instance(
|
||||
instance $instance,
|
||||
bool $includeimported = false,
|
||||
bool $onlyimported = false
|
||||
bool $onlyimported = false,
|
||||
bool $filterbygroups = true
|
||||
): array {
|
||||
[$selects, $params] = self::get_basic_select_from_parameters(false, $includeimported, $onlyimported);
|
||||
$selects[] = "bigbluebuttonbnid = :bbbid";
|
||||
$params['bbbid'] = $instance->get_instance_id();
|
||||
$groupmode = groups_get_activity_groupmode($instance->get_cm());
|
||||
$context = $instance->get_context();
|
||||
if ($groupmode) {
|
||||
if ($groupmode && $filterbygroups) {
|
||||
[$groupselects, $groupparams] = self::get_select_for_group(
|
||||
$groupmode,
|
||||
$context,
|
||||
|
||||
Reference in New Issue
Block a user