PDFs not loading IE

PDFs not loading IE

by Andrew Lowkis -
Number of replies: 23

Hi

Has anyone else got this problem?  OXBOX scorm 1.2 - Moodle 2.4.1+, scorm loads all content except PDFs in IE.  Tried IE9 and IE10 and compatibilty mode.  All works fine in Chrome and Firefox.

Average of ratings: -
In reply to Andrew Lowkis

Re: PDFs not loading IE

by Jonathan Newman -

We have been running into the same issue (works in Chrome and Firefox but not IE) but not just in Scorm packages. We see the same behaviour when the .pdf resides in a Moodle Folder resource.

In reply to Jonathan Newman

Re: PDFs not loading IE

by Andrew Lowkis -

No problem with PDFs in any course just in the Scorm.

In reply to Andrew Lowkis

Re: PDFs not loading IE

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Andrew,
could you share your SCORM package or a demo one affected by the same issue?

Matteo

In reply to Matteo Scaramuccia

Re: PDFs not loading IE

by Andrew Lowkis -

Hi Matteo

Can you send me a direct email address and I'll reply with a path to download this scorm?  It's too big to upload here.

In reply to Andrew Lowkis

Re: PDFs not loading IE

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

HI Andrew,
just tested: PDFs work under Chrome (inline viewer), in FF (external viewer => download), they don'work with IE as you told.
The HTTP Headers are correct, as expected, e.g.:

HTTP/1.1 200 OK
Date: Thu, 21 Mar 2013 22:23:11 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.3.8
Expires: Fri, 22 Mar 2013 22:23:11 GMT
Cache-Control: max-age=86400
Content-Disposition: inline; filename="gwys_p1_hs.pdf"
Last-Modified: Thu, 21 Mar 2013 22:20:03 GMT
Etag: b333c00a45cfd8126168d3fc2c484194860f9f2a
Accept-Ranges: bytes
Content-Length: 558745
Connection: close
Content-Type: application/pdf

It looks like a bad interaction between IE and the IFRAME used by the SCORM Module to embed the SCORM content (see mod/scorm/module.js): unfortunately it seems there's no way to let PDFs cross-work with inline mode. I'll try to find out a possibile workaround.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: PDFs not loading IE

by Andrew Lowkis -

Hi

I have added <meta http-equiv="X-UA-Compatible" content="IE=8" /> directly under the Head tag in the general.php of my theme.  This then made the PDFs viewable but killed all links to the icons through out the moodle site.

In reply to Andrew Lowkis

Re: PDFs not loading IE

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Andrew,
try this patch below:

# git diff mod/scorm/loadSCO.php
diff --git a/mod/scorm/loadSCO.php b/mod/scorm/loadSCO.php
index dd569c1..65ef2d6 100644
--- a/mod/scorm/loadSCO.php
+++ b/mod/scorm/loadSCO.php
@@ -161,6 +161,10 @@ if (scorm_external_link($sco->launch)) {

 add_to_log($course->id, 'scorm', 'launch', 'view.php?id='.$cm->id, $result, $cm->id);

+if ($sco->scormtype == 'asset') {
+    header('Location: ' . $result);
+}
+
 // which API are we looking for
 $LMS_api = (scorm_version_check($scorm->version, SCORM_12) || empty($scorm->version)) ? 'API' : 'API_1484_11';

It skips the loading of SCORM RTE stuff for those SCOs being declared as "Asset": it works on my IE9 and it shouldn't break anything related with tracking real SCOs.

When you'll confirm, I'll file an improvement into the Tracker at least to let this change land into Moodle 2.5.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: PDFs not loading IE

by Alex 09 -

Hi Matteo

Many thanks for the above patch. I tried it and now PDFs within a SCORM package are showing fine in IE10.

Alex

In reply to Matteo Scaramuccia

Re: PDFs not loading IE

by Alex 09 -

Hi Matteo

I may have spoken too soon. Whereas they open fine in the desktop version of IE10, when using the start screen version I am asked whether I want to open or the save the PDF, rather than it opening within the page.

This could perhaps be a setting within my start menu IE10 however?

Many thanks
Alex

In reply to Alex 09

Re: PDFs not loading IE

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Alex,
it should be a setting in your PDF Reader, at least for me using PDF-XChange Viewer.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: PDFs not loading IE

by Alex 09 -

Hi Matteo

I'm sorry but I have run into another problem since applying your patch. Since applying the patch our Active Teacher Exploring Maths SCORMs display very small in the centre of the page. Before the patch they displayed at the expected size.

I have tested that it was the patch by removing it and they displayed at the correct size, but re-doing the patch made them small again.

Many thanks
Alex

In reply to Alex 09

Re: PDFs not loading IE

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Alex,
that's strange:

  1. is it possible for you to share this package or a reduced version of it (send me a PM with the URL to download it)?
  2. please follow MDL-38678: there I'm preparing the patch proposal. What written few posts above was just a quickly tested PoC (e.g.: it lacks exit())

Matteo

In reply to Matteo Scaramuccia

Re: PDFs not loading IE

by Alex 09 -

Hi Matteo

I wouldn't be happy sharing the package as it is a bought in package and comes with certain terms of use etc. Here is a link to one of the packages we're having problems with. I don't know if maybe they would supply an evaluation version to help with testing?

It is only the Exploring Maths range that is giving us problems at the moment as we have other packs from Pearson and they work fine.

The problem is also more pronounced in IE10 than it is Chrome or Firefox. Although the resources show at a decent size in Chrome and Firefox, they don't fill as much of the screen as they did without the patch.

Many thanks
Alex

In reply to Alex 09

Re: PDFs not loading IE

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Alex,
mmhhh it comes as CD ROM format and I'm not in the position to ask them for a demo.

BTW, in the next hours I'd like to close the patch proposal in the tracker and I'll review the code "skipped" by using my PoC to see how it could alter your resources' size (I expect them to be Assets, derived from the CD ROM format), probably some interactions with the TOC and the RTE checks.

Matteo

In reply to Matteo Scaramuccia

Re: PDFs not loading IE

by Alex 09 -

HI Matteo

Many thanks for your continued efforts to help resolves this problem. I don't know if it will help or not but I have attached screenshots (without patch is first) of what the SCORM looks like with and without the patch.

The 'with patch' does have a curious 'a b c d r e'  to the far right - I have no idea what this is, but as you can see without the patch it doesn't show up.

Thanks again
Alex

Attachment with_patch.jpg
Attachment without_patch.jpg
In reply to Alex 09

Re: PDFs not loading IE

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Alex,
mmmhhh that's strange! I guess that those letters and the HTML around them are the root reason fot this sizing issue: garbaging? Easter egg?
Please:

  1. close and re-open your browser
  2. cleanup the cache of your browser
  3. apply the patch in the tracker, reading the testing instructions: basically JS cache to be manually purged
  4. launch your package and select that item
  5. provide me by PM the URL for the HTML of the page (or the credential to launch <what course> and <what item> by myself), if the issue is still there

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: PDFs not loading IE

by Alex 09 -

Hi Matteo

Sorry to be a pain but I am off work for the next 2 weeks as it is our easter holidays. I also don't have any FTP details so cannot apply/remove the patch etc.

I guess no one else has the same issues so that they can do the testing?

Cheers
Alex 

In reply to Alex 09

Re: PDFs not loading IE

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Alex,
unfortunately you're the only one to have such kind of issue and I'm not able to identify what's causing that problem. We'll see what could be when you'll come back in the office.

Happy Easter,
Matteo

In reply to Matteo Scaramuccia

Re: PDFs not loading IE

by Alex 09 -

Hi Matteo

Has this moved on at all in the last 2 weeks since I have been out of the office?

Many thanks
Alex

In reply to Jonathan Newman

Re: PDFs not loading IE

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi All,
just tested with a PDF, e.g. http://www.synergy-learning.com/docs/Moodle2_Admin_Map.pdf, downloaded locally and then added by DnD-ing the PDF into a course topic i.e. creating a resource with default settings: IE 9 is opening that PDF embedded into the page as per default configuration (Options > Display > Automatic).

What happens in your systems using the steps above, eventually changing the Display setting to test all the 5 choices?

Matteo

In reply to Andrew Lowkis

Re: PDFs not loading IE

by Alex 09 -

I would just like to add that I am experiencing the same problems with PDFs that are within a SCORM package. I have found that they work fine using IE8 and all other browsers, but I just get a blank page when using IE9 or IE10. The packs I am struggling with are the Oxford GCSE Maths for Edexcel Homework Bumper VLE Pack. We currently use these packs in Moodle 1.9 and don't have any problems in any browser.

I added <meta http-equiv="X-UA-Compatible" content="IE=8"> after the <head> tag in my general.php, and then they worked in IE9 and IE10. However, when I did this various icons stopped showing in IE9 and IE10, icons such as the '?' on the login page that tells you about cookies.