From 7c97d8549cb49a4e90e1f71df44361a95f8e6f9d Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 15 Jan 2025 14:01:17 +0000 Subject: [PATCH] MDL-84214 mod_bigbluebuttonbn: fix default presentation file serving. --- mod/bigbluebuttonbn/classes/local/helpers/files.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/bigbluebuttonbn/classes/local/helpers/files.php b/mod/bigbluebuttonbn/classes/local/helpers/files.php index dddce8d1b52..19730cd3779 100644 --- a/mod/bigbluebuttonbn/classes/local/helpers/files.php +++ b/mod/bigbluebuttonbn/classes/local/helpers/files.php @@ -251,9 +251,12 @@ class files { } else { require_login(null, true, $cm, true, true); } - if (!has_capability('mod/bigbluebuttonbn:join', $context)) { + + // If the file belongs to a course module, ensure user can join the activity. + if ($cm !== null && !has_capability('mod/bigbluebuttonbn:join', $context)) { return null; } + return implode('/', $args); }