Good morning, in my SCORM package there is a "main content page" in a file, which has the generic code for managing the loading and unloading (LMSInitialize, LMSFinalize, and stuff)
There are also "other content pages" in several files. The "main" simply loads the "other" via URL parameter. Each organization node of the SCORM module suplies this parameter, all of them are linked to the "main content page", the only difference is the parameter.
The thing begins here. I'm using a XMLHttpRequest object in my code to insert the body contents of the "other content pages" into the body of the "main content page" directly upon loading. All works fine outside, but when importing and loading the package in Moodle 1.9 latest stable release, it fails. After calling "send()" with the correct path, the returned "responseXML" is null.
I'd like to ask if It's a bug, or if it's some kind of blocking for security,... and if there is some way to solve. Please, even if there isn't, say me as soon as possible. Here is the code also, thanks.
function GetReferencedPageBodyContents(referencedPage)
{
if (window.XMLHttpRequest)
{
// Código para los demás navegadores
xmlhttp = new XMLHttpRequest();
}
else
{
// Código para IE6 y IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET", referencedPage, false);
xmlhttp.send();
xmlDoc = xmlhttp.responseXML; // <--This is null!!
xmlBody = xmlDoc.getElementsByTagName("body")[0];
return xmlBody.children;
}