From 7a5084ca4ef9462d58b64938b4dfd88b7012df13 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 8 Nov 2021 21:51:07 +0800 Subject: [PATCH] Submissions.php: fix Bug 203 Unable to download an attachment from a student's submission (http://118.25.96.118/bugzilla/show_bug.cgi?id=203) --- Submissions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Submissions.php b/Submissions.php index 0e1020a..2505d39 100644 --- a/Submissions.php +++ b/Submissions.php @@ -248,7 +248,9 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Marked' Order by lab $submitted_by = "(GROUP) Group X "; } - $full_link = "$att1"; + $base_att1 = basename($att1); + + $full_link = "$base_att1"; // prevent students from directly accessing their classmates' submissions if ($att2 != "") { $full_link = $full_link . "| $att2";