1. We need this so that, for example, when previewing a question from
the quiz editing page, the preview uses the filter settings, theme and
language set for that quiz and course.
Unfortunately, they are used all over the import/export code, so I cannot eliminate them completely. However, I was able to move them out of the core library.
There was a mistake in the text format upgrade in the question bank. The wrong conversions were performed, and the wrong arguments were passed to text_to_html in the conversions that were done.
Also, not all the calls to format_text had been updated to use the values in the new format columns.
I think this change fixes everything, but I have only had very limited time to test it. I am committing it anyway, because that seems to me to be the best way to maximise testing. I think that the new code is certainly better than the old code was.
When there was a question category whose parent had somehow been deleted from the question bank, while the child category was still there, then that gave an error because a DB query was still referring to the question_categories.courese coloumn, that was changed to contextid in moodle 1.9.
Fix thanks to Mahmoud Kassaei.
The solution is to not tidy the XML. The XML generated is already quite well laid out, and if we want it better, we should fix that, rather than trying to load the whole file into memory to reformat it.
Also, while investigating this, I found that we were not handling the mime-type of the exported file very elegantly, so I added a new mime_type method (defaults to getting the mime type of the file extension).
* Routine navigation through the quiz and question modules
* Fixed navbar through quiz and questions
* Pages headers added throughout
* Added method to turn a navigation node into a tabs array suitable for use with print tabs
* class html_component does not exist any more
* class html_table rendered via html_writer::table()
* html_table, html_table_row and html_table_cell have public $attributes property to set their CSS classes
* dropped rotateheaders feature, should be added again after more research of possible ways (<svg> is not nice IMHO)
* dropped possibility to define CSS classes for table heading, body and footer - can be easily done and better done using just table class and context
In two situations, the correct state was not being loaded for essay questions that had
not yet been manually graded:
1. When starting a subsequent attempt in each attempt builds on last mode.
2. In the quiz reports.
This commit fixes the problem. It has one other side-effect. When viewing the individual
question grades in the overview report for an attempt that is still in progress, the
information displayed will be slightly different. This only affects adaptive mode quizzes,
and will acutally cause the report to show slighly more up-to-date information.
Interestingly, the reportlib.php change had already been made in HEAD, as part of MDL 16529