Highlighted

SCORM package not being read properly in certain browsers.

New Here ,
Jun 17, 2015

Copy link to clipboard

Copied

According to my LMS, this is the gist of the problem:

"Root cause is this package which, with some browser-specific logic, is calling function "SCORM_CallLMSInitialize()" contained within scormdriver.js twice - once too many. First call successfully initializes the API, but second returns an error (as this function should not run twice)."


Trying to get someone on chat support to help me... still waiting.  But in the meantime - does anyone know how to fix this?


Thanks!

Wanda

Views

692

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

SCORM package not being read properly in certain browsers.

New Here ,
Jun 17, 2015

Copy link to clipboard

Copied

According to my LMS, this is the gist of the problem:

"Root cause is this package which, with some browser-specific logic, is calling function "SCORM_CallLMSInitialize()" contained within scormdriver.js twice - once too many. First call successfully initializes the API, but second returns an error (as this function should not run twice)."


Trying to get someone on chat support to help me... still waiting.  But in the meantime - does anyone know how to fix this?


Thanks!

Wanda

Views

693

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 17, 2015 0
Adobe Community Professional ,
Jun 17, 2015

Copy link to clipboard

Copied

It is true that Initialize should not be executed twice. I've never had that issue with a Captivate course. When we create courses we use a start page that initializes then redirects to the content.

What version of Captivate and SCORM are you using?

You should be able to insert a variable in that function to stop it from executing twice. The bolded text is added:

var initCalled = false;

function SCORM_CallLMSInitialize() {
    if (!initCalled)
{
  var strResult;
  WriteToDebug("In SCORM_CallLMSInitialize");
  SCORM_objAPI = SCORM_GrabAPI();
  WriteToDebug("Calling LMSInitialize");
  strResult = SCORM_objAPI.LMSInitialize("");
  strResult = strResult + "";
  WriteToDebug("strResult=" + strResult);
  if (strResult == SCORM_FALSE) {
   WriteToDebug("Detected failed call to initialize");
   SCORM_SetErrorInfo();
   WriteToDebug("Error calling LMSInitialize:");
   WriteToDebug("              intSCORMError=" + intSCORMError);
   WriteToDebug("              SCORMErrorString=" + strSCORMErrorString);
   WriteToDebug("              Diagnostic=" + strSCORMErrorDiagnostic);
   return false;
  }
  WriteToDebug("Returning true");
  initCalled = true;
  return true;
}
}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
New Here ,
Jun 17, 2015

Copy link to clipboard

Copied

I am using Captivate 7.  The SCORM packages in question were actually developed and published well over a year ago, and have been in use in our LMS since then.  It wasn't until a couple of months ago that the problem started, and thus started my constant back and forth between my LMS and Adobe for support, each stating the other is the issue.

From what I understand, when I upload a SCORM zip file to my LMS, it unpackages it and creates a file called multiscreen.html - which I believe is supposed to initialize the content. I am copy/pasting below the entire message from my LMS support to see if that clarifies the issue and their suggestion.  I don't like to mess with the .js or .html files in the package, as I don't really have musth experience with that.  The suggestion that you posted - where would that go??  And do you still recommend that after reading the full email below?

Thanks!

Wanda

Hello Wanda,

I have the feedback from our developer team.

- No changes in LE have been implemented that could cause this

- Root cause is this package which, with some browser-specific logic, is calling function "SCORM_CallLMSInitialize()" contained within scormdriver.js twice - once too many. First call successfully initializes the API, but second returns an error (as this function should not run twice).

We want to stress that nothing has changed on the LE side to cause this behavior. If this only started occurring for client recently, it is likely a result of using a different or updated browser (I can't reproduce original error with IE, but easily with Chrome)

- Workaround -

Adjust each package to avoid calling this method more than once, regardless of browser.

For example, there is an iframe within multiscreen.html:

<frameset rows="100%,0%,0%,0%,0%" onload="OnLoad_Activities()" border="0">

<frame id="frame1" name="content" src="">

</frameset>

If this code is adjusted to NOT call function "OnLoad_Activities()", and instead directly set the "src" attribute, then original error alert doesn't occur anymore:

<frameset rows="100%,0%,0%,0%,0%" onload="" border="0">

<frame id="frame1" name="content" src="Math_Fractions_Time_Module4.htm">

</frameset>

We hope this helps your Course Designers implement a solution in your scorm packages.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
Adobe Community Professional ,
Jun 17, 2015

Copy link to clipboard

Copied

It looks like you are going to need to edit files either way. The function I am talking about is in the scormdriver.js file, which is also in a template. So you fix it once and it's always fixed (if it solves the issue). The file is located here:

C:\Program Files\Adobe\Adobe Captivate 7 x64\Templates\Publish\LMS\Standard\SCORM\Default\1_2\scormdriver.js

You would just find the function referenced in my post above, and replace it with what I posted.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
New Here ,
Jun 17, 2015

Copy link to clipboard

Copied

I've tried this... but it is not allowing me to save changes to the file

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
Adobe Community Professional ,
Jun 17, 2015

Copy link to clipboard

Copied

You probably don't have access to the Adobe folder. You'll need an Administrator to give you access. Can you try it on a published file? You'll need to unzip the package first, edit the file, then re-zip.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
New Here ,
Jun 17, 2015

Copy link to clipboard

Copied

I got admin access... made the changes and republished a SCORM.  Uploaded it to my LMS... and, sadly, it made no difference. I am still getting an error initializing communication with the LMS.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
Adobe Community Professional ,
Jun 17, 2015

Copy link to clipboard

Copied

Is this SCORM 1.2?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
New Here ,
Jun 17, 2015

Copy link to clipboard

Copied

indeed it is - the 2004 version doesn't play nicely with my LMS

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
Adobe Community Professional ,
Jun 17, 2015

Copy link to clipboard

Copied

And this happens when you run the desktop (SWF) version in Chrome? The HTML5 version is good?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
New Here ,
Jun 17, 2015

Copy link to clipboard

Copied

Seems to be.  I'm on a Mac, and it does the same in Chrome and Safari.  My LMS support says they're able to produce the error in Chrome, but it works fine in IE.  The really odd thing is that when I upload the SCORM to cloud.scorm.com, there doesn't seem to be any issues with it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
Adobe Community Professional ,
Jun 17, 2015

Copy link to clipboard

Copied

That's too bad, I was going to upload one there and see how it works.

You could possible try a true redirect instead of the iFrame.

In the multiscreen.html, Replace:

if (isHandheld){

    document.getElementById("frame1").src="index_SCORM.html" + lParamString;

   }

   else

    document.getElementById("frame1").src="Initialize_test.htm" + lParamString;

  }

 

With:

if (isHandheld){

    document.location.href="index_SCORM.html" + lParamString;

   }

   else

    document.location.href="Initialize_test.htm" + lParamString;

  }

Then replace "Initialize_test.htm" with your file name.

Then delete:

<frameset rows="100%,0%,0%,0%,0%" onload="OnLoad_Activities()" border="0">

  <frame id="frame1" name="content" src="UntitledFrame-1">

<frame src="UntitledFrame-2"><frame src="UntitledFrame-3"><frame src="UntitledFrame-4"><frame src="UntitledFrame-5"></frameset>

<noframes>

  Your browser must be able to view frames for this content to display.

</noframes>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2015 0
New Here ,
Aug 15, 2020

Copy link to clipboard

Copied

I am also in the same situation now. The problem is x-platform (windows, mac) and x-browser (firefox, chrome, safari). I really would appreciate some help Thanks in advance!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 15, 2020 0
Adobe Community Professional ,
Aug 17, 2020

Copy link to clipboard

Copied

Can you provide all of the details, CP version, LMS, specific error?

 

Is it the initialize multiple times issue?

 

Do you have a report of the SCORM calls?

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 17, 2020 0