Forum Discussion

GiselleYates's avatar
GiselleYates
Community Member
4 months ago

Locking out a failed test until the following day

Hi,

So, I wanted to discourage people from simply taking a test over and over until they passed through trial and error. My idea was to lock out the course until the next day, but I couldn't find anything on this. After reviewing some other ways people were using dates and some creativity, I figured it out!

I have a javascript variable set to capture today's "day", "month", and "year" when the timeline starts on the failure layer of the results slide. I then have a "continue" or try again button set to adjust a variable called "failedday" to "day", "failedmonth" to "month", "failedyear" to "year". The button changes to a disabled version that says "This button will allow you to retake the quiz in 24 hrs". When they come back the following day, the storyline project is set to force resume (it wouldn't work with rise). Therefore, when the timeline starts on that slide it now gathers the new date, but the failed variables remain the same. The disabled button has a trigger to change to a "retry button" when failedday < day, or failedmonth < month, or failedyear < year. Since yesterday has a lower day, month, or year, the button will now allow them to retry.

Here's the file. Obviously, you have to view this in review to see the Javascript or publish in SCORM Cloud if you want to see what happens the following day.