xml import/export MDL-25103 was not working due to out-of-memory errors when calling...
authorTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 8 Nov 2010 15:51:10 +0000 (15:51 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 8 Nov 2010 15:51:10 +0000 (15:51 +0000)
commit4673212416ea540f34a3a72ba8b2277a43fe2a85
tree09c94e1a64e2469f509650ce1677bff63e290dc4
parent0bfe821805bfc48ddc156fb9795b5929c897c985
xml import/export MDL-25103 was not working due to out-of-memory errors when calling xmltidy, which broke XML wellformedness.

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).
lib/questionlib.php
question/format.php
question/format/xml/format.php