Forum Discussion
Sending a Numeric Variable to an LMS
Jennifer and Nadim, thank you both so much for the quick responses.
Both of you mentioned using the "How Many" survey slide, and that was something that I had already figured out.
What both of you helped me to realize is that the "answer" to the survey question isn't read by the LMS as a score, but it may be sent to the LMS as data that can still be found.
I made one adjustment to the survey slide based on Nadim's example and ran a test through the LMS. I was able to do exactly what Jennifer showed. The survey response was indeed sent to the LMS, but not as a score. It did however, give me the Passed/Incomplete information. I had to click another "details" button, but was able to find the survey response in the LMS data.
Ultimately, I'd love to have the survey response show up as a score in the LMS, so if it isn't too much trouble, Nadim, could you share with me what would need to be done with JavaScript in order to send as the score?
Regardless, I am not trapped any more. I have a way to track the data, so I thank you both very, very much!
Steve
If you only want to report totalPoints as a score in the LMS using JavaScript, there's no need to use a survey question or result slide. Instead, you can use a blank standard slide, as shown in the attached example. Simply run the JavaScript when the timeline starts on the slide of your choice.
const LMS = parent;
const score = getVar('totalPoints'); //assuming totalPoints variable is created in Storyline
LMS.SetScore(score, 100, 0);
If you still want to keep the survey response and use it as the reported score, use the updated version of the previous file included here. It includes the necessary JavaScript to set the value as the score in the LMS.
Related Content
- 7 months ago
- 7 months ago
- 7 months ago
- 7 months ago