mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-46834 dndupload: check course dndupload cap on course level
This commit is contained in:
parent
e0dfc380c6
commit
a80f592298
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user