From ceab28e7620cb87eb7a638ef4799b590338a5b3d Mon Sep 17 00:00:00 2001 From: Julio Date: Wed, 13 Sep 2017 15:07:36 +0200 Subject: [PATCH] If course doesn't exists try the course from the session. --- main/document/download_uploaded_files.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/document/download_uploaded_files.php b/main/document/download_uploaded_files.php index eb1097052b..7bb24eb2e3 100644 --- a/main/document/download_uploaded_files.php +++ b/main/document/download_uploaded_files.php @@ -13,7 +13,9 @@ $courseCode = isset($_GET['code']) ? $_GET['code'] : ''; $type = isset($_GET['type']) ? $_GET['type'] : ''; $file = isset($_GET['file']) ? $_GET['file'] : ''; $courseInfo = api_get_course_info($courseCode); - +if (empty($courseInfo)) { + $courseInfo = api_get_course_info(); +} if (empty($courseInfo) || empty($type) || empty($file)) { api_not_allowed(true); }