org.activemath.events.types
Class ExerciseStepEvent

java.lang.Object
  extended by org.activemath.events.ActivemathEvent
      extended by org.activemath.events.types.ExerciseStepEvent
All Implemented Interfaces:
Serializable, Comparable, BookEventTag, InteractionEventTag, InteractionExerciseEventTag, ItemEventTag, SessionEventTag, UserEventTag

public class ExerciseStepEvent
extends ActivemathEvent
implements InteractionExerciseEventTag, BookEventTag

Event: user has performed an exercise step

See Also:
Serialized Form

Field Summary
 double achievement
           
 int confidence
           
static String EVENT_TYPE
           
protected static Logger log
           
 List<String> misconceptions
           
protected static org.jdom.Namespace omdocNamespace
           
 long stepDuration
           
 
Fields inherited from class org.activemath.events.ActivemathEvent
bookId, groupId, id, sessionId, source, timestamp, type, userId
 
Constructor Summary
ExerciseStepEvent()
           
ExerciseStepEvent(String itemId, List<org.jdom.Element> metadataRecords, List<org.jdom.Element> input)
           
 
Method Summary
 double getAchievement()
          returns the achievement of the exerciseStep.
 String getBookId()
           
 List<CognitiveProcess> getCognitiveProcesses()
          returns a List of CognitiveProcess objects this exerciseStep is for.
 List<Competency> getCompetencies()
          Deprecated. use getCognitiveProcesses instead
 CompetencyLevel getCompetencyLevel()
          returns the CompetencyLevel of the exerciseStep this event occurred in.
 CompetencySystem getCompetencySystem()
          get the CompetencySystem the exercise is annotated with
 List<String> getConceptIds()
          returns the ids of the concepts trained by this exerciseStep as a List.
 int getConfidence()
           
 List<String> getDiagnosedMisconceptions()
           
 Difficulty getDifficulty()
          returns the difficulty of the exerciseStep this event occurred in.
 Difficulty getDifficulty(LearningContext context)
          returns the difficulty of the exerciseStep this event occurred in, respecting the given LearningContext
 List<String> getForIds()
          returns a List of mbase Ids
 String getItemId()
           
 List<org.jdom.Element> getMetadata()
           
 String getMetadataText()
          Convert metadata of the event into a String representation.
 List<String> getMisconceptions()
          Deprecated.  
 List<String> getRemediatedMisconceptions()
           
 String getSessionId()
           
 long getStepDuration()
          Duration (ms) since last input step for that exercise.
 String getStepId()
           
 double getSuccessRate()
          Deprecated. successRate is deprecated use setAchievement!
 String getUserId()
           
 List<org.jdom.Element> getUserInput()
           
 Integer getUserInputDelay()
           
 String getUserInputText()
           
 boolean isHint()
          Check the event whether the learner requested a hint
 boolean isInputEncodingError()
          Check the event whether the learner had a syntax error in his input
 void setAchievement(double d)
           
 void setBookId(String string)
           
 void setConfidence(int value)
           
 void setItemId(String string)
           
 void setMetadata(List<org.jdom.Element> value)
           
 void setMetadataText(String text)
           
 void setSessionId(String string)
           
 void setStepDuration(long duration)
           
 void setSuccessRate(double d)
          Deprecated. SuccessRate is deprecated, use setAchievement()
 void setUserId(String string)
           
 void setUserInput(List<org.jdom.Element> value)
           
 void setUserInputDelay(Integer value)
           
 void setUserInputText(String text)
           
 String toString()
           
 
Methods inherited from class org.activemath.events.ActivemathEvent
compareTo, dispatchFinished, getGroupId, getId, getSource, getTimestamp, getType, setGroupId, setId, setSource, setTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.activemath.events.tags.UserEventTag
getGroupId, setGroupId
 

Field Detail

EVENT_TYPE

public static final String EVENT_TYPE
See Also:
Constant Field Values

log

protected static Logger log

achievement

public double achievement

confidence

public int confidence

stepDuration

public long stepDuration

misconceptions

public List<String> misconceptions

omdocNamespace

protected static final org.jdom.Namespace omdocNamespace
Constructor Detail

ExerciseStepEvent

public ExerciseStepEvent()

ExerciseStepEvent

public ExerciseStepEvent(String itemId,
                         List<org.jdom.Element> metadataRecords,
                         List<org.jdom.Element> input)
Method Detail

getMetadata

public List<org.jdom.Element> getMetadata()

setMetadata

public void setMetadata(List<org.jdom.Element> value)

getMetadataText

public String getMetadataText()
Convert metadata of the event into a String representation. This method is used by the persistance framework to store the event in a database.


setMetadataText

public void setMetadataText(String text)

getStepId

public String getStepId()
Returns:
Step id (from metadata)

getUserInput

public List<org.jdom.Element> getUserInput()

getUserInputText

public String getUserInputText()

setUserInputText

public void setUserInputText(String text)

toString

public String toString()
Overrides:
toString in class ActivemathEvent

getUserId

public String getUserId()
Specified by:
getUserId in interface UserEventTag

setUserId

public void setUserId(String string)
Specified by:
setUserId in interface UserEventTag

getSessionId

public String getSessionId()
Specified by:
getSessionId in interface SessionEventTag

setSessionId

public void setSessionId(String string)
Specified by:
setSessionId in interface SessionEventTag

getItemId

public String getItemId()
Specified by:
getItemId in interface ItemEventTag
Overrides:
getItemId in class ActivemathEvent

setItemId

public void setItemId(String string)
Specified by:
setItemId in interface ItemEventTag
Overrides:
setItemId in class ActivemathEvent

setUserInput

public void setUserInput(List<org.jdom.Element> value)

getConceptIds

public List<String> getConceptIds()
returns the ids of the concepts trained by this exerciseStep as a List.

Returns:
the ids of the concepts trained by this exerciseStep as a List (Which might be empty).

getSuccessRate

public double getSuccessRate()
Deprecated. successRate is deprecated use setAchievement!


getAchievement

public double getAchievement()
returns the achievement of the exerciseStep.

Returns:
the achievement of the exerciseStep, or -1 if none could be found.

getDifficulty

public Difficulty getDifficulty()
returns the difficulty of the exerciseStep this event occurred in.

Returns:
the difficulty of the exerciseStep this event occurred in, or null if none was specified.

getDifficulty

public Difficulty getDifficulty(LearningContext context)
returns the difficulty of the exerciseStep this event occurred in, respecting the given LearningContext

Returns:
the difficulty of the exerciseStep this event occurred in, or null if none was specified.

getCompetencyLevel

public CompetencyLevel getCompetencyLevel()
returns the CompetencyLevel of the exerciseStep this event occurred in.

Returns:
the CompetencyLevel of the exerciseStep this event occurred in, or null if none was specified.

getForIds

public List<String> getForIds()
returns a List of mbase Ids

Returns:
a List of Strings

getCompetencies

public List<Competency> getCompetencies()
Deprecated. use getCognitiveProcesses instead

returns a List of Competency objects this exerciseStep is for.

Returns:
a List of Competency objects this exerciseStep is for (Which could be empty).

getCognitiveProcesses

public List<CognitiveProcess> getCognitiveProcesses()
returns a List of CognitiveProcess objects this exerciseStep is for.

Returns:
a List of CognitiveProcess objects this exerciseStep is for (Which could be empty).

getCompetencySystem

public CompetencySystem getCompetencySystem()
get the CompetencySystem the exercise is annotated with

Returns:
the CompetencySystem

getMisconceptions

public List<String> getMisconceptions()
Deprecated. 


getDiagnosedMisconceptions

public List<String> getDiagnosedMisconceptions()

getRemediatedMisconceptions

public List<String> getRemediatedMisconceptions()

getConfidence

public int getConfidence()
Returns:
int value of confidence from metadata records, or -1 .

setConfidence

public void setConfidence(int value)

setSuccessRate

public void setSuccessRate(double d)
Deprecated. SuccessRate is deprecated, use setAchievement()


setAchievement

public void setAchievement(double d)

setUserInputDelay

public void setUserInputDelay(Integer value)
Parameters:
time - (in millis) from presentation of page to first user input (-1 if not measured)

getUserInputDelay

public Integer getUserInputDelay()
Returns:
time (in millis) from presentation of page to first user input (-1 if not measured)

isInputEncodingError

public boolean isInputEncodingError()
Check the event whether the learner had a syntax error in his input

Returns:
true if input syntax error, otherwise false

isHint

public boolean isHint()
Check the event whether the learner requested a hint

Returns:
true if input syntax error, otherwise false

getStepDuration

public long getStepDuration()
Duration (ms) since last input step for that exercise. Can be calculated at report time. This field might not be persisted!

Returns:
duration (ms) since last step for that exercise, or -1.

setStepDuration

public void setStepDuration(long duration)

getBookId

public String getBookId()
Specified by:
getBookId in interface BookEventTag

setBookId

public void setBookId(String string)
Specified by:
setBookId in interface BookEventTag