Picture of David Lockwood
Chrome unable to connect to LMS
by David Lockwood - Wednesday, 7 January 2015, 6:29 AM
 

I'm serving a course from Moodle with the launch.html trick that has been discussed on this forum (a launch.html that uses window.open to open the course in a new window) to allow it to be adaptive.

Works on safari but on chrome I am having a few issues.

- the new window isn't spawned. It looks like chrome deliberately prevents windows being opened automatically in this way. I have added a manual open new window button to workaround this but I think this is causing this next major issue ->

- I'm getting the can't connect to LMS error from the Spoor extension. If I press cancel every time this appears the course eventually loads (and works pretty well) but if I press ok it gets stuck on the loading screen. 

I hacked the code to remove the error message but then it just gets stuck on the loading screen. It looks like the cancel button is sending a return code that allows it to continue.

It looks like it can't find the API object in chrome. I think it's due to the pipwerks.SCORM.API.get function in SCORM_API_wrapper.js. The new window can't find the Moodle SCORM API.

Any got any ideas on where I should look to fix this or any workarounds? Ideally I'd fix it to communicate with the LMS but otherwise I want it to fail silently and continue, or if I can get ipad chrome to not block auto pop ups...

Picture of Matt Leathes
Re: Chrome unable to connect to LMS
by Matt Leathes - Wednesday, 7 January 2015, 9:32 AM
 

Chrome - is it maybe the popup blocker?

Failing to find API - I know this will happen on Moodle when using launch.html if you set the SCO to 'open in new window'. IF that's what you have set, change to 'open in same window'.

Picture of David Lockwood
Re: Chrome unable to connect to LMS
by David Lockwood - Thursday, 8 January 2015, 12:08 AM
 

Thanks Matt.

I've got the pop blocker disabled but it looks like that doesn't prevent automatically launched pop ups being blocked. There has to be some user interaction, such as a click, to allow a pop up.

Which would be fine except when I launch the new window from a click I get the can't connect to LMS error. On desktop the automatically opened window can connect to the LMS without problems, but I launch it from a click I see the same error. So it's definitely that.

So I think I need to either

- get ipad chrome to respect pop up blocker settings

- get the LMS connection working when new window is opened from a click

 

 

Picture of Matt Leathes
Re: Chrome unable to connect to LMS
by Matt Leathes - Thursday, 8 January 2015, 10:27 AM
 

Oh I see, sorry I didn't realise you meant Chrome on iPad

To be honest, we've always struggled with getting that to work as well and - for that reason - generally state that only Safari on iOS is supported.

I'm not sure Chrome on iPad is even part of the list of browsers supported by Adapt.

One interesting point to note - Apple actually don't allow any HTML rendering engine other than the 'webkit' engine built into iOS. So, when you use a browser like Chrome on iOS, it's not actually Chrome - it's still effectively Safari, only with a different interface. And, on iOS7 and below, somewhat slower than the 'real' Safari.

Picture of David Lockwood
Re: Chrome unable to connect to LMS
by David Lockwood - Tuesday, 13 January 2015, 3:05 AM
 

Thanks Matt.

I've ended up modifying spoor to just silence the error messages. Very far from ideal but I'd rather have it fail silently and have the user be able to complete the course without SCORM interaction than fail completely.

Interesting info about chrome on ipad as well.