Explore the community Forums Lectora Lectora Questions & Answers Prevent refresh/reload (to avoid test retakes) Reply To: Prevent refresh/reload (to avoid test retakes)

#403018 Score: 0
Profile photo of Stan Miller
Stan Miller
Member
beginner
intermediate
LUC16 Attendee
wise owl
contributor
curious george
friend finder
LUC17 Attendee
38 pts
@smiller7502

The only pitfall I think of to blocking the reload with JavaScript is that people can turn off JavaScript. If you have users savvy enough to reload to get another try at the course, and if the course otherwise works without JavaScript, this might be a problem.

I’m not entirely sure you really have a problem, though. Assuming that the page users land on if they fail the test sets the AICC_Lesson_Status to “failed”, I’m not sure that reloading and taking the test again would overwrite that if they pass on the second try. So the first thing I would do is test to be sure it’s really a problem.

If it is, I might try this:

  1. Add a variable called Attempts, initial value 0, retain value across sessions.
  2. Add a page after the failure page saying no retries allowed.
  3. Add an On Show Modify Variable action on the failure page to set Attempts = 1.
  4. Add an On Show GoTo action on the first page to go to the “no retries allowed” page if Attempts > 0.