External manifest and cross-domain question

External manifest and cross-domain question

by Justin Templemore-Finayson -
Number of replies: 3

Hi there!

I want to host my SCORM packages on an external server. But I have heard that cross-domain restrictions will prevent the SCORM being able to communicate with my LMS server.

Question:

Are moodle.mysite.com and files.mysite.com considered cross-domain? Or would my SCORM on files.XXXX be able to communicate correctly with my LMS on moodle.XXXX ?

If not, is there another way to do this (my servers are completely separate) ?

Thanks in advance!


Average of ratings: -
In reply to Justin Templemore-Finayson

Re: External manifest and cross-domain question

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

Hi Justin,

Are moodle.mysite.com and files.mysite.com considered cross-domain?

Yes

Or would my SCORM on files.XXXX be able to communicate correctly with my LMS on moodle.XXXX ?

No, they must be hosted in the same origin which means, in the old days:

  1. For any browser but IE: same scheme/protocol, same hostname, same port
  2. For IE: same scheme/protocol, same hostname

In the past, you were used to host the content in the same origin of the Moodle instance i.e run the content on the same "web server" under a virtual folder/alias or on another web server but exposed via a reverse proxy under the same origin above.
This is how in the past they solved this issue unless using "complex" SCORM Proxy solutions.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: External manifest and cross-domain question

by Justin Templemore-Finayson -

Thanks for the confirmation Matteo, unsuspected as much, but was hoping.

I stumbled upon the CORS specification. Have you ever tried this or seen it work ? I had never heard about it so I have some doubts...

https://en.m.wikipedia.org/wiki/Cross-origin_resource_sharing

In reply to Justin Templemore-Finayson

Re: External manifest and cross-domain question

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

Hi Justin,
CORS allows, under policy settings, the JavaScript running into an origin to connect to another origin e.g. JavaScript in Moodle code to consume a RSS feed.

SCORM Run Time Environment (RTE) requires the ability to search and consume the methods exposed by a JS object called API, exposed to the content by the LMS, here Moodle, in a parent window with respect to where the SCORM content is hosted.

Shortly, nothing that CORS could enable.

HTH,
Matteo