Forum Discussion
lmsAPI Functionality in HTML5 Output
Hi Ashley,
I understand that the modification of Javascript is not necessarily "supported" by Articulate. That makes total sense, since it's not on your team if one of us makes a mistake in our coding.
However, in most cases I've encountered related to this topic, I believe we are only modifying the code because of a lack of a feature that meets our needs within Storyline.
For example, this entire thread probably wouldn't be necessary if there was a trigger for "Mark Course Complete" within Storyline. In that case, I would be able to simply say "Mark the course complete when the timeline starts on Page 4.4" or something to that effect.
Since this feature would be built into Storyline, it would presumably work in both Flash and HTML5, and wouldn't require external Javascript.
Alternatively, it could also be solved if we were given a new option in Publish Settings > Tracking, for "Mark [Completed/Passed] when user reaches slide: [4.4]".
I hope this is helpful for your team in determining how best to approach the request.
- ShaneLeonard7 years agoCommunity Member
BUUUUMMMP!
Adam - much appreciated for your contribution to what is probably the Articulate Hack of the Year - which is a prestigious award considering how many hacks are required.
Speaking of hacks...
Articulate Staffers... has there been any progress on the above mentioned and extremely well articulated feature suggestions? Articulate 360 offers a few wonderful new features (closed captions!!), but to completely break the users' ability to effectively communicate with the LMS is simply madness! Madness I say!
You should add the above mentioned action triggers. It will take a few days for your skilled dev team to do, and will literally retain many paying customers. Ready? Go!
Meanwhile... I think I have the featured workaround working on my Moodle System thanks to Ad-rock's self-calling Javascript function, but I have yet one remaining thorn in my side.
I can't, for the life of me, change the cmi.core.lesson_status to anything other than Failed (SL360, HTML5, Moodle). I can set the score. I can get a li'l tick in the li'l "you did a thing" box in Moodle, but if I view the attempt details, it's cmi.core.lesson_status = failed.I dunno.
My JS snippet is:
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("percentage"), 100, 0);
if (player.GetVar("percentage") >= 70)
{
lmsAPI.SetReachedEnd();
}That last command, I've also tried:
a) lmsAPI.SCORM_CallLMSSetValue("cmi.core.lesson_status", "completed");
b) SetStatus("complete");
c) lmsAPI.SCORM_SetCompleted();Any ideas?
- SimonTaghioff7 years agoStaff
Shane Leonard
...this entire thread probably wouldn't be necessary if there was a trigger for "Mark Course Complete" within Storyline.
Hi folks,
Thanks for your feedback here. I wanted to confirm that a new 'Complete Course' Trigger is currently in Beta and is on track to be released in an upcoming Storyline 360 update.
As you'd expect, the new trigger gives you the flexibility to specify all sorts of custom completion criteria from inside Storyline, and sits alongside the slides viewed and results slide as a third way of tracking course completion with an LMS.
We'll keep you posted and let you know once the update is available for download.
- Simon
- ShaneLeonard7 years agoCommunity Member
That's awesome Simon. Apologies for my post being a tad terse. I was in the throes of troubleshooting frustrations.
I solved my problem by the way.
I was getting a persistent "Failed" status and couldn't work out why.
Turns out, even though my publish settings were tracking on Slide Views, an unused Results Slide was unwittingly setting a Mastery Score of 100. So even though the users couldn't navigate to this results slide, the mastery score was being set in imsmanifest.xml and my activity status was being overridden as failed.
As soon as I disabled all options on the results slide, the code mentioned in my post aboved worked as intended.
Looking forward to this SL360 update!