Skip to content

Commit

Permalink
Advanced Upload assignment type - student can't read teacher's upload…
Browse files Browse the repository at this point in the history
…ed response file MDL-6771
  • Loading branch information
skodak committed Oct 1, 2006
1 parent 87a1382 commit bee8703
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion file.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
Expand Down

0 comments on commit bee8703

Please sign in to comment.