Skip to main content
Participant
October 2, 2017
Question

Captivate export. Js error

  • October 2, 2017
  • 1 reply
  • 947 views

Hello

I'am trying to play a captivate export. But when i load the index_scorm.html i have this error in the js console.

Uncaught TypeError: Cannot read property 'charAt' of undefined

    at cp.QuizState.readNumber (CPM.js:1320)

    at cp.QuizState.readString (CPM.js:1322)

    at cp.PlaybackController.restoreObjectsFromState (CPM.js:1398)

    at Function.cp.resumeValuesFromDataChunk (CPM.js:1315)

    at cp.PlaybackController.RestoreQuizState (CPM.js:1439)

    at Function.cp.NewQuizLibraryInit (CPM.js:1014)

    at Function.cp.CPPreInit (CPM.js:1022)

    at Function.cp.ContinueCPInit (CPM.js:2192)

    at LoadContent (CPM.js:1314)

    at InitializeExecuted (scormdriver.js:1879)

the module it's not play on a LMS. I have my own wrapper to get scorm data.

Somebody did have this error ?

This topic has been closed for replies.

1 reply

RodWard
Community Expert
Community Expert
October 2, 2017

Upload the SCORM zip file to SCORM Cloud and test whether you get the same issue there.  If it does work fine, then the issue is not with the Captivate file but must be either with your web server or your own JS code.

Participant
October 2, 2017

I test on Scorm Cloud like you said it is working.

But the think that i don't understand it i test the same wrapper on another Captivate Module and i don't have the pb.

For the moment the js wrapper look like :

var API = new MyApi();

    function MyApi() {

    this.LMSInitialize = function() {

console.log('LMSInitialize');

};

this.LMSGetValue = function() {

};

this.LMSGetLastError = function() {

cp.

};

this.LMSGetErrorString = function() {

};

this.LMSGetDiagnostic  = function() {

}

this.LMSSetValue = function(k, v) {

alert(k)

}

    };

I set an alert in LMSSetValue and i see the first key is cmi.core.exit and the value is suspend i don't know if it is normal

Raymond_Ford
Participating Frequently
April 2, 2019

Did you ever figure it out?