Multiple Check-box Question Script
Introduction
check-box.cgi is a Perl script which reads the contents of a question
data file and generates a multiple-choice check-box question. The
question data file is in the same format as the mcsimple data files except that the answer line
can have multiple enteries, that is, correspond to multiple selections
that the user will enter as answers. This particular example of the
script maintains logs in a student log-file on our server. To see the
examples in action click on one of the questions below. Please use
"demo" as the class number and "111111111" as the student ID.
Question 1
Question 2
Use of the script
This script is essentially an extension of mclog.cgi for which
documentation can be viewed here. I strongly
suggest getting mclog.cgi and mcsimple.cgi up and running on your server
before attempted to install this script. Please see application notes
for those scripts to understand the enviroment variables that are used
and how they must be configured for your server.
View the script.
The Question Files
The question files for check-box.cgi are the same as for the other
questions with one exception, the answer line will have multiple entries
corresponding to the correct answers for the question. An example is
provided below:
- # Next two lines are the question title and subject
- SEQ Question
- Analytical Techniques
- # Next line is the question to be asked
- Which of the following techniques are a form of chromatography?
- # The next X lines are for the X number of answers for the question
- LC
- GC
- SEC
- HPLC
- TLC
- ROTC
- # The next two lines contain the numeric value of the correct answer and the explaination
- 1,2,3,4,5
- Obviously, ROTC isn't a form of chromatography.
- # The next four lines are solts for features not implimented
- NA
- NA
- NA
- NA
Notice that the line which has the correct answers for the question has
6 entries. Each correct answer must be separated by a comma. This script
could also be used to perform the job of mclog.cgi by simply entering
one answer instead of multiple values.
Let us know you're using the scripts.
References
- Till, D. "Teach Youself Perl in 21 Days", Sams Publishing, 1995.
- Stein, L.D. "How to Set Up and Maintain a World Wide Web Site", Addison Wesley, 1995.
This hypermedia page is maintained and copyrighted by Ron Earp.