Problems in setting current page value

Hi,

I prepared an HTML based course using a SCORM compliant library. I tested the course on scorm.com cloud and it works fine. When I sent it to my client to be uploaded on corporate Lectora installation, testing it they found a problem in setting current page value with API.LMSSetValue, specifically an Incorrect data type (the diagnostic is "the type being used as the set value argument does not match that of the element being set").


Unfortunately I cannot test it myself so I'm trying to understand the problem just looking at the code. This is the call that originates the problem


ScormProcessSetValue("cmi.core.lesson_location", currentPage);


and this is the function:


function ScormProcessSetValue(element, value){


var result;


if (initialized == false || finishCalled == true){return;}


result = API.LMSSetValue(element, value);


if (result == SCORM_FALSE){

var errorNumber = API.LMSGetLastError();

var errorString = API.LMSGetErrorString(errorNumber);

var diagnostic = API.LMSGetDiagnostic(errorNumber);


var errorDescription = "Number: " + errorNumber + "nDescription: " + errorString + "nDiagnostic: " + diagnostic;


alert("Error - Could not store a value in the LMS.nnYour results may not be recorded.nn" + errorDescription);

return;

}

}



Currentpage is a simple incremental number, so I really can't understand what the problem may be.


Thank you for any help.


FabrizioU

Discussion (1)

cmi.core.lesson_location requires a string value. You've just said it's a number. SCORM Cloud has one of the most flexible SCORM APIs that will do a lot of work for you - like converting numbers to strings. Other LMSs are not as forgiving. So read the manual (http://scorm.com/scorm-explained/technical-scorm/run-time/run-time-reference/) and check your variable types before submitting.


Let me know if this helped.


Also, I don't understand why you posted this in an authoring tool forums. What's that "corporate Lectora installation" you were referring to? It certainly isn't an LMS.

Discussions have been disabled for this post