]> git.mjollnir.org Git - moodle.git/commitdiff
Advanced Upload assignment type - student can't read teacher's uploaded response...
authorskodak <skodak>
Sun, 1 Oct 2006 20:04:53 +0000 (20:04 +0000)
committerskodak <skodak>
Sun, 1 Oct 2006 20:04:53 +0000 (20:04 +0000)
file.php

index dd9b161a7f9e30595de93562069df228c63d7e59..e6bb63af2b72105c6bd25980ab3fbb40d1369beb 100644 (file)
--- 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');
         }
     }