From: skodak Date: Sun, 1 Oct 2006 20:04:53 +0000 (+0000) Subject: Advanced Upload assignment type - student can't read teacher's uploaded response... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bee8703ea56c9980466fbb95d2c49521bd382cef;p=moodle.git Advanced Upload assignment type - student can't read teacher's uploaded response file MDL-6771 --- 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'); } }