Forum Discussion

NatalieChang's avatar
NatalieChang
Community Member
2 years ago

Lock a quiz for 24 hours if user fails before 2nd attempt is allowed?

Hi Heroes,

Reaching out to any JavaScript coding experts!

I'm pretty new to Storyline 360 and don't know JavaScript... I'm developing a basic computer literacy and typing course and I'd like to lock a quiz for 24 hours before the user can attempt again if they fail. We don't want the user to memorize the answer and immediately attempt the quiz again.

There are three discussion threads but they're not detailed enough and outdated.

https://community.articulate.com/discussions/building-better-courses/locking-a-quiz-for-a-certain-time-with-javascript

https://community.articulate.com/discussions/articulate-storyline/how-to-lock-access-to-a-quiz-for-a-certain-amount-of-time

https://community.articulate.com/discussions/articulate-storyline/trigger-condition-for-24-hour-hold

2) Another possible option - this course is in LearnDash LMS with reporting by Tin Canny. Can LearnDash capture the fail report from the Tin Canny Report and lock the quiz until after 24 hours?

Any help is much appreciated. 

Thank you!

  • JanisFair's avatar
    JanisFair
    Community Member

    Hi Natalie,

    I would love to know how to do this too! Someone shared some javascript code with me for how to do it, but I couldn't get it to work.

    Hopefully a "hero" will give us some help!

  • Nedim's avatar
    Nedim
    Community Member

    My concern is that learners could potentially manipulate the time on their local machines to skip ahead 24 hours and refresh the course, making the button clickable prematurely. To prevent this, I suggest using a more secure method to determine the current time. One solution is to use an online time API, such as worldtimeapi.org, to fetch the current time from a reliable source. Alternatively, implementing a server-based approach to validate the time would ensure the integrity of the time-checking mechanism.

    • GiselleYates's avatar
      GiselleYates
      Community Member

      Thanks, I'll look into this. I'm not this concerned in my case, but I could see how some clever folks might figure this out in a more high security situation. But if there is a better "fetch" option, sounds great.

  • This really is a function of the LMS, which is the safest and most reliable method.

  • I asked. That would've been great πŸ˜€. Here's a work around for those in need.