-
-
Save matthewphewes/e7a4fe703006bd1e18aa to your computer and use it in GitHub Desktop.
Articulate Storyline score/data submission and forwarding to a results page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Retrive the player instance so we an retrieve stored variables | |
var player = GetPlayer(); | |
// These are variables saved within your Storyline module | |
var nameValue = player.GetVar("Name"); | |
var scoreValue = player.GetVar("score"); | |
// We create a session value (random number) so the value cannot and will not be submitted more than once | |
var sessionValue = Math.floor(Math.random()*9999999999999999999999999999); | |
// This creates a URL and retrieves it... forwarding the entire browser window to the results page | |
var url = "http://learntelehealth.org/games/hubandspoke?username="+encodeURIComponent(nameValue)+"&score="+encodeURIComponent(scoreValue)+"&session="+sessionValue; | |
window.location = url; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment