I am trying to reload the page (or) make the user attempt the question again if he/she has made four wrong attempts.

I am using Quiz module in Drupal 7.

Is there a possibility?


1 Answer 1


It's kind of hard to decide what to do without code samples, but the following ideas come to my mind:

First, you could try a simple PHP command in the form of header("Refresh:0");, calling that once the wrong answer count reaches 4.

My second idea is that you try to integrate some JavaScript into the module itself, attaching a click event to the buttons or whatever it your user is clicking on. The click event could keep track of how many wrong answers they've gotten, and once they hit the threshold, have the JavaScript call location.reload().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.