]> git.mjollnir.org Git - moodle.git/commitdiff
online assignment / send_file: MDL-21104 fixed two missing variables
authorPenny Leach <penny@liip.ch>
Mon, 14 Dec 2009 10:18:31 +0000 (10:18 +0000)
committerPenny Leach <penny@liip.ch>
Mon, 14 Dec 2009 10:18:31 +0000 (10:18 +0000)
mod/assignment/type/online/assignment.class.php

index bd2b68c6d132394f53daa83bbd289a106a9c2ba1..f5ada80f60bab43ade8229b8409c46633a0863b2 100644 (file)
@@ -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();
         }