How do I change default opening of Hot Potato quiz to show all questions

How do I change default opening of Hot Potato quiz to show all questions

by Alan Giverin -
Number of replies: 2

I was wondering if anybody could help me with an issue I'm having. About four years ago, I found the code so that the default presentation of a hot potato quiz was with all the questions showing on opening - as opposed to the normal opening with only one question showing.

Unfortunately, I can't find the original website that had the hack I'd need to do. Does anybody know what the hack is and can I use the same hack for moodle?

Average of ratings: -
In reply to Alan Giverin

Re: How do I change default opening of Hot Potato quiz to show all questions

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

Hi Alan,

I surmise we are talking about JQuiz. Is that right?

If yes, then you can force the quiz to start with all questions showing if you do the following:

  1. if you haven't done so already, open JQuiz and generate the HTML file for the quiz
  2. open the quiz's HTML file with a text editor
  3. locate the "SetUpQuestions" function:
    • search for "function SetUpQuestions()"
  4. locate the following last line in the "SetUpQuestions()" function
    • search for "SetFocusToTextbox()"
  5. insert the following line, above the "SetFocusToTextbox()" line
    • ShowHideQuestions(); 
  6. save the file and close your text editor

Now you can use this HTML file as the "Source file" for your HotPot activity in Moodle.

best regards
Gordon

In reply to Gordon Bateson

Re: How do I change default opening of Hot Potato quiz to show all questions

by Alan Giverin -

Thanks Gordon that's working perfectly. As usual your advice has been very helpful.

Alan