Storyline 360 suspend data handling

977 views Asked by At

Good Day!

Being new to SCORM, I was wondering how Storyline 360 handles its suspend data. Does it affect the how it handles suspend data based on the LMS that you are using?

I have a scene that will generate a certificate for the learners upon completion. It defaults to the name that the LMS has and will auto-fill the input when the timeline starts.

One of the requirements for this is when a user changes the input to whichever name they desire, it should be saved and be retrieved upon their next visit. I used SCORM Cloud as a test LMS. My observation is that, for each relaunch of the course, it doesn't retrieve the name that I inputted from the last session through SetVar() and GetVar() methods.

I found a work-around by using lmsAPI.SetDataChunk to set the name then used lmsAPI.GetDataChunk to retrieve it. It worked well and fine but when it was deployed in our LMS it still retrieves something but, it is gibberish.

This is what I currently have by getting DataChunk:

This code will check if there were any saved names from previous sessions through GetDataChunk()

var player = GetPlayer();
var student = lmsAPI.GetStudentName();
var suspenddata = lmsAPI.GetDataChunk();
var username= player.GetVar("userName");
var displayname = "!";


if(suspenddata){
console.log("suspenddata is:"+suspenddata);
username=suspenddata;
}

if(!username){
console.log("username is null, setting to:  "+student); 
 username=student;
}

player.SetVar("userName",username);

if(username){
 displayname=" "+username+"!";
}
player.SetVar("displayName",displayname);
player.SetVar("nameInput",username);

When the user decides to change their name it will be saved to the storyline variable via SetVar() and is also passed to SetDataChunk() as shown below

var player = GetPlayer();
var nameinput = player.GetVar("nameInput");
var username = player.GetVar("userName");
var displayname = "!";

if(nameinput){
 console.log("nameinput is:"+nameinput);
 username = nameinput; 
 displayname=" "+username+"!";
 player.SetVar("displayName",displayname);
 player.SetVar("userName",nameinput);
 lmsAPI.SetDataChunk(username);
}else{
 console.log("nameinput is null");
}

This code works well when I deployed it to SCORM Cloud but as I said before, it would retrieve gibberish when deployed to our own LMS. I haven't tried deploying a version of this where it won't use DataChunk but even then the Storyline variables should be saved to the suspend data when deployed to SCORM Cloud but it doesn't. I am at my wit's end so any help would be appreciated. Thanks!

0

There are 0 answers