I was actually doing this so I could put an Execute Javascript trigger on a Slide Master that would send the name of the slide to a Learning Record Store using xAPI. It actually works quite well and makes it so you only have to insert the javascript code once!
Oh yes. Good call Matthew! And you don't really need that console.log statement. But I like to throw those in there frequently to make it easier to debug when viewing the Javascript console in Chrome. :-)
Hi. I am using the build-in variable Quiz2.ScorePercent. When I pull it into the jsPDF it brings a value of null. I have referenced the variable on slides and it is bringing up a number, so I am not sure why it is bring up null in this instance.
9 Replies
I found a workaround - create a trigger that assigns the built-in variable to a user variable.
just curious, are you trying to create a custom menu?
That's a great use I hadn't thought of!
I was actually doing this so I could put an Execute Javascript trigger on a Slide Master that would send the name of the slide to a Learning Record Store using xAPI. It actually works quite well and makes it so you only have to insert the javascript code once!
Nice!
Here is more detail (per request from someone via email:)
I set up a trigger on my slide like this:
And then an Execute Javascript Trigger after it that contains this code:
/*Statement*/
var slideTitleSL = player.GetVar("slideTitle");
console.log(slideTitleSL);
Oh yes. Good call Matthew! And you don't really need that console.log statement. But I like to throw those in there frequently to make it easier to debug when viewing the Javascript console in Chrome. :-)
Where can I get the list of built-in variables you mentioned? I dont see Menu.SlideTitle
Hi, Yaach.
You can access the built-in variables through the variables manager:
I hope this helps!
Hi. I am using the build-in variable Quiz2.ScorePercent. When I pull it into the jsPDF it brings a value of null. I have referenced the variable on slides and it is bringing up a number, so I am not sure why it is bring up null in this instance.