diff --git a/course/dnduploadlib.php b/course/dnduploadlib.php index 14208dbf3ad..e4917188680 100644 --- a/course/dnduploadlib.php +++ b/course/dnduploadlib.php @@ -488,7 +488,7 @@ class dndupload_ajax_processor { $draftitemid = file_get_unused_draft_itemid(); $maxbytes = get_max_upload_file_size($CFG->maxbytes, $this->course->maxbytes); $types = $this->dnduploadhandler->get_handled_file_types($this->module->name); - $repo = repository::get_instances(array('type' => 'upload')); + $repo = repository::get_instances(array('type' => 'upload', 'currentcontext' => $this->context)); if (empty($repo)) { throw new moodle_exception('errornouploadrepo', 'moodle'); }