Its driving me crazy. Can we change the results variable in storyline via JavaScript??
I have added a "set Javascript" trigger on result slide and the code is:
var player = GetPlayer(); var score =player.GetVar("hazards"); var passPoints = 56; player.SetVar("Results.PassPoints",passPoints); player.SetVar("Results.ScorePoints",score);
hazards is a number variable I have created in storyline.
What solution does Storyilne offer if I need to pass the user score value not through the Results.ScorePoints variable, but via a variable I built myself?
I made a few graded interactions which cannot be tracked using the system variable and I have to pass the score to LMS via SCORM protocol.
It is not possible in Storyline to set a variable to report to the LMS instead of the baked in results slides. You can use javascript instead to do this.
Unfortunately I couldn't adjust the score variable via the player.GetVar and player.SetVar methods, but the repoting still failed. I sent the source file to th support team and was told it is not possibl using javascript. Maybe you know something I don't? ;)
Hi, all -- Just stopping in to note for those who come across this thread who may be unaware, we are not able to provide JS support but there are lots of knowledgeable community members who are usually more than willing to assist. Also, here's our JS Best Practices sheet for quick reference. :)
9 Replies
You cannot change the results variables in javascript.
Hi Phil,
What solution does Storyilne offer if I need to pass the user score value not through the Results.ScorePoints variable, but via a variable I built myself?
I made a few graded interactions which cannot be tracked using the system variable and I have to pass the score to LMS via SCORM protocol.
Thanks in advance,
It is not possible in Storyline to set a variable to report to the LMS instead of the baked in results slides. You can use javascript instead to do this.
Hi Oren! Looks like Phil was able to assist you here :)
Thanks Phil and Leslie
Unfortunately I couldn't adjust the score variable via the player.GetVar and player.SetVar methods, but the repoting still failed. I sent the source file to th support team and was told it is not possibl using javascript. Maybe you know something I don't? ;)
Hi Oren! I'm no JavaScript expert, so I'll defer to the community to assist you with this one.
Can you provide the code to do this? Do you need to overwrite any of the JS that Storyline writes to do this?
See this thread here for a JS trigger to report a custom varibale to an LMS.
Hi, all -- Just stopping in to note for those who come across this thread who may be unaware, we are not able to provide JS support but there are lots of knowledgeable community members who are usually more than willing to assist. Also, here's our JS Best Practices sheet for quick reference. :)
This discussion is closed. You can start a new discussion or contact Articulate Support.