Prevent refresh/reload (to avoid test retakes)

So I have a course which basically consists of a test. The student's score and pass/fail for the test are critical and will be audited.

It turns out that a student can fail the test, then just press F5 to reload and retake it, as long as they don't close the window first. This is not acceptable.

Is there a best practice to block reload/refresh, or is there a better alternative I'm missing? I do know about blocking F5 and ^R using JavaScript, but I'm curious about any pitfalls to this, or good alternatives.

Lectora 17.0.6, LMS is Success Factors, browser is either Google Chrome (current) or Safari on iOS (same).

Thanks.

Discussion (5)

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.

undefined

Hi, Stan,

I considered the "set a variable value" method. I would not retain the value across sessions, though. Sometimes students do need to retake the test (after a set period has passed). I would set it only for that session.

I can confirm that a least with Success Factors and AICC packages, resetting the test does let you save your new score and status. The LMS retains both scores, so an audit picks up the problem.

It sounds like the set a variable method would work for you, as long as the LMS controls access to the course. What I mean is if you only use a per session variable it will not prevent students from reentering the course and taking the test again.

If the LMS does not control this access then you need to save a date value into a variable that is persisted. You would need to do a little manipulation with Javascript to do a date comparison for deciding if another attempt is allowed. This is a little tricky because if your students know about the date limitation they may be able to change the client computer system date and fake out your logic.

In some LMS systems you can set a period of enrollment after which the student will be un-enrolled. That might be another way to control retesting, maybe after a certain period they have to enroll in the course again and at that would clear the variable allow them to retake the test.

Hopefully this give you some further insight and a possible solution.

- Joe

What LMS are you using? You should be able to lock the lesson status after completion in the LMS.

Darrel, as mentioned we use Success Factors, which has very limited features. I agree with Joe that the variable-setting method would be the best fit. Thanks.

Discussions have been disabled for this post