Included in the "HotPot v2" download is an add-on for the quiz module so that you can import Hot Potatoes questions into the question bank for the quiz module, from where you can add them to quizzes in the usual way.
I personally have no plans to attempt to add a new question "Hot Potatoes" style type to the quiz module. However, I believe I have seen a post (sorry I don't recall exactly which forum) talking about a drag and drop question type for the quiz module, and another asking for suggestions for enhancements to the quiz module.
It seems to me that quiz should probably be in charge of doing the addslashes actually, but as far as I can tell, it expects to get the data ready to be inserted. It probably holds for most of the text fields.
It seems as though importing straight into a hotpot quiz, the same file (with apostrophes) works fine - it's only broken when importing into quiz.
Also, in attempt.php there is a call to require_param which should be required_param.
I know that Martin L asked about getting hotpot v2 into CVS - I just want to add my +1 to that request as I could just be fixing these problems and committing them as I find them
after talking with Martin D, it is each format's responsibility to handle addslashes itself. So in readquestion in the hotpot quiz import format, questiontext and probably others should all have addslashes.
I would also be very happy for the "HotPot v2" module to be added to the CVS where I could apply patches more centrally. I haven't contributed to a CVS before, so you might have to bear with me while I find my feet. Also, I don't know the access information.
The best CVS resource on the net is the 'red beans' CVS book. See http://cvsbook.red-bean.com/
You don't need to worry too much about creating repositories or importing code. diff/update/commit are the key tricks you'll want. There are some cute GUIs (check cvsgui.org).
Hello again Penny,
I have added "addslashes" to "format.php" script which allows HotPot's XML files to be imported in Moodle quiz module. I tested it on all HotPot types with single and double quotes in the titles, instructions, readings, questions, answers and feedback and it all seems OK.
I have added it to the zipped download for the module, and for convenience attached it to this message too.
I also changed the require_variable to required_variable in "attempt.php". Thanks for pointing that out.
-- Heads up --
Because of a recent fix to quiz to be more user friendly, (see http://moodle.org/bugs/bug.php?op=show&bugid=2963) it's no longer sufficent to just add the hotpot format to the quiz/format directory - hotpot needs to register itself as being able to provide import/export in import.php and export.php there are now arrays of formats which support importing and exporting.
Thanks for the insight into the quiz module enhancements, Penny. Clever stuff! I'll have a look to see how other modules are register themselves as being able to import/export and then set about adding this functionality to "HotPot v2"