* Use this to fix a question restore bug.
* Replace older code that does something similar with the new test.
* Refactor initialisation of $CFG->siteidentifier into a function. There were about 4 copies of this code ;-)
Step 2. Remove as many as possbile of the differences between the two classes. This is mostly whitespace and irrelevant code formatting issues, but there are also a few changes to the generated output, taking the best of both views.
Step 1. Just convert the existing functions quiz_question_showbank and question_showbank and friends into methods of a class and subclass.
More to come.
* Implement this in the base class, and
* use this in the shortanswer type as a proof of concept.
This makes writing new question type subclasses a bit easier. Thanks to Oleg Sychev for this code.
MDL-15315 The previous fix for this issue with wildcard answers in the item analysis report caused the following two regressions. This patch fixes it properly.
MDL-17247 This is basiclly pointing out the weridness in the previous fix and gave some useful clues as to a proper solution. Thanks Oleg.
MDL-17610 This was a report of a problem with each attempt builds on last, with a shortanswer question, where the sutdent's response contains a '.
Also, lots of unit tests to try to ensure the new code is right.
Also MDL-17585 Improve layout of manual grading forms to make them look more like formslib forms. The standard trick of stealing the HTML and class names that formslib works, so the standard style rules apply to your form.
And MDL-17568 minor niggles with new queston navigation:
* The bit that scrolls down to the question you just submitted in adaptive mode was not working with random questions.
* Teachers reviewing an open attempt were shown the qusetions as editable, not read only!
Have fixed the formatting in responses report and in statistics report to use the correct formatting for the question type.
Created new functions format_responses and format_response. format_responses works on an array and normally just walks through the array calling format_response.
In the 1.9 branch this is controlled by a new option under Admin -> Experimental. In Moodle 2.0 dev it is not optional, it just works.
The main change is letting the manual grading report know which random questions might need manual grading. MDL-4004 - this depends on the random question under consideration, which requires a new questiontype method.
I also changed the random question code so that I could remove some global variables.
When editing an existing category, the logic should have been to prevent you from moving the category if it was the last remaining top-level category in its context.
When creating a new category as part of creating a random question, there should be no restriction.