Skip to content

Commit

Permalink
Captured and published videos from opencast have the wrong filetype
Browse files Browse the repository at this point in the history
In case there is no filetype appended to the name of the opencast event
or the filetype is not in video, we just append '.mp4'. Otherwise moodle
will reject those files in the filepicker.
  • Loading branch information
tobiasreischmann committed Mar 13, 2019
1 parent 6b5cc75 commit bafb224
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ public function get_listing($encodedpath = '', $page = '') {
foreach ($videos as $video) {
$listitem = array();
$listitem['title'] = $video->title;
if (!file_extension_in_typegroup($video->title, $this->supported_filetypes())) {
$listitem['title'] = $video->title . '.mp4';
}
$listitem['date'] = strtotime($video->start);
$listitem['thumbnail'] = $video->thumbnail;
$listitem['url'] = $video->url;
Expand Down

0 comments on commit bafb224

Please sign in to comment.