Setting an expiry date for published content
Jan 30, 2013
By
Alan Sharkey
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
Our clients require an expiration date on their courses. We were a Captivate shop and this feature is built into the Publish Settings. But we recently started using Storyline exclusively and are only now realizing that there is NO expiration date that can be set for published courses. We are hoping there will be an upgrade including this soon or a workaround that is compatible with multi-platforms and mobile media as well.
Really need this expiration date on the published SCORM, as a feature in storyline.
Some LMS's provide this feature. For content in an LMS, this may often be the preferred option.
As for non-LMS content, it would be nice to have.
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
Any updates on this feature?
Good morning, Kaitie!
A feature that would allow setting an expiration date for content is not on our immediate roadmap—as the hosting platform typically determines this—but we're still tracking all requests.
If plans change, you're in the right place to know more!
Let me simplify the process and code for you.
You need 3 variables:
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.
Thank you Owen. I wish I could say I understand completely. I have a few questions.
The outcome I want is to have the expired layer display upon expiration of the content lease which is typically 1 year/365 days.
1. I created a text variable with the name "CreationDate". Is this the correct name I should use? Would the date be the date the lease starts? For example, if the lease begins today I would enter 02/10/2020.
2. I created a number variable with the name "Valid". I entered the Default Value as 365. Is that correct?
3. I don't know what the 3rd variable should look like. What should the Name be? Is it a number variable? Does it need to be a variable name that is already part of the javascript? What is the default value?
I've attached a test course which includes the variables and triggers. I have the Show Layer Expired trigger built. However, I don't know what to add for the Conditions.
This post was removed by the author
Hi Owen,
I am just seeing now that you enclosed a Template file. I apologize. I don't know how I missed that earlier. I will give that a look and reach out if I have any further questions. Thank you again!
Rachel
Answers to your questions and some additional information about the code.
Question:
How the JavaScript works:
See it in action here and download the template from the resources in the published course.
Thank you again Owen. I'm in the process of typing up a procedure for my peers. I will most likely send to you to review for accuracy :)
This post was removed by the author
👍
The above solution is great for Storyline, thank you for paving the way!
I was wondering if anyone has tried to set a SCORM expiration date for a Rise course?
I would also love to see expiration dates built into the software, as we sell our courses to people for use on their own LMSs. While it would be lovely to have everyone manage the expiration on their own LMS, it does not make practical business sense.
I was able to get Owen's code to work with a small tweak. I kept getting an infinite loop error and slides were taking forever to load with the code written as it is above. I added stop() at the very end of the javascript and it works perfectly now. The only other change I made was to add a 1 second delay for when the jump to the "expired" slide trigger happens, because I couldn't get the trigger priority to work for some reason. I didn't spend much time exploring that issue, as we actually preferred the look of it. It made the expiration effect a little more pronounced.
Thanks for the help!
Glad you found it useful. 😎
+1 for this to be included on the roadmap
Hi Owen - do you know you would hard code the variables as you mentioned above?
Which variable do you wish to hard code? If it is the creation date, simply store a date value in a Storyline variable.
If you have a file you can share, I can help you troubleshoot it.
Owen Holt, would you be willing to help with some custom Java script for a Storyline course? In addition to creating an expiration date, we need to be able to set a cap on the number of users. If you're willing to assist, please contact me at peter@gilbertcreative.com. We're happy to compensate you for your time.
On another note, it's incredible that Articulate hasn't fulfilled this request after NINE YEARS!
I can probably do that but will need additional info to fully scope and see if my idea on how to cap users will even be a viable option. Send me a LinkedIn connection request and we can arrange a zoom meeting through messaging there to discuss.
Following up here to say that Owen Holt (see previous post) was able to update my Storyline file with Javascript and I'm now able to adjust a couple of variables to set an expiration date each time I publish SCORM files for a client. He's willing to help others as time allows, so feel free to reach out to him on LinkedIn for assistance.
Hi Peter,
Thank you for updating this post! I'm sure others in the community will find this helpful.
Hi has anyone tried SCORMHero for this? I was looking for the same ability to set expiration dates without going through ScormCloud and think this might work but haven't tried yet.
Here's a youtube video for SCORMHero's feature on setting an expiration date.