1. |
Find the Hot Potatoes source folder, and copy the hp6hotpotnet.js_ file into your custom source folder. |
2. |
Open the file in your text editor, and search for the JavaScript Finish function. It's about a quarter of the way through the file, and it starts like this: |
3. |
This function is useful to us because it's always called at the end of an exercise. If we want to insert any behaviour at the end of an exercise, we can put it inside this function. [Note: if you're going to post exercises on www.hotpotatoes.net, it's best not to mess with this function, in case you disrupt the submission of results!] |
4. |
The best place to insert our code is at the beginning of the function, right after the line that starts with "function". This is the code to insert: |
5. |
Finally, we just need to comment our code: |
6. |
Save the file, then create an exercise in JQuiz and view it in your browser. Here's an example. |