Moodle 3.0 - Read pdf on iphone 6 ios11

Moodle 3.0 - Read pdf on iphone 6 ios11

by Verónica V. -
Number of replies: 0

Hello everyone, I write because a student complains that he can not view PDF files embedded in Moodle. It happens with all the browsers and from what I could see is not a problem of the browser since in other pages (outside Moodle) you can see them. Has anyone gone through this situation?

Can IPhone not accept <object> tags? If so, would changing the tag to <iframe> be bad?

lib/resourcelib.php

-----------------------------

function resourcelib_embed_pdf ($ fullurl, $ title, $ clicktoopen) {

    global $ CFG, $ PAGE;

    $ code = <<< EOT

<div class = "resourcecontent resourcepdf">

  <object id = "resourceobject" data = "$ fullurl" type = "application / pdf" width = "800" height = "600">

    <param name = "src" value = "$ fullurl" />

    $ clicktoopen

  </ object>

</ div>

EOT;

    // the size is hardcoded in the boject obove intentionally because it is adjusted by the following function on-the-fly

    $ PAGE-> requires-> js_init_call ('M.util.init_maximised_embed', array ('resourceobject'), true);

    return $ code;

}

-----------------------------

I appreciate if you can help me.
Best regards.
Verónica.

Average of ratings: -