Using Old Hot Pot quizes

Using Old Hot Pot quizes

by Tom McCarthy -
Number of replies: 6
I was asked to work on a web site. There are a bunch of hot pot activities that previously made which I would like to incoporate.

I uploaded them to the site, but there doesn't seem to be any proper flow:
  1. at the end of the activity there's no automatic return to the course (except by clicking on the moodle navigation button)
  2. no record or score is kept of the attempt
I removed the navigation code from the html before uploading them, and then restored it when I found it not working. Still no good.

Is there something about these activities that's preventing them from working?
You can find the orginals here: link

I just created this moodle site this week (using CVS) so it should be up-to date
gratias
tm
Average of ratings: -
In reply to Tom McCarthy

Re: Using Old Hot Pot quizes

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Tom,
thanks for the link to the quizzes. The reason why they don't work with the HotPot module is that the following comment tags do not appear in the html file:
  • <!-- BeginSubmissionForm -->
  • <!-- EndSubmissionForm -->
These tags can go anywhere, but they usually go near the end of the document. They are required by the HotPot module, so that it can insert the <FORM> that is used to return the results to Moodle.

I am hopeful if you add these tags into the html document, that the results will then returned to Moodle.

Another idea would be to run the quizzes from the original ".jcl" files.

all the best
Gordon
In reply to Gordon Bateson

Re: Using Old Hot Pot quizes

by Tom McCarthy -
Very helpful. I'll try it soon.

I'm also dabbling in cgi and wonder how I can pass values to moodle (php, right?) If I create a cgi which generates dynamic html how can moodle react to it.
I assume there is some kind of modular work that needs to be done, like the hotpot module.

Would this be the forum for getting answers? if not any pointers would be welcome.
multas gratias,
tom
In reply to Tom McCarthy

Re: Using Old Hot Pot quizes

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
One further point about the "old hot potatoes quizzes". If you want to remove the Hot Potatoes navigation buttons, you will need to surround them with the following html comments:

<!-- BeginTopNavButtons -->
<!-- EndTopNavButtons -->

<!-- BeginBottomNavButtons -->
<!-- EndBottomNavButtons -->

Regarding your CGI plans, the "resource" module allows you to pass Moodle parameters such as "username" and "course id" to non-moodle pages. Please try adding a "Link to a file or web site", to see what I am talking about.

Probably the "General Developer Forum" is the place to get more help with your CGI project smile

all the best
Gordon
In reply to Gordon Bateson

Re: Using Old Hot Pot quizes

by Tom McCarthy -
Full of confident anticipation, I added said lines and...it came to naught.
I even tried adding the lines in a variety of places in the file...frustrating.

One thing, I added  <!-- BeginSubmissionForm --> to the file just after <html> (and later, <body>) and the hot potato file refused to display.
In reply to Tom McCarthy

Re: Using Old Hot Pot quizes

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
OK, I will add the lines in myself to one of the quizzes and send you a copy tomorrow.
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Using Old Hot Pot quizes

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Tom,
please find attached the the modified quizzes. I have added the <!-- comments --> which the HotPot module needs to remove the navigation buttons and insert the submission form.

The first two quizzes are "Flashcard" exercises. These don't have a score and are never finished which is why they don't return results to Moodle even when they have the submission form inserted.

Precise details of the DreamWeaver compatible regular expressions I used to insert the comments appear below.

all the best
Gordon

=====================================
  1. detect top navigation buttons
    find:
    (<div class="NavButtonBar" id="TopNavBar">(.*?)</div>)
    replace:
    <!-- BeginTopNavButtons -->
    $1
    <!-- EndTopNavButtons -->
  2. detect top navigation buttons
    find:
    (<div class="NavButtonBar" id="BottomNavBar">(.*?)</div>)
    replace:
    <!-- BeginBottomNavButtons -->
    $1
    <!-- EndBottomNavButtons -->
  3. insert start and end of submission form
    find:
    </body>
    replace:
    <!-- BeginSubmissionForm -->
    <!-- EndSubmissionForm -->
    </body>
Average of ratings: Useful (1)