44 Replies
Brandon Beaver

Has anyone had any luck getting the lmsAPI.SetScore function to work with HTML5 output?  

I'm manually forcing completion and score for my course using javascript.  Both of those functions (setStatus and lmsAPI.SetScore) work perfectly and consistently in the swf output. However, only the completion status is passed in the HTML5 output. The score is not passed. 

I should mention, the course is published to the AICC standard.

Rick Gomez

Sure no problem im just checking emails but i dont have the script here
(and i dont remember what ive done), for what i can remember the issue i
had was that the score was passing with float numbers, cause i neede to use
a different function to pass the score that does the average on its own,
like you pute the max score and the passing score, so it can send a number
like 75,3% and i couldnt figure out to do it a round number (as i dont
control the variables at that level). But it was working, testing in with
Scorm cloud from tablets and mobiles and pc.

I'll search in the files hopefully i have it somewhere.

Ricardo M. Gomez

Leslie McKerchie

Hi Rick!

Thanks for assisting Brandon here. I did want to mention that replying to the forums via e-mail attaches your signature, but you are welcome to pop in and edit if needed.

Hi Brandon!

Glad that Rick is assisting you here. You are welcome to reach out to him directly via the 'Contact Me' option on his user profile if you wish :)

Brandon Beaver

Just to be clear, I don't have any problem tallying the score and rounding the score to the nearest whole number.  I'm taking care of that in JavaScript. 

Passing both completion AND score works perfectly fine in the SWF output.

The issue I'm having is ONLY in the HTML5 output where manually passing the score to the LMS (AICC Standard) using the following construction does NOT seem to work.  Instead, the result is a blank field in the LMS where the score would normally show.

NOTE: The following example has the score hardcoded for simplification of my example. In my course, I'm pulling the score into a variable. In both cases, whether hardcoded just to test this or using a variable, the score doesn't seem to pass to the LMS.

var lmsAPI = parent

lmsAPI.SetScore(90, 100, 0);


Rick Gomez


Yes i have the same issue the score was blank. in the swf was fine and as
you i could manage the score and round numbers using java and a math.round
function but with that i havent been able to make it work in mobiles.

I'll see if i can find that tonight and i'll post it here, maybe can help,
but im not making any promises of course.


Rick Gomez

So i've check and i have this code in my slidemaster, i have checked  in scormcloud accessing from my mobile and the score is passing, im using the score to pass it as a progress indicator, like 10% or 20% viewed, but the same idea can be used to pass an evaluation.

var player = GetPlayer();
var YourScore= player.GetVar("scoreCustom");
//var YourScore=(YourScore*100)/60;
//var YourScore=Math.round(YourScore);
var lmsAPI = parent;

lmsAPI.SetScore(YourScore,75,0); //second parameter is max, second is min scale

if (YourScore >= 75 )

Hope it works for you.

Brandon Beaver

Thanks for tracking down your code and sharing it here.

In the meantime, I've been doing some testing and have discovered the following:


Scenario 1

If I use the code I already had in there (very much the same as your example upon comparison) and launch from the LMS using the index_lms.html at the end of the URL on a computer that DOES NOT have the Flash Player installed and let the Storyline detection routine work and automatically display the HTML5 version, the scoring SUCCESSFULLY passes to the LMS.

Scenario 2

If I use the code I already had in there (very much the same as your example) and launch from the LMS using the index_lms_html5.html at the end of the URL and essentially FORCE the html5 version to display, the scoring DOES NOT pass to the learning center.


I won't get into the reasons for wanting to force html5 launch instead of relying on the built-in SL detection, but I definitely wanted to share my findings with you and the community. 

I'm not sure why there would be a difference in whether the score passes based on my two scenarios, but there is DEFINITELY a difference - one works and one doesn't!

Thank you so much for you replies today!


Rick Gomez


interesting indeed, i will be inclined to believe is something related to a
jscript that is being used in the html5 version.
i really dont know which file is lunched when testing on the mobile, the
code i sent i tested it in scromcloud from my mobile, using it directly on
google chrome (not using the Articulate launcher app), so i assumed it was
loading the hmtl5 version of the launcher.

on a side note you are not the only one dealing with this issue when i step
into this "wall" i remember reading about the same thing, that the hml5
launcher didnt work for some people.

anyway, maybe its worth trying in scromcloud (is a free "lms" tester) but u
probably know it, and check your script and mine directly over a mobile


Steve Flowers

Sounds like there's something funny going on with the frames arrangement. Bouncing directly to the index_lms_html5 file changes something in a bad way. I haven't seen this issue and I imagine that the problem would appear in iOS / Android HTML5. Here's something you might try. This could have side-effects but I imagine it'll work fine.

Change line 28 of index_lms.html to reference story_html5.html rather than story.html. This will emulate the Flash autodetection without getting that far.


Brandon Beaver

Just want to make sure I'm following your suggestion Steve.

Are you saying to make your suggested change in my Scenario 1 or Scenario 2?

Scenario 1 works as intended and launches the html5 version when Flash Player isn't present.

Scenario 2 wouldn't reference index_lms.html since I'm forcing HTML5 launch by pointing to index_lms_html5.html, right?

Help me understand your suggestion and where it fits.

I appreciate the great feedback and input from the community!

Steve Flowers

You're basically simulating scenario 1. Yes. You'd force index_lms.html to load up the story_html5 file. This would bypass index_lms_html5. It's the same thing that the detection routine is doing. You're just cutting out the middleman. 

Index_lms_html5 should work. But since it's clearly not, if the above works you can avoid having to worry about why it's not:)

Jean-Mathieu Bazinet

Hey people,
I tried those javasript lines on my final result slide, but Articulate Online does not seem to care at all about Javascript. Am I wrong? I tried a simple line on the first slide, which is : 
, but AO ignores it and still mark the course as incomplete in the report.