Expiring a course using Javascript

Is there an easy way to embed Javascript in the header of a page, such as the opening page of a course?

Would this create problems with SCORM?

Here's what we intend to do:

A We embed a Javascript header line, that runs on loading

B This references additional Javascript contained in a local js file (i e , local in the same folder as our course, on server side)

C The JS file Javascript is a short routine that compares two variables

D If variables don't match, Javascript loads a different opening page, instead of the one originally being opened (switcheroo)

The problem we are trying to solve is expiration We can't find any tools available that work with Articulate to set an expiration date for a course If we write our own Javascript, we can read system clock and compare this to a date value that we include with the course The hardest trick will be to have Javascript load an alternate "expiration page" instead of the user-opened page, and do all this without getting SCORM angry

Maybe you already know of an expiration routine compatible with Articulate? If so, save me some work here spill the beans!

4 Replies
David Burton

Ryan,

Because Articulate allows you to include a Launch Page for the published content, could you add your code to Launch page instead; this way any content  loading is halted and/or redirected if the the content has expired and before any resume data is sent to an LMS or other tracking system

Note: there are many scripts on the Internet to check time/server time You might want to consider what method you choose to incorporate as this could affect users in different timezones

I hope this helps!

Ryan Bernard

We actually created the script described above, and the reply above to my questions was helpful However, I never did get anyone to pass judgment on whether this might create problems with SCORM and we did not test it My guess would be that it would not create a problem with SCORM since such a functionality is outside the SCORM purview Regardless, the issue was short-lived

The whole issue came up because my client wanted to create a time-limited course distributed on CD Part of this was because of distribution in remote areas of the world (oil rigs) where Internet connectivity can be limited As time goes by, thanks to satellite communications, this should be less of an issue -- even people out at sea have Internet So the REAL solution for expiration is to put your training on the Internet, on an LMS, register and track individual subscribers, and limit their access that way  

Will Grasse

It is vital that our company establishes a deadline within a course for our clients. We used to use Captivate which has a built in function of expiring a lesson. Storyline does not yet have this feature. However, I have developed an example lesson and documentation that describes, in detail, the procedure for setting up an expiration within a lesson. Attached is the procedure as well as the lesson file.