MDL-38443 Assignment: Missing permissions check on downloadall submissions
authorDamyon Wiese <damyon@moodle.com>
Wed, 13 Mar 2013 03:13:42 +0000 (11:13 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 6 May 2013 09:21:18 +0000 (10:21 +0100)
mod/assign/locallib.php

index 0a5d8c4..e97c2e5 100644 (file)
@@ -1565,6 +1565,8 @@ class assign {
         // more efficient to load this here
         require_once($CFG->libdir.'/filelib.php');
 
+        require_capability('mod/assign:grade', $this->context);
+
         // load all submissions
         $submissions = $this->get_all_submissions('','');