openwebwork/webwork2 — pull request #493 by goehle (2014-10-03 21:32:09+00:00)
Title: Gateway Bug Redux (master) 

Of course writing up the pull request post for the last bug gave me a much better idea of how to fix it. Do-over!

This is an annoying bug that breaks gateways for anybody on newer perl versions. The issue is that in URLPath.pm both the `quiz_mode` and `proctored_quiz_mode` path types use the `GatewayQuiz` module so when someone does `newFromModule` it could get either of them. In the past it has always gotten the `quiz_mode` path and there were hacks to make `proctored_quiz_mode` work (like line 388 of Problem.pm) for proctored quizzes. Now that modules are loaded in more random orders newer systems are returning `proctored_quiz_mode` for all of the url paths, even regular gateway quizzes. This is fixed by making `ProctoredGatewayQuiz.pm` a wrapper for `GatewayQuiz.pm` so that the url types `quiz_mode` and `proctored_quiz_mode` can have separate modules.

To Test:
- Make a gateway quiz and a proctored gateway quiz
- Check that the link for the gateway quiz on the problem sets page has `quiz_mode` in the url and the proctored quiz has `proctored_quiz_mode` in the url.
- Check that you can submit answers for both.