From: Penny Leach Date: Mon, 14 Dec 2009 10:18:31 +0000 (+0000) Subject: online assignment / send_file: MDL-21104 fixed two missing variables X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ff284987c7e4f7653f5eb11ebb5aac7c8c4851db;p=moodle.git online assignment / send_file: MDL-21104 fixed two missing variables --- diff --git a/mod/assignment/type/online/assignment.class.php b/mod/assignment/type/online/assignment.class.php index bd2b68c6d1..f5ada80f60 100644 --- a/mod/assignment/type/online/assignment.class.php +++ b/mod/assignment/type/online/assignment.class.php @@ -338,10 +338,12 @@ class assignment_online extends assignment_base { } public function send_file($filearea, $args) { + global $USER; require_capability('mod/assignment:view', $this->context); $fullpath = $this->context->id.$filearea.implode('/', $args); + $fs = get_file_storage(); if (!$file = $fs->get_file_by_hash(sha1($fullpath)) or $file->is_directory()) { send_file_not_found(); }