Advanced Upload assignment type - student can't read teacher's uploaded response file MDL-6771

This commit is contained in:
skodak
2006-10-01 20:04:53 +00:00
parent 87a13824e1
commit bee8703ea5
+2 -1
View File
@@ -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');
}
}