Limiting number of assessment attempts

Hello community!

I am required to create an stand alone assessment made up of a title slide, assessment introduction slide, 5 question slides and an assessment summary slide. 

The conditions are:

1) Learners are given three attempts at the assessment at which point they are locked out. 

2) The lock out needs to work independent of the LMS, i.e. not use the LMS to enforce lock out. 

3) If learners close the browser after viewing any of the questions (or the browser crashes) this counts as an attempt and they need to restart the entire assessment again from the title slide.

The challenge I have is that the value of the variable that tracks the number of attempts is not retained between sessions unless auto resume or prompt to resume is set to on.

Turning these to on sends the learner back to the previous location which may be question 3 of 5, failing to meet condition 3.

I have tried setting up a variable per question and a trigger which jumps to the title slide if the question has been viewed previously (than resetting this on the title slide) but when auto resuming this does not seem to work.

Hoping someone has a suggestion on how to make this work without the complexity.



6 Replies
Preston Ruddell

Hello Suman,


I created a demo of what I would do in this situation.  I've attached the file.  Here is an explanation of what I did:

  • The player is set to automatically resume.  The first three slides are programmed to reset to its initial state. 
  • There is a variable for number of attempts.  it starts at three and counts down each time the user clicks the next button.  This button is disabled when the variable reaches zero
  • There is a true/false variable for each slide initially set to false.  There is one for each question.  If you view the slide for longer than one second, this variable is changed to true.  There is also a trigger to jump to the first slide when the time line begins if this variable is true.  The first time the slide is viewed, it won't jump.  If they back out, and try to visit it again, the slide will jump back to the instruction screen.
  • Once the attempt count has reach zero, the next button on the instruction screen and the "Retry Quiz" button will be disabled.
  • I've set triggers to reset all variables except the test attempts on the title slid.

The only down side is that you can't save the score.  If you wanted to, you could add a trigger to disable the "Retry Quiz" button if the variable "Results.PassPercent" is => your passing score for the module.

I hope this helps!

Suman M

Thanks Preston!

I have tried the exact same thing, however this doesn't work for the scenario where the browser crashes, or learners exit while on a question. 

After quite a bit of research yesterday I found out that variables are not saved (despite being changed) until learners navigate away from a slide.

To get around this one has to apply JS which i am getting some help with (see last post here

Another way of forcing a variable save before navigating away from a slide is to open and close a light box slide and have a loading screen of sorts but again this is not ideal.

Either way I really appreciate you taking the time to put the SL file together! 



Christie Pollick

Hi, Suman -- Many thanks for the reply, and I wanted to stop in to note in case you were not aware that JS coding or modifications are not something for which we provide support, so I am glad you came across a post that you're finding helpful. If you would like to reach out directly to any of the participants in the thread for which you shared the link, you are welcome to do so by using "Contact Me" on an individual's profile page. 

And in case you'd like to check it out, here is our JS Best Practices sheet, as well. :)