mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 03:46:42 +02:00
MDL-22338 PDFs now display in resources :/
This commit is contained in:
parent
26ffb4b172
commit
b8037d7316
3 changed files with 30 additions and 3 deletions
|
@ -73,6 +73,10 @@ function resource_display_embed($resource, $cm, $course, $file) {
|
|||
if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image
|
||||
$code = resourcelib_embed_image($fullurl, $title);
|
||||
|
||||
} else if ($mimetype == 'application/pdf') {
|
||||
// PDF document
|
||||
$code = resourcelib_embed_pdf($fullurl, $title, $clicktoopen);
|
||||
|
||||
} else if ($mimetype == 'audio/mp3') {
|
||||
// MP3 audio file
|
||||
$code = resourcelib_embed_mp3($fullurl, $title, $clicktoopen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue