diff --git a/.upgradenotes/MDL-86192-2025081909195531.yml b/.upgradenotes/MDL-86192-2025081909195531.yml new file mode 100644 index 00000000000..529e2988d24 --- /dev/null +++ b/.upgradenotes/MDL-86192-2025081909195531.yml @@ -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 diff --git a/public/mod/bigbluebuttonbn/classes/recording.php b/public/mod/bigbluebuttonbn/classes/recording.php index 27464e2d604..57d0c5f06d7 100644 --- a/public/mod/bigbluebuttonbn/classes/recording.php +++ b/public/mod/bigbluebuttonbn/classes/recording.php @@ -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,