loading external survey via web object - need to grab course ID

Ok, let's see if I can explain this so it makes sense....

We have a generic survey on our site that I'd like to load at the end of SL courses via a web object - that's the easy part.

What I want to do is grab the course ID on launch, pass it to SL and then attach it to the URL called by the web object. I also need to build this into our templates so that other dev's don't need to add this each time they build a new course.

For the course ID I'm thinking of adding some JS to the index_lms.html file that can grab the ID on launch. If this works I'll have everyone update their default index_lms file for publishing in the application folder (Articulate/Storyline/...)

Next I'll have SL pull the var data from the JS and load it into an SL var (is this necessary per se?)

Finally, I'd like to add that var data to the URL of the web object. Is this even possible?

So, those are puzzle piece and I need a bit of help from the community putting the pieces together... if it's possible.


2 Replies
Steve Flowers

Hey Bill,

Couple of challenges here.

  • Where is the courseID? Does it live somewhere in a page or in a query string? Either way, if it's consistently stored in a page displayed to the client (even buried in the page as a variable) grabbing it is pretty trivial. You could even do this from a JS trigger on the master slide.
  • For the second one, you can communicate to a web object and change the URL. It's just an iFrame, so targeting that and changing the URL of the web object is possible. You could even use a little JavaScript to call a web object at runtime in a JS trigger.

    OpenWebObject(999, "http://www.google.com", 0, 0, 500, 400, 200, 80);

OpenWebObject(strId, strUrl, nXPos, nYPos, nWidth, nHeight, nSlideXOffset, nSlideYOffset)

  1. Unique ID. I used 999. I believe this is unique per story. It's normally generated with all of these params filled in.
  2. The URL. You could use something like "http://url?p="+aVariable
  3. nXPos - left position in the slide.
  4. nYPos - upper position in the slide.
  5. nWidth - width of the web object
  6. nHeight - height of the web object
  7. nSlideXOffset - accounts for the left menu if present - if you're generating at runtime you'll want to trial and error or measure
  8. nSlideYOffset - accounts for all of the stuff at the top of the player.
Bill Harnage

Hey Steve thanks for the feedback.

After talking to our web dev, it turns out I was over thinking this a bit. I wanted this to be automated as the CID is created after the published zip is uploaded to the server. We don't have an actual LMS, but the site functions the same basic way. The ID is in the URL and that's where I wanted to pull it from and then push it through to SL. Looks like this is possible from your feedback.

For now, the web dev is going to create a page that we can create a uid for the survey and tack it on to the end of the survey url. Long term I may explore building it the way you mention.