Forum Discussion
Scorm expiration date.
Hi, any updates on this? Is there a way to set an expiration date to a SCORM created in Articulate Rise or Storyline? I'm looking for a way to set the expiration to the SCORM file itself, not via any LMS or platform.
SCORM does not have a built-in mechanism for setting an explicit course expiration date, but you can achieve this using JavaScript and custom variables within Storyline. There are several ways to set this up. I recommend reviewing Owen's post above or referring to the attached story file for my solution as a guide.
const expirationDate = new Date('2024-06-12').getTime();
const currentDate = new Date().getTime();
const timeDifference = expirationDate - currentDate;
if (timeDifference > 0) {
const daysRemaining = Math.ceil(timeDifference / (1000 * 60 * 60 * 24));
setVar('daysRemaining', daysRemaining);
} else {
setVar('courseExpired', true);
}
Basically, the script calculates the remaining days until the expiration date and updates Storyline variables accordingly. If the expiration date is in the future, it sets the number of days remaining. If the expiration date has passed, it flags the course as expired with a True/False variable.
Triggers on the master slide:
Result:
If needed, the code can be modified to lock or hide the menu based on the course expiration variable. If the course has expired, the menu can be hidden or its functionality can be disabled to prevent further interaction.
- AnnaOjalahti-0b3 months agoCommunity Member
Thank you a lot Nedim for the thorough explanation! I will definitely try this. For some reason, I could not access the link Owen had posted above, which is why I posted a new question. Now I can access it, so I'll research that thread as well.
Am I correct, that this is not possible for Rise courses? Or could it be possible if I used a Storyline block with the JavaScript in the Rise course and set the Rise course's tracking to that block?