Multiple Check-box Question Script


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:

  1. # Next two lines are the question title and subject
  2. SEQ Question
  3. Analytical Techniques
  4. # Next line is the question to be asked
  5. Which of the following techniques are a form of chromatography?
  6. # The next X lines are for the X number of answers for the question
  7. LC
  8. GC
  9. SEC
  10. HPLC
  11. TLC
  12. ROTC
  13. # The next two lines contain the numeric value of the correct answer and the explaination
  14. 1,2,3,4,5
  15. Obviously, ROTC isn't a form of chromatography.
  16. # The next four lines are solts for features not implimented
  17. NA
  18. NA
  19. NA
  20. 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.


    This hypermedia page is maintained and copyrighted by Ron Earp.