Forum Discussion
ClaireGarry-0e2
9 months agoCommunity Member
Send module progress to LMS (Cornerstone)
Hello everyone,
I'm in a bit of a bind because I recently created a Storyline module (with STL 360) and my client would like to see the module's progress go up in his LMS. I've tried several techn...
ClaireGarry-0e2
9 months agoCommunity Member
Hi Sam,
Thanks for your responsiveness and help.
As I'm not familiar with JS, I thank you and appreciate the fact that you went into so much detail in your response.
- If I understood correctly, my objectives weren't recognizable by the LMS because they weren't well defined. Given your code examples, I would "just" have to implement the code below in my first module slide to "create" the 36 objectives.
initObjectives = function()
{
var goals = 36;
for (var i = 0; i < goals; i++) {
// using the Storyline function SCORM_CallLMSSetValue
// which takes care of error handling and getting the API
var objid = "objective_"+i;
var success = SCORM_CallLMSSetValue("cmi.objectives." + i + ".id", objid);
if(success)
{
success = SCORM_CallLMSSetValue("cmi.objectives." + i + ".status", "not attempted");
if(!success) alert('Unable to set the status for the objective cmi.objectives.' + i + '.id');
}else{
alert('Unable to set the ID for the objective cmi.objectives.' + i + '.id');
}
}
}
// if the total amount of objectives set is 0 (zero), then initialize them
// this check ensures that the objectives are only initialized once!
if(SCORM_CallLMSSetValue("cmi.objectives._count") === 0) initObjectives();
- To enable the LMS to record progress throughout my module, I need to integrate the following javascript on one slide
// user starts the objective
SCORM_CallLMSSetValue("cmi.objectives.0.status", "incompleted");
- Then, on the next slide for example (or the slide corresponding to the achievement of the objective), I need to integrate the javascript
// user completes the objective ("passed", "completed", "failed");
SCORM_CallLMSSetValue("cmi.objectives.0.status", "completed");
Is this correct?