From bee8703ea56c9980466fbb95d2c49521bd382cef Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 1 Oct 2006 20:04:53 +0000 Subject: [PATCH] Advanced Upload assignment type - student can't read teacher's uploaded response file MDL-6771 --- file.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/file.php b/file.php index dd9b161a7f..e6bb63af2b 100644 --- a/file.php +++ b/file.php @@ -84,7 +84,8 @@ and (strtolower($args[2]) == 'assignment')) { $lifetime = 0; // do not cache assignments, students may reupload them - if ((!has_capability('mod/assignment:grade', get_context_instance(CONTEXT_COURSE, $course->id))) && (count($args) != 6 || $args[4] != $USER->id)) { + if (!has_capability('mod/assignment:grade', get_context_instance(CONTEXT_COURSE, $course->id)) + and $args[4] != $USER->id) { error('Access not allowed'); } } -- 2.39.5