Forum Discussion
SetStatus not working for SCORM 1.2 completion - Storyline 360 HTML5 Output
Hello everyone,
I'm in the process of upgrading some courses to Storyline 360 to utilize the HTML5 improvements. Due to the complexity of certain courses, we've found that the best method of setting course completion on LMS has been using JavaScript via SetStatus("completed");
However, it seems that SetStatus("completed"); is not working for my SCORM 1.2 courses on SCORM Cloud when using HTML5 output. The completion status remains incomplete after the JavaScript trigger has been executed.
I tried it again using the Flash output and it worked correctly. Once the trigger was executed, the course was properly marked as completed.
In my past experience, SetStatus worked well for both Flash and HTML5 with Storyline 2, so this seems to be specific to Storyline 360.
Does anyone have more information on this issue, and perhaps a workaround to get it working correctly for HTML5?
Thanks,
Matt
45 Replies
- MartinSanterre-Community Member
Hi Matt,
I would add ourselves to your solution.
We used the very same method to fix the problem and it worked.It still complexifies the production worklow and takes extra time to find and test the fix then apply it.
As Bart says, the problem is known since a long time and it's hard to understand why there is no solution yet.
- GeordieOxleyCommunity Member
This is really disappointing, I'm having the same issues.
The default completion options in Storyline are poor.
Until this is fixed, I'll be building new courses sin SL2. How hard is it for the devs to put in some functions we can call?
- SamanthaGrevasCommunity Member
This works for me:
var player = GetPlayer();
player.SetReachedEnd(); //for complete
player.SetPassed(); //for passedThoughts Ashley?
Hi Samantha,
I'm not much of a Javascript expert...so it's a bit of a stab in the dark for me!
Are you using Storyline 3 or 360? That's where the Javascript was reported as not working for the player variables, but if it does work for you there...magic, perhaps? 😉
If you're using Storyline 2, that Javascript should still work!
- SamanthaGrevasCommunity Member
Hi Ashley! I am using Storyline 3. The method that worked in Storyline 2 no longer works in 3:
SetStatus("completed");The workaround is to call the methods in the SCORM API directly:
var player = GetPlayer();
player.SetReachedEnd(); //for complete
player.SetPassed(); //for passedBest,
Sam Hi Sam,
Ah, thanks for clarifying! Those system variables changed a bit in storyline 3/360 based on changes we made to our publishing engine and player for HTML5.
As such, those same Javascript codes no longer work. They were not officially supported in Storyline 2, but folks had found them through a bit of "hacking" the published output and devised some of these methods for custom set up.
We're looking at other ways to put these methods back into Storyline 3/360 or create new features that would accomplish the same set up. We'll let folks know here in the community if there are any updates on that!
- MattLeo-3da086aCommunity Member
Hi Samantha,
Thanks so much for sharing your solution!
I tried it out, and it wasn't working for me initially in Storyline 360. However, it got me to dig a little deeper and it seems to be working well using the lmsAPI methods instead of the Storyline player.
Here's the version that worked for me with an optional line for tracking score:
//Get LMS API
function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) return win;
else if (win.parent == win) return null;
else return findLMSAPI(win.parent);
}
var lmsAPI = findLMSAPI(this);
//Set Completed status
lmsAPI.SetReachedEnd();
//Set Passed status
lmsAPI.SetPassed();
//Set percentile score based on score variable between 0 - 100
lmsAPI.SetScore(score, 100, 0);Credit for grabbing the right window with the lmsAPI goes to Adam Trosper's posts on this thread.
So far this seems to be working for me in Storyline 360 in both Flash and HTML5 outputs.
Thanks,
Matt Thanks for sharing Matt!
- FunctioneelBeheCommunity Member
It looks like we're facing the same status completion issues with Scorm 2004 (which we are still using, because we have bad experience with Scorm 1.2). Can anyone confirm this?
Hi Functioneel,
Are you trying to use the same code as mentioned above? Or are you using the standard SCORM outputs with completion based on a quiz results or slides viewed?
If it's issues with the code earlier in this discussion, I'd have to leave that in the hands of the community.
If you're having issues with the built in completion tracking - can you let us know what version of Storyline you're using and where you're hosting your content? To start troubleshooting I'd suggest testing the course at SCORM Cloud to see if it behaves differently there than you LMS.
Related Content
- 10 months ago
- 11 months ago
- 3 months ago