Forum Discussion
Checking course completion with the LMS
Hi Eric, thank you for clarifying that it is still not possible to retrieve a previously sent “success” status from the LMS using Storyline.
Could you point me to a guide on how to create a query like that using JavaScript for SCORM 2004 projects?
Thank you!
Let me know if you find something different at any point, but I've looked into this a bit over the years and haven't found much in the how-to department. The good news is that all of the available JavaScript functions we would use to communicate with an LMS are already packaged with Storyline and very easy to call.
To find the list along with the contents of each function and a fair amount of settings, simply publish a course to your local drive, open the file folder, and navigate to the /lms folder, inside of which will be a very large scormdriver.js file. It can be a lot to browse through, and you may prefer an online manual to learn more about things, but you'll probably want a SCORM2004_GetStatus() function. It can be called in an Execute JavaScript trigger in Storyline like:
let status = window.top.SCORM2004_GetStatus();
I have not personally used it (yet) but I have used the SCORM2004_GetStudentName() function with great success a number of times. You'll need to test the course in an LMS or its testing environment of course, but if you're familiar with JavaScript then using that returned value elsewhere in the course should be simple.
If you want to get more granular, there is also a SCORM2004_GetScore() function, though again I've never used it. Someday soon I hope.