AHA
Class FilterTest

java.lang.Object
  |
  +--AHA.FilterTest

public class FilterTest
extends java.lang.Object

FilterTest is an extension of Filter, to generate multiple-choice tests.


Field Summary
protected  java.io.PrintWriter out
           
protected  UserModel UserModel
           
 
Constructor Summary
FilterTest(AHA AHA, java.lang.String FullDocName)
          This constructor filters a test according to a user model and page list.
 
Method Summary
 int[] BuildAnswers(Question question)
          This method creates a random list of answers to a question.
 java.lang.String EvalQuestions(CgiUtil Util)
          This method reads a user's answers to a multiple-choice quiz and evaluates the answers.
 void fillArrays(org.w3c.dom.Element root)
           
 java.lang.String FilterLinks(java.lang.String Link)
           
 int[] GenerateQuestions()
          This method creates a random list of question numbers.
 void getAnswer(org.w3c.dom.NodeList nodelist, int question, boolean correct)
           
 void getQuestion(org.w3c.dom.NodeList nodelist, int question)
           
 void getReason(org.w3c.dom.NodeList nodelist, int question, boolean correct)
           
 java.lang.String HtmlConvert(java.lang.String tempstr)
           
 void PrintQuestions(java.lang.String QuizCgi)
          This method generates a multiple-choice quiz with randomly selected questions and answers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UserModel

protected UserModel UserModel

out

protected java.io.PrintWriter out
Constructor Detail

FilterTest

public FilterTest(AHA AHA,
                  java.lang.String FullDocName)
           throws AhaException
This constructor filters a test according to a user model and page list. It writes the output to the PrintWriter.
Throws:
AhaException - If an error occurs in the file with the test.
Method Detail

HtmlConvert

public java.lang.String HtmlConvert(java.lang.String tempstr)

getReason

public void getReason(org.w3c.dom.NodeList nodelist,
                      int question,
                      boolean correct)

getAnswer

public void getAnswer(org.w3c.dom.NodeList nodelist,
                      int question,
                      boolean correct)

getQuestion

public void getQuestion(org.w3c.dom.NodeList nodelist,
                        int question)

fillArrays

public void fillArrays(org.w3c.dom.Element root)
                throws AhaException

GenerateQuestions

public int[] GenerateQuestions()
This method creates a random list of question numbers.

BuildAnswers

public int[] BuildAnswers(Question question)
This method creates a random list of answers to a question.

PrintQuestions

public void PrintQuestions(java.lang.String QuizCgi)
This method generates a multiple-choice quiz with randomly selected questions and answers.

EvalQuestions

public java.lang.String EvalQuestions(CgiUtil Util)
                               throws AhaException
This method reads a user's answers to a multiple-choice quiz and evaluates the answers. The given user model is updated.
Throws:
AhaException - If an error occurs in decoding the user's answers to the quiz.

FilterLinks

public java.lang.String FilterLinks(java.lang.String Link)