The latest version of the Quiz software and this documentation is available from: http://www.usask.ca/~earl.fogel/src/quiz.pl http://www.usask.ca/~earl.fogel/src/quiz.txt Description =========== The quiz software chooses a random selection of questions from a pool of questions, and conducts a quiz, displaying one question at a time, and displaying a score at the end. Invoking the Quiz ================= The program is invoked via a form, on which you specify the following fields: quizdir - directory containing the pool of questions quizhome - the quiz 'Home Page' nquestions - the number of questions to ask Two additional fields may be used for debugging: questions - a set list of questions to ask debug - produce debugging output on screen Here is an example form:
The Questions ============= Each question (along with it's multiple-choice answers) is stored in a separate html file, so you can change the questions and adjust their appearance as much as you like. Each question is a form, with a separate "submit" button for each of the possible answers. Following the question there are several named sections of html (the answers), corresponding to the value's of the submit buttons in the form. After a question is answered, the response for that answer is displayed. Here is a sample question file: True or False. The federal government passed legislation suspending Chinese immigration to Canada?

Unfortunately you are right. This legislation came into force on 1 July 1923 and remained in place until 1947. Wrong. The Canadian government policy of discouraging Chinese immigration to Canada began in 1885 with the imposition of a head tax; by 1903 the tax was $500 per head. The virtual ban on Chinese immigration began on I July 1923 and remained in place until 1947. You can place any text or HTML codes you like in the question files, but there are a few special things to watch out for: - the question is always surrounded by
...
tags - the responses are surrounded by ... tags - the "value"s in the question must match exactly the "name"s in the responses (apart from leading and trailing whitespace) - the correct response must always be listed first in the file (but the choices may appear in the question in any order) - all of the question filenames should end in .html - three special files may appear in the question directory; these let you customize the look and feel of the quiz: HEADER - stuff to be displayed at the start of every question. FOOTER - stuff to be displayed at the end of every question. CREDITS - stuff to replace the standard credits which appear at the end of the quiz - the quiz uses temporary files to prevent people from cheating. By default these are stored in the /tmp directory, but you can change that by changing the value of '$tmpdir' in the program. - there is currently a bug in the program so that if you have any text that you want to appear at the end of the document (after the responses) there must be a blank line after the last response - try not to split the special tags onto more than one line, ie: this is good this is bad Earl Fogel February 1997