Hotpot integrated into the Moodle quiz module

Hotpot integrated into the Moodle quiz module

by Gustav W Delius -
Number of replies: 12
Are there any plans to adapt the Hotpot module so that it provides a new questiontype for the Moodle quiz module? It seems to me that that would be the best way to integrate this into Moodle.
Average of ratings: -
In reply to Gustav W Delius

Re: Hotpot integrated into the Moodle quiz module

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

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.

In reply to Gordon Bateson

Re: Hotpot integrated into the Moodle quiz module

by Penny Leach -
When importing into the quiz module, it seems that questiontext doesn't get addslashes and therefore, any questions with apostrophes fail to get inserted into the db.

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 smile


-- Penny
In reply to Penny Leach

Re: Hotpot integrated into the Moodle quiz module

by Penny Leach -
-- replying to myself --

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.
In reply to Penny Leach

Re: Hotpot integrated into the Moodle quiz module

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
thanks a lot for the feedback and guidance Penny. I will test, improve and report back ... soon
In reply to Gordon Bateson

Re: Hotpot integrated into the Moodle quiz module

by Martín Langhoff -
Is your team happy with accepting patches? We'd be really keen if you were to put things up in cvs so we see your latest version, and can contribute patches that apply cleanly.
In reply to Martín Langhoff

Re: Hotpot integrated into the Moodle quiz module

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

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.

-- Gordon

In reply to Gordon Bateson

Re: Hotpot integrated into the Moodle quiz module

by Martín Langhoff -
I'd be more than happy to do the import/update for you so you get a head start. Have you got CVS access? Create an SourceForge account, and apply to be part of the project, and nudge MD to get CVS access. What platform do you use?

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).
In reply to Martín Langhoff

Re: Hotpot integrated into the Moodle quiz module

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Many thanks for the helpful pointers Martin. Just when I was begining to think about taking a breather ... smile

By the way, I found that http://www.cvsgui.org/ seems to have closed down. No matter, I'll go with the Moodle-recommended http://www.tortoisecvs.org/

In reply to Gordon Bateson

Re: Hotpot integrated into the Moodle quiz module

by Martín Langhoff -
Oh -- sorry. It was one ofthe many DNS aliases for the CVS GUI project. Still around as wincvs.org -- and hosted in Sourceforge anyway.
In reply to Penny Leach

Re: Hotpot integrated into the Moodle quiz module

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

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.

In reply to Gordon Bateson

Re: Hotpot integrated into the Moodle quiz module

by Penny Leach -
Thanks for that!

-- 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.

In reply to Penny Leach

Re: Hotpot integrated into the Moodle quiz module

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

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"