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

43 Replies
Ashley Terwilliger

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!

Ashley Terwilliger

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! 

Matt Leo

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

Ashley Terwilliger

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. 

Russell Amundsen

Hi, I know this an older thread. So I checked the release notes and saw there was a fix for this for Storyline 360 back in February. Will this  fix also be implemented in Storyline 3? I checked the release notes but did not see it listed. Unfortunately my company restricts the use of cloud based software because of proprietary data security issues so using Storyline 360 is not an option. I tried the suggestions listed in this thread but none of them are working.  Any updates or workarounds for Storyline 3 you can provide would be greatly appreciated.

Leslie McKerchie

Hi Russell,

In Storyline 3 Update 3, we restored compatibility with Storyline 360 files that had text-to-speech narration, random number variables, and course completion triggers. 

Course completion triggers are not a feature of Storyline 3.

A user in another forum thread shared this solution as well if you'd like to check it out.

Sameeksha Mishra

Hi everyone,

I am working on a storyline 360 course and I am trying to create a popup when the internet connection is lost. Currently learners are able to move to the next slides even when the connection is lost and when they close the course window they don't see the completed status. I have tried calling LMSCommit from storyline 360 however that doesn't work. Has anyone worked on this before? 

Sam

Mateusz Szuter

Hello there,
Well yes, it's a bit shame that Scorm 1.2 manual set completion status is still overriden by default Storyline exit behaviour.
It's a shame, because there's a really simple workaround.

Javascript piece is standard, you put it under "execute javascript":

var player = GetPlayer();
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);
lmsAPI.SetScore(player.GetVar("points"), 100, 0);
SCORM_CallLMSSetValue("cmi.core.lesson_status", "completed")

This one reports both score and status as completed. In score there's variable passed.
But we all know that bit of code and it sadly doesn't work.

Workaroung is simple.
Publish your course with slide tracking option*.
Go to published course folder, open lms/lms.js
find line 78, and more particulary this piece of code (btw if you are not familiar with javascript, the // means comment, script will ignore that part, it's for your info use only):


case "BW_ClosePlayer":
// This is an important milestone, save the data - my info: that's original comment of devs
ReportStatus();  my info: that-s line 78 which you are looking for
LMSCommit();
lmsAPI.ConcedeControl() my info: yup, there's colon missing by devs themselves.
break;

So you probably guessed it already, you just put // before ReportStatus(); function. It will stop storyline from reporting completion status to the LMS. Since we are doing it manually, it's perfectly fine for us.

* - I can't remember now, but if there is a scenario, that you want to put your manual status on the last slide (like 20 of 20) and you have option to track by slide numbers, it will still override the completion status. You can bypass this in one of two ways:
1. Just add somehwere blank slide that will not be visited by learner (nice if you have one, big course)
2. After publishing, go to html5/data/js/data.js, find "viewThreshold":x, and substitue your definied earlier slide number by any greater value. This way storyline will never reach the final slide to report status.

Lauren Connelly

Hi Chris!

We might have to change a few settings around because this is not expected behavior when publishing to Scorm 1.2.

To see if this issue should be resolved in the course or LMS, I'd test the course in SCORM cloud. 

Here are the steps to test your file in SCORM cloud!

Please let me know if you have any questions.