Calling the guru's
Jul 24, 2012
By
Bill Harnage
I need to replace the point in the browser detection script that launches ioslaunch.html and replace it with an absolute path.
I know where it is in story.html, however because the course is launching from an LMS the starting html is index_lms.
So my question is, is there another html file in the index_lms.html launching sequence that calls ioslaunch.html? Or does the launch sequence always end up at story.html?
TIA
7 Replies
the index_lms calls the story.html file, the story.html file calls the ioslaunch.html
ok good, thanks.
Just wanted to make sure since there is an index_lms_html5.html that i wasn't missing anything in the sequence.
Ok, so i changed the ioslaunch.html to the absolute path in the story.html file, but index_lms_html5.html is still loading on the ipad.
Just a note, the ipad content is on another server that doesn't require authentication.
Here's what I'm trying to accomplish...
user logs into lms
user clicks start button
course launches (index_lms.html) - during the launch sequence I thought story.html would eventually be cycled to, which is why i changed the ioslaunch to an absolute path - the offsite server.
However at some point during the launch sequence index_lms.html5.html is being loaded on the ipad instead.
Did i miss changing something in the sequence or is the problem because the initial launch is behind authentication?
In testing, I think the LMS is always going to attempt to launch the HTML5 version. It'll never fall back to the iOS version. On lines 10 and 11 of index_lms.html, you'll see:
var strLocation = location.href.replace("index_lms", "index_lms_html5");
location.replace(strLocation);
This switches the current page to index_lms_html5. So if you change this to:
//var strLocation = location.href.replace("index_lms", "index_lms_html5");
//location.replace(strLocation);
document.location.href="http://yourabsolutepath/ioslaunch.html";
Just comment out the first two lines.
Hmmm, I probably should clarify more. I wan the user to view the desktop version or ipad version based on the browser, not just the ipad version.
So, i should be able to change the script to this:
var strLocation = location.href.replace("index_lms", "http://yourabsolutepath/ioslaunch.html");
location.replace(strLocation);
I'll give that a try and see.
That'll replace just the index_lms in your URI. That would make your URL into:
http://yourLMSAddress/folder/folder/http://yourabsolutepath/ioslaunch.html.html
I defer to Steve encyclopaedic knowledge, sorry about that
This discussion is closed. You can start a new discussion or contact Articulate Support.