Forum Discussion
Setting an expiry date for published content
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.
- JohnPieterse2Community Member
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
Regards,
John
- SteveWootenCommunity Member
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.
- ZioFontaCommunity Member
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.
- BjWilsonCommunity Member
Thank you for this it works great for CD and web and upgrades to version 2 well
- RachelHorton-8bCommunity Member
Hi Zio,
Thank you for sharing your solution. I had it working in past versions of SL. It stopped working. Any ideas as to why?
When the "yearexpire" is set in the future I receive the Valid Layer as designed.
When the "yearexpire" is set in the past, I do not receive the Expired Layer.
Are you still using Storyline? Which version? I am using Storyline 360 v3.34.20804.0.
Any help would be much appreciated.
Thank you.
Rachel- OwenHoltSuper Hero
Let me simplify the process and code for you.
You need 3 variables:
- 1 text for a "published" or "created" date in the format of mm/dd/yyyy
- 1 number variable for the number (in days) that the course is valid for, like 60 or 365
- and one numeric variable (let's call it "Days") that will receive a value from the JavaScript below showing how much time has passed sine the course was published/updated
You need to execute the following JavaScript at TimeLine start on your first slide.
let player = GetPlayer();
var date1 = new Date(player.GetVar("CreationDate"));
var date2 = new Date();
var elapsedTime = date2.getTime() - date1.getTime();
var elapsedDays = elapsedTime/(1000 * 3600 * 24);player.SetVar("Days", elapsedDays);
Lastly, you need a trigger to run AFTER the Javascript to show your "Course Expired" layer. It should be something like Show layer Expired when timeline starts if Days > Valid_Days
You can see it in action here: Link to Demo
If that is what you you are looking for, there is a Template file in the resources of the published course that you can download.
- MartinHernqvistCommunity Member
Hi everyone,
Are there any news on this? I submitted a feature request 10 months ago but have not received a response. Is an "expiry date" function available in Storyline 2 perhaps?
- AlanSharkeyCommunity Member
Thank you very much for you email. I am presently away from the office and I will have limited access to my emails.
If you need to contact me please leave a message on my mobile for assistance.
Hi Martin,
There is not an expiration feature within Storyline, as it's often controlled by the LMS or the hosting platform you use. As to whether it will be a feature in a future version, I don't have any information to share in that regards, but the more feature requests the better. :-)
- SagarShindeCommunity Member
Hi everyone
Thank you so much for this. I will try it and it is actually working but I want to ask one question that can we check date with server date.Right know we just compare it with system date so please tell me is it possible to check with live date
- AlanSharkeyCommunity Member
Thank you very much for you email. I am presently away from the office and I will have limited access to my emails.
If you need to contact me please leave a message on my mobile for assistance.
Hi Sagar!
There would not be a built in feature within Storyline to set an expiration date although there is some discussion in this thread regarding custom ways to set it up using Javascript.
Hope that helps get you started!
- JimMcKayCommunity Member
We sell e-learning content to organizations all over the world on a yearly license basis. We need a way to set an expiration date on the content so that when their year runs out the content stops working and they need to purchase a new license. I'm actually surprised that this feature isn't in the program or in development. Most organizations want the content on their own LMS and once they have it there we have no control over it.
- MikeTobiasCommunity Member
Jim, check out SCORM Cloud. You can do this very easily with their "dispatch" feature. It's not free, but very reasonable.
- MartinHernqvistCommunity Member
Thanks for your post Jim McKay! Same problem as we have. I posted about it long time ago. Thanks also Mike B. for your response regarding SCORM Cloud. What do Articulate Staff say about that? Is that something that you may recommend or have you come closer to a built-in solution in Storyline? Pleased to hear.