From e138669c6c8f0ce7c51c494b443e4ab913a193a5 Mon Sep 17 00:00:00 2001 From: Gareth Barnard <1058419+gjb2048@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:19:59 +0100 Subject: [PATCH] Better fix for #10. --- lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib.php b/lib.php index 0e9270f..3879f1e 100644 --- a/lib.php +++ b/lib.php @@ -796,6 +796,8 @@ function format_vsf_extend_navigation_course(navigation_node $parentnode, stdCla * @return boolean */ function format_vsf_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = []) { + require_login($course, false, null, true, true); + // Make sure the filearea is one of those used by the plugin. if ($filearea !== 'modicon' && strpos($filearea, 'modicon_') !== 0) { send_file_not_found();