Moodle Plugins directory: Chunkupload | Moodle.org

Chunkupload
Opencast is a flexible, reliable, and scalable open-source video-capture, -management, and -distribution system for academic institutions, built by a community of developers from leading universities and organizations worldwide.
Integrating Opencast into Moodle is realized with a set of flexible plugins.
All Opencast plugins for MoodleDocumentationThe Opencast Project
About this plugin
This plugin offers a new form element for Moodle forms. The form element is a file upload field, which uploads one file as multiple small chunks. While uploading the form element shows a progress bar to the user. The advantages of this form element is, that the maximum php upload limit (post_max_size
and upload_max_filesize
), specified within the php.ini, do no restrict uploads with this form element. Also the upload is not processed within only one transaction, but multiple small ones. Second, the form element is not directly coupled to the moodle file size limits, which are a good thing in general, but can not be circumvented for special cases.
The main purpose of this development is the usage within the plugin block_opencast. The plugin allows the teachers of a course to upload large video files to moodle, which are later transfered to the opencast video platform. Since moodle only serves as a temporary storage and the files are very large, it is required, that the general upload size limits should not apply.
Picture of the chunkupload while uploading a file.
Installation
To install the plugin you have to place the content of this repository into local/chunkupload.
git clone https://github.com/learnweb/moodle-local_chunkupload.git
local/chunkupload.
Usage
To use the form element within one of your plugins, you first have to register the form element as a quickform element:
\MoodleQuickForm::registerElementType('chunkupload', "$CFG->dirroot/local/chunkupload/classes/chunkupload_form_element.php", 'local_chunkupload\chunkupload_form_element');
Afterwards you can use the specified element name to create a form element of the chunkupload:
$mform->addElement('chunkupload', 'video_chunk', get_string('myvideo', 'myplugin'), null, array('maxbytes' => $maxuploadsize, 'accepted_types' => $videotypes));
The form element takes in two parameters, which can specify the maximum upload size (maxbytes
) and the accepted filetypes (accepted_types
).
No support in the comments section on this page
Please note that we don't provide any support for this plugin in the comments section on this page.
We appreciate your commendation and reviews for this plugin in the comments. For bug reports and support requests, please read the documentation first and create, if needed, a ticket in the bug tracker which is linked below.
Thanks for your cooperation.
For further help, please refer to the mailing lists and chats offered by opencast.org.
it is not that easy. The plugin is specifically tailored for the opencast plugins. If you want to use it in another context technical knowledge is required. You can include it in specific plugins if you read the Usage part in the README.md file (https://github.com/Opencast-Moodle/moodle-local_chunkupload#usage). However, usage in core functions is hardly feasible by now.
Sorry for the late answer I hope it helps!
Best Nina