Java script to record Quiz score

Oct 12, 2015

Hi,

I have a SQL database so I can record where in a module learners click. Here is an example of workign code:  window.top.triggerLogging("widget", "codes");

Now,  I am trying to record the quiz results. But it is not working. Here is the non-workign code. It is not recording anything to the database:

window.top.triggerLogging("Quiz 1", player.GetVar("Results.ScorePoints"));

The Results.ScorePoints is a variable created by SL when you create a quiz results page. I am trying to record the actual value of the variable. 

Can anyone see what I might be doing wrong?

4 Replies
Ashley Terwilliger-Pollard

Hi Ben,

You may want to share the .story file here so that folks can take a look at your code in action as it's not something that we can offer support for. Also, as a reminder you'll want to confirm that you're testing the published output in the intended environment as testing it locally could cause you to encounter security restrictions where elements wouldn't work as expected. 

This discussion is closed. You can start a new discussion or contact Articulate Support.