From 392f443e5ce5aed2cf4cc0f8b9a82a6d118980d9 Mon Sep 17 00:00:00 2001 From: Derek Henderson <2shediac@rogers.com> Date: Tue, 19 Nov 2024 18:07:06 +0100 Subject: [PATCH] MDL-77646 lib: Use iframe instead of object to display pdf. --- lib/resourcelib.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/resourcelib.php b/lib/resourcelib.php index 6e505d9f25e..cbd16cf76c2 100644 --- a/lib/resourcelib.php +++ b/lib/resourcelib.php @@ -233,13 +233,12 @@ function resourcelib_embed_pdf($fullurl, $title, $clicktoopen) { global $CFG, $PAGE; $code = << - - - $clicktoopen - - -EOT; +
+ +
+ 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);