Setting an expiry date for published content

Jan 30, 2013

Hi there.

As the title says, I was wondering if there was any way to set an expiry date for published content, which would basically stop users from being able to view the content after a specific date? I've used this feature in KnowledgePresenter before but can't find such a thing anywhere in Storyline.

It would be very handy, as we are basically looking to put our course on disc to send out to people to trial them, but we don't want them having access to our courses beyond the trial period.

Thanks again for any support on this.

81 Replies
Christine Hendrickson

Hi Alan,

As far as I know this isn't currently possible. Storyline would have to be able to remove its contents from the server you're using or "lock down" the content after a specific time frame. I'm not sure if you're using a web server, or an LMS, but maybe you can speak with the host and see if there's a way they can set up this type of feature for your content. 

Alternatively, you could state in your course that the content will only be available until a specific date. After that date, you could remove the content from the server or LMS.

In the meantime, if you haven't already, you may want to share this suggestion in a feature request



Garth Yorko

I think I found somethint that might work using Java Script

Create a trigger that runs this script when the first page timeline starts:

var currentDate = new Date()
  var day = currentDate.getDate()
  var month = currentDate.getMonth() + 1
  var year = currentDate.getFullYear()
player.SetVar("day1", day);
player.SetVar("month1", month);
player.SetVar("year1", year);

This sets numeric variables in Storyline for day, month and year from your computer.

I created numeric varaibles, day1, month1, and year1 initially set to zero

Then I created a trigger that would show a layer when the timeline starts if:

day1 is greater than a specific number, in my example, 7


month1 is greater than or equal to a specific number, in my example, 2


year1 is greater than or equal to a specific number, in my example, 2013

That layer displays text that the content expired and has a close course button. 

I disabled the next button and added a continue button on the first page.  If the Expired layer is visible, I prevented users from clicking items on the base layer.

I included the variables on the first page for testing, but they need not display.

Here is the file, you must publish to test.  To test the expiration, set your computer for a date in the future beyond your expiration date.

Garth Yorko

Now that I think about the logic of the trigger, you may need to create 3 separate triggers to launch the expired layer.

The first trigger is if  year1 is greater than or equal to a specific year show the expired layer.  So if the course expires in 2014, that would be the year.

The next trigger shows the expired layer if the month1 and year1 has been passed.  This covers a scenario of a course expiring within a calendar year, for example, June 2013.

The final variable is as in my previous post.  This covers a course expiring mid month within a calendar year.

This is a 3 point date validation:

The year is less than the expiration date,

The month and year are less than the expiration date,


The day, month, and year are less than the expiration date.

Any expiration will show the expired layer.

Raymond M

Yes, I think an expiry date feature would be a good thing to have.

I work in Higher Education and can see the need to have the option of an expiry date, especially for Storyline e-learning packages that have been made available for download via iPad. Some packages shouldn't be available after a course has finished or a student has left  the university/college.

No problem with LMS/VLEs are normally content/tools can be setup with access and end dates/times.

I'll look at the javascript method above and see if it works on the iPad.

Christine Hendrickson

Welcome to E-Learning Heroes, Raymond!

That would be awesome, I agree. If you're able to find something, let us know.

I see this being a pretty great feature for companies or even schools, especially when they're on a specific schedule. For example, if a course is due on the 21st, say that grading takes place on the 25th, the course could expire at midnight on the 21st. In its place a new course would become available for the next subject and so on. Maybe even some sort of acknowledgment that the course has been completed, submitted and now the learner needs to proceed to the next subject (maybe with a link?). I don't know, I may be looking too far into this, but I really like the idea!

Garth Yorko

I'll be honest with you guys, I don't actually speak Java, I just found that code with a google search and by sheer brute force I got it to work.

If your varaibles are displaying 0, I think it means that the varialbe has not been adjusted, since those are the initial values.

Check to see that there is a trigger to run the script on the first page start.  I've also noticed that sometimes Java script does not run unless it is on a server, so you may want to try it on a server and not your local drive.

Lastly, publish the file I uploaded and see if the behavoir is the same.

Sorry I couldn't be more help, maybe someone who speaks JAVA can help you out.

Martin H.

Here comes another one who very much would have liked to see this in Storyline. We will be producing contents for web, CD and IPAD (for online and offline viewing) and the contents will only be valid for one year at a time and should not be accessible after the end of the year. Access via web we may control - I guess it is delivery via CD and offline viewing in IPAD that will cause problems.

We are unfortunately no e-learning programming heroes :( and would have liked to see a built-in function in the Storyline software. Are there any news if/when this feature will be launched? I'll keep my fingers crossed for a positive response.

Ashley Terwilliger-Pollard

Hi Martin and welcome to Heroes! 

I haven't heard of this becoming a feature, or even one that is talked about here in the forums as a feature request, but you're welcome to submit one. I would suggest the best method to restrict users from accessing your content past a pre-determined date would be to host within an LMS or web server where you could restrict their access to a course.

Martin H.

Many thanks for your quick answer Ashley. It is a good suggestion but we have many clients who will be using the material in remote places and sometimes on board ships where internet connection may be poor or non-existing. Hence the need for CD or offline IPAD solutions. I'll submit a feature request.

Any other suggestions, that non-programmers may understand and use, still welcomed of course.

Jay Metzger

Ashley - I will definitely post it as a request, but I think this is something that you should definitely consider. We create courses for clients that host the courses on their own LMS. I do not have the ability to set the expiration date that way, so I need to be able to do it in the code. Lectora and Captivate both have this feature, and I am inclined to use these products until this is a feature for Storyline (although I would like to use Storyline more), as I cannot create a great product only to give it away forever because I can't expire it when a contract is up.

Ashley Terwilliger-Pollard

Hi Jay,

Thanks for sending in a feature request, and I can see where this feature would be used by a lot of users. There may be something you could include in a Javascript trigger at the beginning of the course to check the date - but I'm not equipped to help write those. There may be someone in the community who could assist. 

John Pieterse

Hi Ashley,

Ref to earlier request of Martin H. I wonder if somebody has found a way to work around setting an expiry date on a course after being downloaded on an iPad for offline viewing. It would be ever so helpful delivering content to clients in remote areas. The trick of Garth works fine but as it is in Java it won't work on the iPad. Any brilliant mind doing this in html5



Steve Wooten

We just talked about needing this feature for materials that will be downloaded. I honestly assumed that this feature existed, so I'm scratching my head on how to create a work around that will allow me to do this. We would like to set expiration dates so that if someone needs to download the materials, then the materials will only work until the next revision date. Otherwise, we run the risk of having old versions of files circulating for years and years and years.

Any guidance on solving this would be greatly appreciated.

Zio Fonta

there are some errors in the story provided by Garth on date validation, when validating date you cannot simply compare each expire value (year, month and day) to actual one, while you must proceed first comparing year, then month, and finally day.

here is a story file that should work well.

I put 2 layers to display the result of validation on each one.

expire date is set in JS but you could also set it by system variable and retrieve those variable when executing the JS.