Work: Allow show content when submitted file is video - refs BT#15257

pull/2808/head
Angel Fernando Quiroz Campos 7 years ago
parent 679ec69a20
commit 56da49ae15
  1. 6
      main/work/work.lib.php

@ -143,6 +143,12 @@ function get_work_data_by_id($id, $courseId = 0, $sessionId = 0)
if (in_array($fileType, ['image/jpeg', 'image/jpg', 'image/png', 'image/gif'])) {
$work['show_content'] = Display::img($work['show_url'], $work['title']);
} elseif (false !== strpos($fileType, 'video/')) {
$work['show_content'] = Display::tag(
'video',
get_lang('FileFormatNotSupported'),
['src' => $work['show_url']]
);
}
}

Loading…
Cancel
Save