org.activemath.sequencer
Class TutorialExerciseSequencer

java.lang.Object
  extended by org.activemath.sequencer.ExerciseSequencer
      extended by org.activemath.sequencer.TutorialExerciseSequencer
All Implemented Interfaces:
EventListener, ActivemathEventListener, AppSessionShutdownHook
Direct Known Subclasses:
TutorialExerSeqTrainCompetencyLevel, TutorialExerSeqTrainN

public abstract class TutorialExerciseSequencer
extends ExerciseSequencer

Involve the tutorial component to choose the next adaptive exercise


Field Summary
protected  String bookId
           
protected  List<String> conceptIds
           
protected static String DEFAULT_TASK
           
protected  String learningGoal
           
static String TUTORIAL_ES
           
protected  String userId
           
 
Fields inherited from class org.activemath.sequencer.ExerciseSequencer
appSession, exerciseListIterator, exercisesSkipped, exercisesSolved, exerciseStrategy, exericsesFailed, FINISHED_NOCONTENTABORT, FINISHED_SESSION_EXPIRED, FINISHED_SUCCESS, FINISHED_TIMEEXPIRED, FINISHED_USERABORT, finishReason, id, itemsSeen
 
Constructor Summary
TutorialExerciseSequencer(AppSession appSession, String learningGoal, List<String> conceptIds, String bookId)
           
 
Method Summary
 void exerciseFinished(String exerciseId, double successRate)
          Could be override by sub class.
 void exerciseSolved(String exerciseId)
           
 String getNextExerciseId()
           
abstract  String getNextTask()
          Need to be override in sub class
protected abstract  boolean isGoalAchieved()
          Need to be override in sub classes
 
Methods inherited from class org.activemath.sequencer.ExerciseSequencer
addItemsAlreadySeen, addItemShown, getBookId, getExercisesSkipped, getExercisesSolved, getExerciseStrategy, getExericsesFailed, getFinishReason, getId, getItemsSeen, getNextExercise, initExerciseListIterator, onActivemathEvent, sessionShutdown, setExercisesSkipped, setExercisesSolved, setExerciseStrategy, setExericsesFailed, setFinishReason, setItemsSeen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TUTORIAL_ES

public static final String TUTORIAL_ES
See Also:
Constant Field Values

DEFAULT_TASK

protected static String DEFAULT_TASK

userId

protected String userId

bookId

protected String bookId

learningGoal

protected String learningGoal

conceptIds

protected List<String> conceptIds
Constructor Detail

TutorialExerciseSequencer

public TutorialExerciseSequencer(AppSession appSession,
                                 String learningGoal,
                                 List<String> conceptIds,
                                 String bookId)
Method Detail

getNextExerciseId

public String getNextExerciseId()
                         throws NoAvailableExercisesException
Throws:
NoAvailableExercisesException

exerciseSolved

public void exerciseSolved(String exerciseId)

exerciseFinished

public void exerciseFinished(String exerciseId,
                             double successRate)
Could be override by sub class.

Specified by:
exerciseFinished in class ExerciseSequencer
successRate - "-1" tells us we don't know about successRate, otherwise, the number the semantic of positive value is defined in implementing classes.

getNextTask

public abstract String getNextTask()
Need to be override in sub class

Returns:

isGoalAchieved

protected abstract boolean isGoalAchieved()
Need to be override in sub classes

Specified by:
isGoalAchieved in class ExerciseSequencer
Returns:
true if learning goal is achieved false if we still need to continue with showing the next exercise