Moodle activity plugin which can be used to display and view Opencast episodes and series in Moodle. Teachers can link the activity to an existing Opencast episode or series and an embedded player allows students to watch these videos directly in Moodle.
As moodle provides the feature of drag and drop files only for Activity plugins (mod) with edit mode on in the main course overview page, it is considered to be a great help to provide such functionality into moodle opencast bundle.
Concept
opencast_dndupload_register and opencast_dndupload_handle are two main built-in methods to register and to use the dnd feature in mod.
(NOTE) The file extensions is retrieved by block_opencast config called uploadfileextensions for the default opencast instance.
A new table field called uploaddraftitemid is added to the db table, to store the uploaded video draftitemid.
A new opencasttype is introduced to specify the upload type of the opencast activity.
When an upload is recorded the activity will then only used to upload, therefore the layout of the upload form must be of frametop to avoid further conflict with the normal one.
In case that the upload job ends up being faulty, it is designed in a way that it deletes itself to keep the course area and content clean.
(Metadata catalogs): it is designed only top provide those configured metadata catalogs that are set as required, to keep everything easy to use, therefore all inputs are required.
The module will remain when the upload job is completed, it changes its type only. However, it shows the relative info message about the uploading progress as well as the opencast video processing stage after upload.
NOTE: this feature now depends heavily on the block_opencast plugin, therefore it is worth adding it as depenedency into plugin manifest.
To test this PR:
Latest version of tool_opencast and block_opencast => v4.0-r1
Both mentioned plugins must be configured and ultimately ready to upload.
Cronjob for the opencast uploadjob must be running.
On the main COURSE overview page, where we can add anothe actitivity, one must enable the edit mode and then try to drag and drop a video file into the desgnated place.
In a modal provide to decide what to do with that file, one must select the opencast upload from the options.
Right after that, a new opencast activity will be added into the list stating the Upload feature.
By clicking on that newly created upload opencast activity, one will land on the upload page to enter all required inputs for the upload, and press add video button.
After the upload is saved, the course module (oc activity) will delete itself and provide a message containg a link to go to the opencast videos list.
Two comments from our side about the current status of this new feature (v4.1 pre-release phase; $plugin->version = 2023052300):
It would definitely make sense to point out that it is not possible to upload dual videos (presenter & presentation). For example, this would be possible to do either in the README or in the upload dialog itself.
There is no clear hint that you have to click on the newly created activity after the drag&drop process to start the upload at all.
This PR fixes #14
Description
As moodle provides the feature of drag and drop files only for Activity plugins (mod) with edit mode on in the main course overview page, it is considered to be a great help to provide such functionality into moodle opencast bundle.
Concept
opencast_dndupload_register
andopencast_dndupload_handle
are two main built-in methods to register and to use the dnd feature in mod.uploadfileextensions
for the default opencast instance.uploaddraftitemid
is added to the db table, to store the uploaded video draftitemid.opencasttype
is introduced to specify the upload type of the opencast activity.frametop
to avoid further conflict with the normal one.NOTE: this feature now depends heavily on the block_opencast plugin, therefore it is worth adding it as depenedency into plugin manifest.
To test this PR: