- Getting the student’s name from LMS
- Getting the student’s status
- Getting and setting Lesson status
- Getting student’s Language preferences
- Sending user score to LMS
Develop a Storyline course with questions or assessment. If you are selecting Storyline’s default assessment, some pre-defined variables will be added to calculate the score by default. But storyline doesn’t allow access to those variables. As a result, we don’t have an option to adjust their values because Storyline takes full control over them.
If you want to send custom calculated score to LMS, this is how you do it:
Create a custom variable in Storyline
Adjust its value using triggers
Copy and paste the following code.
var player = GetPlayer();
- GetPlayer() – Returns an object that contains the methods and variable values of storyline
- lmsAPI – Is an object from Storyline’s SCORM API that contains the methods and values for establishing the connection and data flow from course to LMS
- SetScore(score, maxScore, minScore) – SetScore is a function inside lmsAPI object that sends the score to the LMS. It accepts 3 parameters “Score, Max Score and Minimum Score”
- commitData() – Is a function inside lmsAPI object that saves all the data sent to LMS in the database.
Make sure to set the LMS tracking based on the slides viewed and not Track using quiz result in case you are using Storyline’s default Assessment. If not Storyline overrides your custom score with its default result variable value.
Step 6 (Optional)
When the learner exits the course by clicking a button that has a trigger on it to exit the course, for Storyline 2 update 9 and below, it will still override the score to Zero even after setting the tracking option based on the slides viewed.,
In such case, we can use a workaround to exit the course without using the default trigger “Exit the course”.
You can add a trigger on the Exit button to Jump to the URL “./lms/goodbye.html” when learner clicks on it.