Scrambling Multiple-Choice

Answer Choices


[Home][Index][Previous][Next]
The Applet Tag Parameter

To enable the scrambling of answers in your quiz, you need to add the following SCRAMBLE_CHOICES parameter to the applet tag:

<param name="SCRAMBLE_CHOICES" value="YES">
 

The string "SCRAMBLE_QUESTIONS" must appear exactly as shown here. The values can be "YES" meaning "scramble the multiple-choice answers", and "NO" (the default) meaning "display the multiple-choice answer choices in the order they appear in the file".

Below is an example of an applet tag containing a SCRAMBLE_ANSWERS parameter. It tells the AppletQuiz applet to use the file "MyTest.txt" in the folder/directory called "Quizzes", and to scramble the questions as well as the multiple-choice answer choices.

<applet 
   codebase="AQ3" 
   code="AppletQuiz.class" width=400 height=300 
archive="TestApplet.zip">
You need a Java-enabled browser to take this quiz.
   <param name="FILE" value="Quizzes/MyTest.txt">
<param name="SCRAMBLE_QUESTIONS" value="YES">
<param name="SCRAMBLE_CHOICES" value="YES">
</applet>

You may cut and paste this applet tag into your web page if you like. Be sure to change the file name from "Quizzes/MyTest.txt" to the name of your question file. You may also change the scramble value from "YES" to "NO" if you like, but don't change anything that isn't in a value ="change this" string.

Important!

The applet tag parameter is necessary in order for the AppletQuiz applet to scramble multiple-choice answers, but not sufficient. Each multiple-choice question's separator line must also contain instructions for scrambling the choices. See below.


[Home][Index][Previous][Next]
copyright © 1998 by Jerry L. Stanbrough - all rights reserved.
last update May 12, 1999 by JL Stanbrough (jstanbro@venus.net)