Javascript error & LMS

Hi everyone

I have a client who's courses are experiencing problems with the course completing in their LMS only via iPad. It works on desktop. The LMS company has indicated the following:

"The problem is to do with some javascript errors, when you access the quiz on the end of the course.

Within the javascript there is this code

“ = function(a, b) {
if (“onstart” == this.hideOthers) {“

In the code excerpt above, “this.ref.addClass("currentlayer”);” , the “this” is nil, which is causing the error."

I am hoping someone can point out where this code is (which folder/file) and provide advice on what the "this" should be and confirm if I can publish to LMS, update this JS then zip for upload.



9 Replies
Ashley Terwilliger-Pollard

Hi Holly, 

I'm not a javascript expert at all, so I can't help you determine where that would be located or what to change - but have you tested it outside your LMS on an iPad? That may help narrow down where to look. You could test at SCORM Cloud here which is an industry standard for testing LMS content.  Also are you using the HTML5 output or mobile player? 

Holly MacDonald

Hi Ashley - yes it was tested on web server and then on Scormcloud and it worked mostly fine, but the courses never register as complete in the LMS. This is HTML5 published output not the mobile player (it's using the LMS mobile player). I had a case open, but since it works on ScormCloud, there's not much that you can figure out. It was suggested that I ask the community or find a JS expert to help. 


Ashley Terwilliger-Pollard

Hi Holly,

Sorry we're not able to offer you more assistance - but SCORM Cloud is an industry standard for testing SCORM content - so if it works there, you'll want to share those results with your LMS team. If you need additional Javascript help, it may also be worth sharing a copy of the .story file here so that folks could take a look at it and do some testing themselves. 

Raj S

Hi Holly

Even i faced this same issue with client LMS, all you can try adding the custom java script code in  in  result page.


try below code for testing purpose.

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
} else {