Adding a trigger to user.js after publishing.

Hi all, we have just implemented a new LMS (Brightspace by D2L) and all of a sudden a bunch of our SCORM packages are not tracking completion.

Brightspace does not seem to care about completion based on slide view, and only cares about a grade. Our other LMSs will take completion and assign a grade to it if we want. 

Anyway, through some searching around on the forums I was able to accomplish what we wanted by adding a trigger to the last slide that sent completion and a score through javascript:

//get LMS API
var lmsAPI = parent;
//set score; the first number is the score
lmsAPI.SetScore(100, 100, 0);
//set status; possible values: "completed","incomplete", "failed", "passed"
SetStatus("completed");

However, we have a couple hundred of these storyline packages, and I am wondering if it is possible to add this trigger to fire on the last slide without having to republish every one of them? Or, if there is another way to accomplish this with just modifying the published files vs having to go back into storyline and republihs/reupload.

Thank you all in advance for your help.

Roman

4 Replies
Christie Pollick

Hi, Roman -- Welcome to the community, and many thanks for your question here! Unfortunately, I am not able to provide support for JavaScript, so I'll need to defer to your fellow community members to assist you further. And in case you wanted to check it out, here is our JavaScript Best Practices and Examples sheet. 

Matthew Bibby

I don't think this is possible Roman unless you already had a JS trigger on the final slide of your projects. This is because there needs to be a trigger in Storyline that tells it to execute the JavaScript. 

I'm not sure, but it may be possible to change something in the various .js files that control the communication with the LMS? It is a risky way to go about things though as the LMS may be updated in the future and this would break your courses again. 

Maybe push back on the LMS provider? If they advertise that the LMS as SCORM complaint and it isn't, then that is not really a good way of doing business! 

Maybe your company needs to find an intern or a high school student who's looking for work experience? It's not hard to update the courses, just time-consuming and repetitive, but I think it is going to be the best way to move forward.