MDL-46834 dndupload: check course dndupload cap on course level

This commit is contained in:
Marina Glancy 2014-09-10 17:06:07 +08:00
parent e0dfc380c6
commit a80f592298

View File

@ -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');
}