Forum Discussion
Expiration date for a course inside Storyline
- 9 days ago
I’d recommend setting the expiration date through the LMS, as this allows the course to be completely inaccessible after a specified date, or to redirect learners to an internal page such as an expiration_notice.html.
While this can be implemented in Storyline, it would require using JavaScript to define an expiration date and then, once that date is reached, display a layer or message indicating that the course content is locked due to expiration.
I’ve attached a simple Story file that demonstrates this functionality. You can test it by adjusting the date values in the code to see how it behaves in your environment.
const expirationDate = new Date('2026-06-12').getTime(); // set exp date const currentDate = new Date().getTime(); const timeDifference = expirationDate - currentDate; if (timeDifference > 0) { const daysRemaining = Math.ceil(timeDifference / (1000 * 60 * 60 * 24)); setVar('daysRemaining', daysRemaining); // storyline var } else { setVar('courseExpired', true); // storyline var }
The problem is that the customer is delivered a SCORM package. And they have rights to use it for, say, one year. If I set it up in the LMS, it doesn't prevent the customer from copying the SCORM package. However, if I set it up with JS in Storyline, the customer can't use the package beyond the expiration date. Many thanks for your help!