Forum Discussion
Variable Reporting to LMS as Score
Hi everyone,
I'm stuck here...I've been going back and forth through eLearning Heroes and everything I can find is extremely dated and I have not been able to get anything to work with testing in ScormCloud.
Essentially, I have a Layer on a slide that a score will be entered into. This is a text entry box (or I can convert it to numeric entry). A value will be entered into this. I have the trigger for TextEntry1 showing as "When Text Entry 1 loses focus, Set v_FinalScoreValue equal to typed value"
v_FinalScoreValue is the variable I want to send to the LMS as the score.
I have tried to do the survey work around I have found - where you set the variable to the value of the survey entry - but that hasn't worked. (Report Number Variable Result to LMS - Articulate Storyline Discussions - E-Learning Heroes)
I have tried this JavaScript code:
// Get the player's score variable from Storyline
var player = GetPlayer();
var finalScore = player.GetVar("v_FinalScoreValue");
// Send the score to the LMS
SCORM_SetScore(finalScore, 100, 0);
I am also trying to use xAPI in this project. I have tried a number of combination of things to try and get this to work.
Any insight from the experts?
- KendalRasnake-1Community Member
Hi Timothy,
Here is some code I use to move reported variables around in my LMS reporting, esentially replacing one with another. Using this code, the LMS will report the question ID under the Learning Objective column, and it will report the question text description under the ID column.
if (typeof GetPlayer == "function") {
strLearningObjectiveID = strID.replace(/[ \t\r\n\v\f]/g, "_");
strID = strDescription.replace(/[ \t\r\n\v\f]/g, "_");
}
I put this in my scormdriver.js file after publishing from Storyline and before zipping and uploading to the LMS.
Perhaps you could substitute your "v_FinalScoreValue" for one of the currently reported variables.
I have a walkthrough about this on my website: Question Text Reporting in the ADP LMS (memorablelearning.com)