Store form values for later submission
- by kim griggs
I have a Rails app that lets users create tutorials and quizzes. There are many users taking the quizzes and many quizzes in a tutorial. My client wants the quiz results to persist when a student navigates away from the quiz. So the use case would be:
User starts to take quiz
User answers some of the questions
User navigates away from quiz to check a fact in the tutorial
User goes back to quiz and their answers are still there
User finishes quiz and submits
Now this would be pretty easy to do if I enforced a "Save" submit so that the answers could be stored in a session or whatever, but the client (and I agree) thinks people will not remember to save before navigating away.
Looking for advice on how to approach this. I'm thinking an observer and cookies.