Forum Discussion

ClaireGarry-0e2's avatar
ClaireGarry-0e2
Community Member
9 months ago

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 techniques find on forums or more generally internet (using the score, using several Js codes to execute...) but none of them seem to work.

The latest one, which seems to me to be the most complete, after reading a Cornerstone article on the subject (here's the link), is as follows:

In the first module slide, I create number of objectives (corresponding to the units) using a Js code :

// Define the number of objectives to be created
var number_goals = 36;

// Loop to create and send each objective as incomplete
for (var i = 1; i <= goal_number; i++) {
var objective_id = "objective" + i;

// Send each objective as incomplete to the SCORM API
var success = lmsAPI.Set("cmi.objectives." + objectif_id + ".id", objectif_id);
success = success && lmsAPI.Set("cmi.objectives." + objectif_id + ".status", "incomplete");

Then, at different stages of the module and as I go along, I update the status of each objective (in order) using this code:

var lmsAPI = parent; // Connect to the LMS API

// Identify the objective to be updated
var objective_id = "objective1"; // Modify according to the specific objective to be updated

// Update objective status to "completed
var success = lmsAPI.Set("cmi.objectives." + objectif_id + ".status", "completed");

 

The latter doesn't seem to work either... Does anyone have any experience of this problem and a solution?

Thanks for the future help!

Claire 

  • Well, we tested the blank files with my client and unfortunately the "units" remain at 1 and the progress doesn't seem to be registering or increasing in Cornerstone...

  • I noticed that I hadn't updated Objective 0 from the start. So I did it on this last attachment, but that doesn't seem to work either. The LMS still only displays one unit and the progress bar doesn't increase. I'm considering two solutions:
    - change the first code by setting the status to "incomplete" instead of "not attempted" and/or integrate all the codes used to define objectives as incomplete into this first code located on the first slide
    - implement a Js file in the story_content folder as mentioned in the storyline article located here, integrating the first code (with or without changing "not attempted" to "incomplete" and/or adding the codes to define the objectives as incomplete) in this first code located on the first slide. But I'm not sure how to do it.

    I confess that my lack of knowledge of Js leaves me a little unprepared!

    In any case, thank you very much for your time and help.

  • Hi Claire,

    I had an error in the script I posted which would prevent the init function from running. Hopefully this is all that was causing the issue.

    I have run this on SCORM Cloud (testing service) and checking the logs can see all objectives are updating as expected.

    https://app.cloud.scorm.com/sc/guest/ViewDebugLog?logId=19ef3cf5-160d-4911-8b0c-0ddd29afc2c8&courseTitle=Test_V4

    I the init function didn't run, it would mean Cornerstone would not be aware of a total number of objectives, only those that the status was set to incomplete and complete on.

    Cheers,
    Sam

  • BTW, I'm in Australia, so we're in quite different time zones.

  • Hello Sam,

    Yes, I can see the console log! And yes, there's quite a time difference with France!


    I confirm that everything is working perfectly this time!
    Including in multiscorm (we indeed have several modules in different languages that we group together in one and the same SCORM)!
    Thank you again for your help. I think this will be the most populated forum on this subject, which is great for the community!!!!

    Have a nice day and thanks again!