Atrixware
Free Demo
1.866.696.8709

SCORM Completion Javascript for E-Learning Software

If you are uploading SCORM Lessons and Activities to Axis LMS, the course listing page may not be refreshed and updated with the status of the SCORM activity after a user completes it. Also, if a user closes the browser window before returning to the course after completing the SCORM activity, in some circumstances full credit will not be applied back to the course. This is due to the way SCORM operates, however, most E-Learning Authoring software enables you to add Javascript code, which is what we will need to do.


Articulate Storyline - the goodbye.html file

If you are using Articulate Storyline to publish your content, there is a file named goodbye.html, which is designed to be easily modified for situations like this. This page is rendered when a user finishes a SCORM exercise published with Storyline, so we will want to enter in our custom html and javascript here.

In the Storyline application, you will modify the goodbye.html file.

For reference, this article on Articulate's website discusses this file:
https://articulate.com/support/article/Storyline-3-Customizing-or-Suppressing-the-Goodbye-html-Page

In a nutshell, you will need to:
1. Completely close out your Storyline application
2. Navigate to folder where goodbye.html resides using the file browser (location shown in article above)
3. Make a backup of the original (perhaps name the backup goodbye.original.html)
4. Open the goodbye.html file in Notepad (you should be able to right-click > open with > notepad)
5. Remove entire contents of file and then paste in the new contents (see below) and save it, then close it
6. Re-open Storyline, and republish your SCORM (should pick up the new goodbye.html file)

Here is the contents to put into the goodbye.html file. Make sure you replace {your-lms-system-url} with your lms system url (for example, www.acme-training.com). You can modify the rest of this file as you need, but just keep the <script> tag and contents inside of it:

<html><body bgcolor="#ffffff"><center><br><br><br><br><font face="Open Sans, articulate, tahoma, arial" size="3" color="#333333">Submitting, please wait ...</font></center></body><script src="https://{your-lms-system-url}/lms/_plugins/ca/quizzes/SCORM/scorm-helper.js"></script></html>

 

If you are using something other than Articulate Storyline, you can use one of the following 2 pieces of generic code. 


Generic Code for the End Screen or End/Exit button

Regardless of if you are using inline or popup delivery of learning items, this code will handle both. It will refresh the course listing page behind the scenes if it's being delivered as a popup window , or, close out the inline frame and refresh the course list if its being delivered inline. The reason the code is so long is it attempts to handle various authoring software as there is no standard where the calling code will be placed in the frames chain of nesting.

Add this code to your EXIT button click event, or, on the final page of your exercise.

 

try { parent.confirm_close = false; parent.confirmLOClose();} catch(e) { try { parent.parent.confirm_close = false; parent.parent.confirmLOClose(); } catch(e) { try { parent.parent.parent.confirm_close = false; parent.parent.parent.confirmLOClose(); } catch(e) { try { parent.parent.parent.parent.confirm_close = false; parent.parent.parent.parent.confirmLOClose(); } catch(e) { try { window.top.opener.document.location.reload(true); } catch(e) {}}}}}

 


Generic Code for the End Screen or End/Exit button (Alternate)
This code is nearly the same as above, but adds an extra task of closing out the popup window (if the SCORM is being delivered in a popup window). The code above leaves the SCORM item open for the user to close out.

Again, add this code to your EXIT button click event, or, on the final page of your exercise.

 

try { parent.confirm_close = false; parent.confirmLOClose();} catch(e) { try { parent.parent.confirm_close = false; parent.parent.confirmLOClose(); } catch(e) { try { parent.parent.parent.confirm_close = false; parent.parent.parent.confirmLOClose(); } catch(e) { try { parent.parent.parent.parent.confirm_close = false; parent.parent.parent.parent.confirmLOClose(); } catch(e) { try { window.top.opener.document.location.reload(true); window.top.close(); } catch(e) {}}}}}

 


The features discussed in this article may or may not be available on your LMS system.
Comments
There are no comments for this article. Be the first to post a comment.
Related Articles RSS Feed
Using Videos that Work on iPad in Axis LMS
Viewed 7530 times since Sun, Mar 31, 2013
LMS Support Policies
Viewed 2498 times since Wed, Apr 3, 2013
Setting Enrollment Lengths for Courses in Axis LMS
Viewed 2572 times since Fri, Mar 22, 2013
Uploading/Using a PDF in Axis LMS
Viewed 2700 times since Fri, Mar 29, 2013
Axis LMS Course Reports and User Reports
Viewed 2530 times since Fri, Apr 5, 2013
Axis LMS User Course Tracking Variables
Viewed 2654 times since Tue, Feb 4, 2014
Switching Slide Categories in Axis LMS
Viewed 2351 times since Tue, Apr 2, 2013
Selling Online Courses
Viewed 2888 times since Tue, Dec 1, 2015
How to Set a Temporary Password in Axis LMS
Viewed 2605 times since Fri, Apr 19, 2013
Reducing Bandwidth Usage
Viewed 2462 times since Mon, Jun 10, 2013