Programming tips: Objective IDs in Articulate Storyline
In recent weeks, we were faced with a challenge from one of our clients, here at Pathways Training and eLearning, to report several scores from just one eLearning module. Let me give you some context on what we were developing.
For this project, we were tasked to create several different tests within one Storyline file, to which the users would have access via a menu on the first slide. While this is simple to do, the most challenging part was to report to the LMS, the score from each one of these tests.
After some research, we found out that this was possible by reporting different objective IDs, but how were we going to achieve this? Was this an LMS configuration or a custom programming inside our eLearning module?
Then let’s add the following code to the trigger:
var lmsAPI = parent;
var player = GetPlayer();
var test_result = player.GetVar('test1_result');
lmsAPI.SetObjectiveScore('objectiveID_1', test_result, '100', '0');
This is how the code above works:
The variable player, retrieves the Storyline player that contains all the information we need to send to the LMS.
The test_result variable retrieves and contains the score percentage that was calculated with the results slide.
And the last line, is simply reporting to the LMS, the score percentage under the objective ID “objectiveID_1”, that should be in the range between 0 and 100.
After this, you should be able to report as many scores as you want to your LMS.
If you want to know more about eLearning, please visit our website at www.pathwaystrainingandelearning.ca.
#torontoelearningvendor #CanadianeLearningvendors #topeLearningcompanies #PathwaysTrainingandeLearningInc #Pathways #Canadiantrainingcompany