1. Create a quiz with, say, a shortanswer question in it.
2. Preview the quiz.
3. Put the caret in the shortanswer text box. Press enter.
4. Nothing happens. This is due to the code in question/qengine.js that prevents enter from submitting the form.
Steps to reproduce:
1. Now go to end of mod/quiz/locallib.php.
2. Comment out the line $PAGE->requires->js_module('core_question_engine'); This should not be necessary because the quiz js_module says that it requires core_question_engine, and find_module knows about this module.
3. Repeat the steps above (making sure that old JS is not being cached anywhere).
4. Now, pressing enter submits the form, or at least toggles the flag.
Separately, and un-relatedly, the attached patch add a count of the number of YUI and other modules included on each page. It also provides a hidden display of far more detail. Please can you review it.
The patch also includes, commented out, what I think the right solution to this bug is. However, that patch is based on logic, not the actual code. If you uncomment this, you get all sorts of errors.