From 75d85f4ef4f90aa17666e72c24ec9510c8d34027 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); }