Importing HotPot questions in Moodle 2.0

Importing HotPot questions in Moodle 2.0

by Gordon Bateson -
Number of replies: 37
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hello everyone,

just a small annoucement ot say that it is now possible to import HotPot questions from Hot Potatoes XML files (jcl, jcw, jmt,jmx and jqz) into the the question bank of Moodle 2.0. The necessary script is in the zip download of HotPot for Moodle 2.0

enjoy !
Gordon

Average of ratings: -
In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Thanks Gordon for your effortssmile Will I have to delete my earlier download and replace it with the one in your link here?

In reply to Mary Cooch

Re: Importing HotPot questions in Moodle 2.0

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

Yes, that's right Mary. The latest zip contains two folders:

  • hotpot
    this goes into the "mod" folder,
  • question/format/hotpot
    your Moodle site already has a "question" folder, and in that there is already a "format" folder, so all you have to do is put the "hotpot" folder inside the "format" folder.

hope that is clear smile
Gordon

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Ok thanks-that's a pleasant little job for the weekend for me. I am really sorry by the way that I haven't contributed as much as the others in testing your HotPot2 - I will do some more this weekend but I have to admit the likes of Glenys and Stan are making me feel quite guilty!blush

In reply to Mary Cooch

Re: Importing HotPot questions in Moodle 2.0

by Glenys Hanson -

That's OK, Mary, we're keeping the difficult bits for you. wink

Cheers,

Glenys

In reply to Glenys Hanson

Re: Importing HotPot questions in Moodle 2.0

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

oh not the maths questions please!!big grin

In reply to Mary Cooch

Re: Importing HotPot questions in Moodle 2.0

by John Stemmelin -

Thanks Gordon and Mary. This was almost too easy! I am now able to use hot potatoes quizes with my moodle site.

I just have an issue figuring out how to import the hotpot quiz questions to a moodle quiz. I find the happy medium for me is to create hotpot modules and import the questions from those modules into other tests.

Is this still possible? Thanks again!

In reply to John Stemmelin

Re: Importing HotPot questions in Moodle 2.0

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

Hi John,
to import questions from a Hot Potatoes exercise (JCloze, JCross, JMatch, JMix or JQuiz) to the question bank of a Moodle course, from where it can be added to a Moodle Quiz activity, try this:

  1. create the Hot Potatoes exercise on your PC and save it in a fie on your PC
  2. login to Moodle and go to the main page of the Moodle course where you want to add the quiz (you need to be a teacher in the course)
  3. click on the "Question bank" link in the "Settings" block/menu
  4. click on the "Import" link in the "Settings" menu
  5. select "Hot Potatoes XML file" for the file format
  6. click the "Import from ths file" link, navigate to the Hot Potatoes file on your PC, and upload it to the Moodle
  7. click the "Import" button

good luck !
Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by John Stemmelin -

thanks gordon. Unfortunately, I don't have any import button in my questions bank or I am missing it. here is a screen shot. I just love hot potatoe so much I won't give it up with 2.0.

In reply to John Stemmelin

Re: Importing HotPot questions in Moodle 2.0

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

Hi John,
I chose my words carefully when I said ...

  • click on the "Import" link in the "Settings" menu

the attached screenshot shot shows where the link is on my Moodle 2.0 site..

cheers
Gordon

Attachment question.bank.import.jpg
In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by John Stemmelin -

Hot potatoes XML is not one of my options. Does that mean that didn't install the question module correctly?  Thanks for your patience and help.

In reply to John Stemmelin

Re: Importing HotPot questions in Moodle 2.0

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

Yes, probably the Hot Potatoes question import script has not been installed (correctly). It needs to go here:

  • question/format/hotpot/format.php

Also, there is a lang file which needs to go here:

  • question/format/hotpot/lang/en/qformat_hotpot.php

Pleae could you confirm that the above files exist on your system.

cheers
Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by John Stemmelin -

They exist now! I don't know how I missed it at first. Thanks. I know I will eventually love 2.0 and this takes me one step closer. Can hardly wait to get Mary's book!

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by finita dewi -

Hi Gordon, I also have trouble with importing the hotpotatoes files. I couldnt find the hotpot XML option. need your help.

 

Thanks

In reply to finita dewi

Re: Importing HotPot questions in Moodle 2.0

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

Finita, have you installed the addon to import Hot Potatoes questions to the Moodle question bank? It is not a standard feature yet in Moodle 2.0, so you will need to install it yourself (or ask your Moodle adminitrator to get it installed)

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by finita dewi -

Gordon, yes, that's what I have in mind. I should install the addon hotpot. But I havent find where the addon button is. Need your help please, as I am a newbie.

In reply to finita dewi

Re: Importing HotPot questions in Moodle 2.0

by Glenys Hanson -

Hi Finita,

I'm afraid there's no "addon button". You have to install addons as explained here: Installing contributed modules or plugins and you have to be the Administrator of your Moodle platform and have access to the server. Is this the case for you ?

If not, you need to contact the person who is hosting your Moodle platform to do it for you.

Cheers,

Glenys

Average of ratings: Useful (1)
In reply to finita dewi

Re: Importing HotPot questions in Moodle 2.0

by Glenys Hanson -

Hi Finita,

I've tried to group together what's been said in various posts above. Gordon will say if I haven't got it right:

Download the file at: http://bateson.kanazawa-gu.ac.jp/moodle/zip/moodle-20.hotpot-module.zip

It contains 2 folders:

  • hotpot
    this goes into the "mod" folder,

  • question/format/hotpot
    your Moodle site already has a "question" folder, and in that there is already a "format" folder, so all you have to do is put the "hotpot" folder inside the "format" folder, that is in:
    question/format/hotpot/format.php

Also, there is a lang file which needs to go here:

  • question/format/hotpot/lang/en/qformat_hotpot.php

All this has to be done by the Moodle administrator.

After that, a teacher can open a Quiz, in Settings go to the Question Bank and click on Import to see the window below.

Cheers,

Glenys

Attachment screenshot_04.png
Average of ratings: Useful (1)
In reply to Glenys Hanson

Re: Importing HotPot questions in Moodle 2.0

by finita dewi -

Dear Gordon and Glennys,

I have followed all the above-mentioned steps but when I import the hotpot files this is what happened.

I have checked the files in "mod", "question" and "lang" folder, they are all similar to what you explained. Do you think that there are things that I've missed

Thanks

In reply to finita dewi

Re: Importing HotPot questions in Moodle 2.0

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

Finita,
are you able to import your HP file into the question bank on my Moodle testing server?

Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by finita dewi -

Gordon,

I tried to input my HP file into your Question Bank and it was succesful. But It wasn't in my server. Do you think I have to redo the process with the two folders that I downloaded?

Thanks

Finita

In reply to finita dewi

Re: Importing HotPot questions in Moodle 2.0

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

Yes, it would be a good idea to reinstall the software to be sure you hve the latest versions.

Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by Michael Brady -

Gordon,

This doesn't sound like something a teacher can do, am I correct? do I need to have my administrator run this zip and put those directories where they belong?

Mike

In reply to Michael Brady

Re: Importing HotPot questions in Moodle 2.0

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

Yes Mike, you are correct.

  1. You will need to ask your server adminitrator to upload the HotPot folder to the appropriate place on your server,
  2. and then you will need to ask your Moodle administrator to login to Moodle and visit the "Notifications" page to initiate the updating of the Moodle database.

best regards
Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by Elek Mathe -

Gordon, thanks for making this available.

When I tried to upload various Hot Potatoes files with it, I always got the same error message:

"Parsing questions from import file.

Oops, $hotpot object is missing or invalid (source file contructor

Source file not found (or empty): oops"

The same files got imported into Moodle 1.9 fine. I tried a number of different files and changed a few settings as well, but no luck.

I'm sure I'm missing something obvious here - could you give me a hint?

Thanks a lot!

Elek

In reply to Elek Mathe

Re: Importing HotPot questions in Moodle 2.0

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

Hi Elek,

please could you attach your quiz to your next post to this forum. I would like to try the import myself so I can see why the message appears

thanks
Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by Elek Mathe -

Gordon, this is mysterious. Yesterday I tried a couple of different files (jqz, jmt, etc.), with different source files, and none of them worked, all returned the same error message, while they all worked in 1.9. I wanted to test them once again this morning before attaching them - and they all work fine now. I swear I didn't change anything. And I didn't make up that error message, that's what I got every time I tried. What is going on here?

I think my initial assumption was right and I must have missed something simple and obvious, and then I must have changed something without noticing it, which doesn't reflect very well on my abilities.

I'm sorry about the false alarm, Gordon.

In reply to Elek Mathe

Re: Importing HotPot questions in Moodle 2.0

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

Hi Elek,

it may be something you did differently, but maybe something changed on the server too. Maybe someone updated the HotPot question import script?

Anyway, I'm glad it is working for you now.

If you have problems with the HotPot module or HotPot question import, then you are welcome to try out your quiz on my testing server. That may help you isolate the cause of the problem.

all the best
Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by Elek Mathe -

Hi Gordon,

Thanks for the access - just uploaded a test exercise called "Vocabulary 1" with no problem, which I was unable to upload to my server; got the same error message as before. Obviously, there's something wrong my setup because it doesn't work once again. It's good to know that the exercise itself is fine and the problem is elsewhere. Just a note - it seems that cloze exercises using the dropdown feature don't get displayed properly; not a major thing, I just have to remember not to use it.

Thanks a lot once again!

In reply to Elek Mathe

Re: Importing HotPot questions in Moodle 2.0

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

Hi Elek,
you mean this error?

  • Oops, $hotpot object is missing or invalid (source file contructor

I would say it is impossible to get that if both the HotPot module, in "mod/hotpot", and the HotPot import script, in "question/format/hotpot", are up-to-date. Maybe you updated one but not the other?

Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by Elek Mathe -

Hi Gordon,

Thanks a lot for your help - of course you were right. I thought I had the latest version; apparently I didn't.

In reply to Gordon Bateson

Re: Importing HotPot questions in Moodle 2.0

by Paul Raper -

Hi guys,

I'm sorry if this seems a dense question, but does this all mean that Moodle 2 will run native Hot Potatoes quizs without any modification. This was one aspect I really missed when using Moodle 2 at the university where I work, versus my own Private Moodle 1.9X version.

Thanks for your patience, and I too will join in the testing process.

In reply to Paul Raper

Re: Importing HotPot questions in Moodle 2.0

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

Hi Paul,

> does this all mean that Moodle 2 will run
> native Hot Potatoes quizs without any modification.

Yes, in Moodle 2.x you can run Hot Potatoes quizzes from a "native" xml file (i.e. a jcl, jcw, jmt, jmx or jqz file), or from the html file.

But ...

... the standard Moodle 2.x packages do not currently include the HotPot module (in the "mod/hotpot" folder) or the Hot Potatoes question bank import script (in the "question/format/hotpot" folder), so they have to be installed by the server administrator as 3rd-party plugins.

You can download the HotPot module for Moodle 2.x from the Moodle CONTRIB repository, or from the following URL:

regards
Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions with images in Moodle 2.0

by Francois Malouin -

Hello Gordon,

thanks a lot for this plug-in that I just found...  

Everything look find and working well.  

However, I have a lot of hot potatoes quiz with pictures.  It look like they do not follow.  Is there a way to make sure questions and images are imported.

Thanks!

François

Average of ratings: Useful (1)
In reply to Francois Malouin

Re: Importing HotPot questions with images in Moodle 2.0

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

Hi Francois,
it is difficult to import images and audio in the question bank, because historically a single question in the question bank could only have one image associated with it. I have not tried importing multimedia questions recently though, so maybe things have changed.

Are you able to create a question with an image or audio when you create the question through the normal Moodle question-bank interface?

regards
Gordon

In reply to Gordon Bateson

Re: Importing HotPot questions with images in Moodle 2.0

by Asim Sheeraz -

Hi Gordon

I am having difficulty importing Hotpot xml file with images to a moodle question bank. Considering it's been a year since your last message here, I was wondering if anything has changed.


Regards

Asim

In reply to Asim Sheeraz

Re: Importing HotPot questions with images in Moodle 2.0

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

nothing's changed - as far as I can remember wink

Could you you upload a copy of your HotPot file and images with your next post to this forum, so that I have something to test on if and when I find time to investigate this issue?

thanks
Gordon 

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Importing HotPot questions with images in Moodle 2.0

by Asim Sheeraz -

Thanks for the quick response. I am attaching it with this post, since I am currently testing this as a way of bulk importing questions to moodle there are only 3 questions in that file.

I managed to get it working under HotPot activity like many have suggested here (upload the entire zip file and then unzip). However, it doesn't seem to be possible with the moodle's question bank import function. I like the Moodle's Quiz module better.

In the meanwhile I found a workaround, here's what I did.

  • Created the quiz with images present in the local folder.
  • Uploaded the folder containing all images onto the moodle server.
  • Pasted  the URL location of the folder on my server with the html tag. Something like from <img src="1.png" alt="1.png" ></img> to <img src="10.0.2.115/test/1.png" ></img>. One could directly use "insert picture from web URL" but I found this easier in my case.
  • Did a standard moodle question bank import of the HotPot xml file.
This doesn't seem to be too tedious at the moment. However, if moodle's import feature could work for the questions with images out of the box, it would be fantastic.

Regards

Asim