org.activemath.exercises.generators
Class HTWGenerator.HtwEvaluator

java.lang.Object
  extended by org.activemath.exercises.openmath.OpenMath
      extended by org.activemath.exercises.Evaluator
          extended by org.activemath.exercises.generators.HTWGenerator.HtwEvaluator
Enclosing class:
HTWGenerator

public class HTWGenerator.HtwEvaluator
extends Evaluator


Field Summary
 
Fields inherited from class org.activemath.exercises.Evaluator
diagnosisFromCondition, localUserModel, log, om, omdocNamespace, omobjFalse, omobjTrue, omobjZero
 
Fields inherited from class org.activemath.exercises.openmath.OpenMath
openmathNamespace
 
Constructor Summary
HTWGenerator.HtwEvaluator(LocalUserModel localUserModel)
           
 
Method Summary
 org.jdom.Element getDiagnosis(org.jdom.Element answerMapElement, List userAnswer)
          Produce a diagnosis for the given answer map and answer.
 String pickNextInteraction(org.jdom.Element answerMapElement, List userAnswer)
          Pick the interaction identifier for the condition that holds.
 
Methods inherited from class org.activemath.exercises.Evaluator
booleanTrivialComparison, booleanTrivialComparison, booleanTrivialCompositeComparison, booleanTrivialElementCondition, booleanTrivialEvaluateAnswerMap, elementCondition, getAchievement, isNumericallyEqual, isSemanticallyEqual, isSyntacticallyEqual
 
Methods inherited from class org.activemath.exercises.openmath.OpenMath
applyBinding, getOmobjContents, oma, oma, oma, oma, oma, ombind, ombind, ombind, ombind, ombind, ombvar, ombvar, ombvar, ombvar, ome, ome, ome, ome, omf, omf, omi, omi, omobj, oms, omstr, omv, output, setOmNamespace, substituteVariables, tidyForOpenMath1, toDouble, toInt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTWGenerator.HtwEvaluator

public HTWGenerator.HtwEvaluator(LocalUserModel localUserModel)
Method Detail

pickNextInteraction

public String pickNextInteraction(org.jdom.Element answerMapElement,
                                  List userAnswer)
Description copied from class: Evaluator
Pick the interaction identifier for the condition that holds.

Overrides:
pickNextInteraction in class Evaluator
Parameters:
answerMapElement - "answer_map" element.
userAnswer - list of OMOBJs that form the answer from the user.
Returns:
identifier for next interaction.

getDiagnosis

public org.jdom.Element getDiagnosis(org.jdom.Element answerMapElement,
                                     List userAnswer)
Description copied from class: Evaluator
Produce a diagnosis for the given answer map and answer.

Overrides:
getDiagnosis in class Evaluator
Returns:
diagnosis as a JDOM element. The element is built after each call, even when the only diagnosis comes from the content.