Custom Variable to LMS

Dec 14, 2016

So I have read numerous posts on how to create a JavaScript trigger to send a custom score to an LMS but am still struggling (after many days).

To  begin with "baby steps", I create a one slide project. Place a button on it and set a trigger to execute the following JavaScript when clicked...

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

I then added a second button to exit course.

When published to LMS, set Scorm to 1.2 (for Canvas) and tracking to slides.

Published, uploaded as graded assignment to Canvas and tested. 

Rather then recording a score of 70% (or 70 points if setting the assignment grading to "points") it always defaults to 100%.

Any ideas on what may be the problem?

Thanks!

Bill Creger

3 Replies
Learning Center

Hey Bill, this just jumped out to me upon reading this, but if you have the tracking set to track 2 of 2 slides and you have the second slide hidden, it won't read as completed because the participant isn't able to see the 2 of 2 slide, just 1 of 2, right? so maybe set it to track 1 of 2 slides and see if that works??

This discussion is closed. You can start a new discussion or contact Articulate Support.