From ff284987c7e4f7653f5eb11ebb5aac7c8c4851db Mon Sep 17 00:00:00 2001 From: Penny Leach Date: Mon, 14 Dec 2009 10:18:31 +0000 Subject: [PATCH] online assignment / send_file: MDL-21104 fixed two missing variables --- mod/assignment/type/online/assignment.class.php | 2 ++ 1 file changed, 2 insertions(+) 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(); } -- 2.39.5