mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
MDL-77646 lib: Use iframe instead of object to display pdf.
This commit is contained in:
parent
2f82f5fe8c
commit
06f256fd60
@ -233,13 +233,12 @@ 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;
|
||||
<div class="resourcecontent resourcepdf">
|
||||
<iframe id="resourceobject" src="$fullurl" title="$title" width="800" height="600">
|
||||
$clicktoopen
|
||||
</iframe>
|
||||
</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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user