org.activemath.sequencer
Class TutorialExerSeqTrainN

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

public class TutorialExerSeqTrainN
extends TutorialExerciseSequencer


Field Summary
protected  int numExercisesNeedToSolve
           
 
Fields inherited from class org.activemath.sequencer.TutorialExerciseSequencer
bookId, conceptIds, DEFAULT_TASK, learningGoal, TUTORIAL_ES, 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
TutorialExerSeqTrainN(AppSession appSession, String learningGoal, List<String> conceptIds, String bookId, ExerciseArgumentSetting exerciseUnit, int numExercisesNeedToSolve)
           
 
Method Summary
 void exerciseFinished(String exerciseId, double successRate)
          Could be override by sub class.
 ExerciseArgumentSetting getNextExercise()
          Prepare the next exercise.
 String getNextTask()
          Need to be override in sub class
protected  boolean isGoalAchieved()
          Need to be override in sub classes
 
Methods inherited from class org.activemath.sequencer.TutorialExerciseSequencer
exerciseSolved, getNextExerciseId
 
Methods inherited from class org.activemath.sequencer.ExerciseSequencer
addItemsAlreadySeen, addItemShown, getBookId, getExercisesSkipped, getExercisesSolved, getExerciseStrategy, getExericsesFailed, getFinishReason, getId, getItemsSeen, 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

numExercisesNeedToSolve

protected int numExercisesNeedToSolve
Constructor Detail

TutorialExerSeqTrainN

public TutorialExerSeqTrainN(AppSession appSession,
                             String learningGoal,
                             List<String> conceptIds,
                             String bookId,
                             ExerciseArgumentSetting exerciseUnit,
                             int numExercisesNeedToSolve)
Method Detail

getNextTask

public String getNextTask()
Description copied from class: TutorialExerciseSequencer
Need to be override in sub class

Specified by:
getNextTask in class TutorialExerciseSequencer
Returns:

isGoalAchieved

protected boolean isGoalAchieved()
Description copied from class: TutorialExerciseSequencer
Need to be override in sub classes

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

exerciseFinished

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

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

getNextExercise

public ExerciseArgumentSetting getNextExercise()
                                        throws NoAvailableExercisesException
Description copied from class: ExerciseSequencer
Prepare the next exercise. By override this method, make sure you check if goal is achieved by calling isGoalAchieved().

Specified by:
getNextExercise in class ExerciseSequencer
Returns:
Throws:
NoAvailableExercisesException - if we can't find one