org.activemath.studentmodel2
Class LearnerModelListener
java.lang.Object
org.activemath.studentmodel2.LearnerModelListener
- All Implemented Interfaces:
- EventListener, ActivemathEventListener
public class LearnerModelListener
- extends Object
- implements ActivemathEventListener
Event listener for SLM.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static Logger log
LearnerModelListener
public LearnerModelListener(LearnerModel model)
- Parameters:
model - The learner model to which this listener belongs
onActivemathEvent
public void onActivemathEvent(ActivemathEvent event)
- Description copied from interface:
ActivemathEventListener
- Handle an Activemath event.
This method must return as quickly as possible
and must not block the calling thread for long.
- Specified by:
onActivemathEvent in interface ActivemathEventListener
- Parameters:
event - the event to respond to
getForIds
public static final List<String> getForIds(ExerciseStepEvent event,
Item exercise)
- Returns the for ids of an exercise step or of an exercise.
If the exercise step is not annotated with its own for ids, then it falls back
to the metadata of the exercise.
- Parameters:
event - exercise - Can be null (then the exercise will be taken from the event)
- Returns:
- A collection of for ids
getDifficulty
public static final Difficulty getDifficulty(ExerciseStepEvent event,
Item exercise,
User user)
- Tries to find out the difficulty of an exercise/exercise-step by going through
the event, the exercise and the users learning context, ...
- Parameters:
event - exercise - If null, exercise will be taken from the eventuser - If null, the user will be taken from the event
- Returns:
- The difficulty based on the event, or null