Scrambling Questions


[Home][Index][Previous][Next]
By default, the AppletQuiz applet asks the questions in a question file in the order that they appear. To have the applet ask the questions in random order, you need to add a parameter to the applet tag on your web page. The parameter line is:

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

where the string "SCRAMBLE_QUESTIONS" must appear exactly as shown (all capitals) in order to be recognized. The value of the parameter may be either "YES" to scramble the questions, or "NO" (the default) to ask them in the order they appear in the file.

Below is an example of an applet tag containing a SCRAMBLE_QUESTIONS parameter. It tells the AppletQuiz applet to use the file "MyTest.txt" in the folder/directory called "Quizzes", and to scramble the questions.

<applet 
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">
</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.

 

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