How to force the LMS to call index_lms_html5.html?

Sep 22, 2015

We want ONLY the HTML5 version of a particular course to load in the LMS (Cornerstone OnDemand). We are all good on how to output to HTML5 and we have tested the file locally. When we publish from Storyline 2 update 7 we get both the SWF and the HTML5 files in the output. I am guessing there are dependencies.

It seems, however, that we're going to have to do some manual editing of the manifest file and possibly some other files in the output in order to get the LMS to launch ONLY the HTML5. Before I try brutal hacks like removing the index_lms.html file or manual trial and error edits—does anyone know how to do this already?

UPDATE: One of my IDs has figured out how to work around the LMS and browser hiccups and force HTML5 to load in any compatible browser.
Not sure if this link will take you directly to his post (with screenshots) but if not, it's on page 3 of this thread. Thanks a million @BrettBerish.

https://community.articulate.com/discussions/articulate-storyline/how-to-force-the-lms-to-call-index_lms_html5-html?page=3#

Thanks to Phil, Steve, Mike and Ashley.

87 Replies
Dave Howard

Thanks, Matt but that doesn't work. The LMS alerts as a non-critical error that the story_html5.html file is missing. (It is referenced in the manifest file). We published it anyway and the course wouldn't load in any browser. You also can't modify both "story" HTML files and get the course to load in IE, Chrome or Firefox.

On the subject of LMS being the correct domain for certificates, I would suggest to the Articulate staff to look at what some of them offer (#keywordSuck). With so many IDs posting about certificates, maybe it's time to look at giving us what we need. We're designers. We wouldn't  design something we didn't need and with so many workarounds that don't work... Just sayin'.

Captivate allowed us to have a certificate slide but we needed a special script to allow us to print it without printing the player too. We're trying to use what we've learned from this article https://community.articulate.com/discussions/articulate-storyline/storyline-2-example-generating-a-pdf-certificate-for-users-who-successfully-complete-a-quiz-html5 and this article https://community.articulate.com/discussions/articulate-storyline/populate-a-pdf-from-storyline  to have the course call a script to populate a certificate with a decent-looking design, background, logo in a new HTML window so the user can print or download it.

It would really suck to have a certification program that results in Times New Roman, black, 14 point, centered on a white background, half-page, portrait orientation. #Ewwww

Steve Flowers

It looks like this thread is a little on the old side but this 6 character change does the trick for me:

1) Publish to LMS with the HTML5 option turned on.

2) Navigate to the published folder and open the imsmanifest.xml file.

3) Scroll down to the resources node. The first node within the resources node <resource ... is where the edit needs to happen.

<resources>
<resource identifier="__62mecffOHR9_course_id_RES" type="webcontent" href="index_lms_html5.html" adlcp:scormtype="sco">

4) Change index_lms.html to index_lms_html5.html.

The beauty of this change is it doesn't make your manifest differ from your contents. Some LMS are persnickety about manifest contents. 

Dave Howard

Doesn't work in Cornerstone LMS. But here's what we've found.

So far, we know that imsmanifest.xml, meta.xml and story.js all work together along with browsersniff.js to determine if the Flash version can load (which is what Articulate wants to happen.)

We opened Chrome with the Flash plugin turned off and without any file changes or renaming or deleting, the HTML 5 version loads. Anytime we try editing files to point to "_html5.x_ we get a big white window with nothing loading in it.

So... the only way to force HTML5 to load is to have a non-flash-compatible browser.

Phil, I'm curious, when your content loads in scormcloud, have you tried right-clicking on the window to see if it shows Flash settings and version or just HTML commands?

Steve Flowers

To clarify, you've tried changing the webcontent reference in imsmanifest to point to the index_lms_html5.html file and it's loading a blank page? I've tested this in multiple systems and it's worked consistently. Don't have access to cornerstone but I can't see why it would work any differently. The LMS is *supposed* to load the file designated in the manifest file. Double-check to make sure the modification is made in the right spot and that it's entered to point to the correct file.

When looking at the browser console, what errors appear?

Steve Flowers

Odd that it starts loading the html5 package but hangs up on the spinning loader. Wonder if Cornerstone is doing something funny with their launcher that's messing up the load.

In addition to renaming the story.html file. A couple of other ways to tackle the problem that could be worth trying. Edit the line in index_lms.html that sets strContentLocation = "story.html"; to strContentLocation = "story_html5.html";   

If that works, you should be able to modify the publish template in the application directory to do this permanently every single publish and just put it out of mind. No post-publish-surgery required. If this doesn't work, can you look at the console errors to see what pops up?

 

<!--/* Copyright ? 2003-2011 Rustici Software, LLC  All Rights Reserved. www.scorm.com - See LICENSE.txt for usage restrictions */-->
<HTML>
 <HEAD>
  <TITLE>Untitled1</TITLE>
  
  <script>
   var g_biOS = (navigator.userAgent.indexOf("AppleWebKit/") > -1 && navigator.userAgent.indexOf("Mobile/") > -1);
   var g_bAndroid = (navigator.userAgent.indexOf("Android") > -1);
   if ((g_biOS || g_bAndroid) && true)
   {
    var strLocation = location.href.replace("index_lms", "index_lms_html5");
    location.replace(strLocation);
   }
  </script>
  
  <script src="lms/APIConstants.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/Configuration.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/UtilityFunctions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/SCORM2004Functions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/SCORMFunctions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/AICCFunctions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/NONEFunctions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/LMSAPI.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/API.js" type="text/javascript" charset="utf-8"></script>

  <script language="JavaScript1.2">
  
  strContentLocation = "story_html5.html";  //Put the link to the start of the content here.
  //strContentLocation = "TestAllFunctions.htm";
  
  function LoadContent(){
   window.scormdriver_content.document.location.href = strContentLocation;
  }
  </script>
 </HEAD>
 <frameset rows="100%,0%,0%,0%" onload="Start()" border="0" onbeforeunload="Unload()" onunload="Unload()">
  <frame name="scormdriver_content" src="lms/blank.html" scrolling="false">
  <frame name="AICCComm" src="lms/AICCComm.html">
  <frame name="rusticisoftware_aicc_results" src="lms/blank.html">
  <frame name="NothingFrame" src="lms/blank.html">
 </frameset>
 <noframes>
  Your browser must be able to view frames for this content to display.
 </noframes>
</HTML>

Steve Flowers

If that last one works (editing the line in index_lms.html) then here's where you can make it permanent:

1) Navigate to your install directory's content folder. On my machine it's C:\Program Files\Articulate\Articulate Storyline 2\Content.

2) Copy and paste the line that reads strContentLocation = "__PLAYER_HTM__"; //Put the link to the start of the content here. so that there are two lines. Comment out the first line so you can restore it if necessary.

3) Set the new copied line to read strContentLocation = "story_html5.html"; 

4) Save the file.

This should force the publish to output HTML5 launch every single time. Flash will never be queued up to load in the SCORM launch.

<!--/* Copyright © 2003-2011 Rustici Software, LLC  All Rights Reserved. www.scorm.com - See LICENSE.txt for usage restrictions */-->
<HTML>
 <HEAD>
  <TITLE>_TITLE_</TITLE>
  
  <script>
   var g_biOS = (navigator.userAgent.indexOf("AppleWebKit/") > -1 && navigator.userAgent.indexOf("Mobile/") > -1);
   var g_bAndroid = (navigator.userAgent.indexOf("Android") > -1);
   if ((g_biOS || g_bAndroid) && __USE_HTML5__)
   {
    var strLocation = location.href.replace("index_lms", "index_lms_html5");
    location.replace(strLocation);
   }
  </script>
  
  <script src="lms/APIConstants.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/Configuration.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/UtilityFunctions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/SCORM2004Functions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/SCORMFunctions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/AICCFunctions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/NONEFunctions.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/LMSAPI.js" type="text/javascript" charset="utf-8"></script>
  <script src="lms/API.js" type="text/javascript" charset="utf-8"></script>

  <script language="JavaScript1.2">
  
  //strContentLocation = "__PLAYER_HTM__";  //COMMENTED OUT

  strContentLocation = "story_html5.html";
  //strContentLocation = "TestAllFunctions.htm";
  
  function LoadContent(){
   window.scormdriver_content.document.location.href = strContentLocation;
  }
  </script>
 </HEAD>
 <frameset rows="100%,0%,0%,0%" onload="Start()" border="0" onbeforeunload="Unload()" onunload="Unload()">
  <frame name="scormdriver_content" src="lms/blank.html" scrolling="__SCROLLING__">
  <frame name="AICCComm" src="lms/AICCComm.html">
  <frame name="rusticisoftware_aicc_results" src="lms/blank.html">
  <frame name="NothingFrame" src="lms/blank.html">
 </frameset>
 <noframes>
  Your browser must be able to view frames for this content to display.
 </noframes>
</HTML>

This discussion is closed. You can start a new discussion or contact Articulate Support.