Forum Discussion
JasonChan1
12 years agoCommunity Member
Everything we know about Cornerstone on Demand and Storyline!
I thought I would start a thread about Cornerstone on Demand so there's a central place for people to read and add to. There seems to be a dearth of information about how CSOD and Storyline interac...
SteveFlowers
Community Member
The JS is pretty straightforward. We've been using similar to the below for awhile. HTML5 references the lmsAPI differently than the Flash output. A conditional check to see if a function exists typically helps send the calls in the right direction.
var player=GetPlayer();
//status is pretty simple.
SetStatus("completed");
//if you also want to set the score.
lmsAPI=parent;
var tPercent=player.GetVar("SLSCORE"); //grab a score variable from storyline
if(lmsAPI.hasOwnProperty("SetScore")){
lmsAPI.SetScore(tPercent,100,0);
}else{
SetScore(tPercent,100,0);
}
Will_Findlay
7 years agoCommunity Member
Thanks Steve! Do you have the version of the code that accounts for HTML5 vs. Flash that you could share? :-)