Can I control question attempts based on a variable value?

I have a course with two tests in it...a pre-test and a post-test.  My course must be completed annually and the owner would like the tests to flip flop (i.e. even years test A is the pre-test and test B is the post, odd years test B is the pre-test and A is the post).  

I've figured out how to use JavaScript to update a variable that routes the learner to the desire test based on the year.  Here's the twist.  The owner wants to limit the learner to one attempt at each pre-test question, but wants to give them two chances to correctly answer post-test questions.  

So, I'm trying to figure out if I can use JavaScript to manipulate the "Attempts" option for a quiz slide (e.g., if it's being used for the pre-test, they get one attempt per question.  If it's the post-test, they get two).   I could just duplicate the test scenes (have two for the pre-test and two for the post-test) and use the aforementioned variable to route the learner to the desired tests...but I'm trying to avoid having the duplicates and doubling the work when changes to the questions are made.

Thanks in advance for any help.

v/r

Jay

Be the first to reply