org.activemath.tutor.control
Class TutorialControl

java.lang.Object
  extended by org.activemath.tutor.control.TutorialControl

public class TutorialControl
extends Object

Tutorial control singleton Handle tutorial tasks.


Field Summary
protected static Category log
           
 
Method Summary
 OJDocument achieveTask(String userId, String pedaObj, List contentIds)
          Return a course that helps the learner to achieve the given pedagogical objective on the content identifiers.
 OJDocument achieveTask(String userId, String pedaObj, List contentIds, List insertedItems)
          Return a course that helps the learner to achieve the given pedagogical objective on the content identifiers.
 OJDocument achieveTask(String userId, String pedaObj, List contentIds, List insertedItems, String sessionId, String clientName)
          Return a course that helps the learner to achieve the given pedagogical objective on the content identifiers.
 OJDocument achieveTask(String userId, String pedaObj, Vector contentIds, String sessionId, String clientName)
          Return a course that helps the learner to achieve the given pedagogical objective on the content identifiers.
 OJDocument achieveTask(String userId, Task task)
          Return a course that helps the learner to achieve the given pedagogical task.
 OJDocument achieveTask(String userId, Task task, List insertedItems, String sessionId, String clientName)
          Return a course that helps the learner to achieve the given pedagogical task.
 OJDocument achieveTask(String userId, Task task, Map initialWorldState, String sessionId, String clientName)
          Return a course that helps the learner to achieve the given pedagogical task.
static TutorialControl getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Category log
Method Detail

getInstance

public static TutorialControl getInstance()

achieveTask

public OJDocument achieveTask(String userId,
                              Task task)
Return a course that helps the learner to achieve the given pedagogical task.

Parameters:
userId - the user identifier
task - the pedagogical task to achieve
Returns:
the course as an OJDocument

achieveTask

public OJDocument achieveTask(String userId,
                              String pedaObj,
                              List contentIds)
Return a course that helps the learner to achieve the given pedagogical objective on the content identifiers.

Parameters:
userId - the user identifier
pedaObj - the pedagogical objective (e.g., discover)
contentIds - the identifiers of the goal learning objects
Returns:
the course as an OJDocument

achieveTask

public OJDocument achieveTask(String userId,
                              String pedaObj,
                              List contentIds,
                              List insertedItems)
Return a course that helps the learner to achieve the given pedagogical objective on the content identifiers. The insertedItems are treated as being already inserted in the course.

Parameters:
userId - the user identifier
pedaObj - the pedagogical objective (e.g., discover)
contentIds - the identifiers of the goal learning objects
insertedItems - a list of items to be marked as inserted in the world state
Returns:
the course as an OJDocument

achieveTask

public OJDocument achieveTask(String userId,
                              String pedaObj,
                              Vector contentIds,
                              String sessionId,
                              String clientName)
Return a course that helps the learner to achieve the given pedagogical objective on the content identifiers. The parameters sessionId and clientName are used for providing additional information when the TutorialInteractionEvent is published. They can be any string but for better logging purposes should consist of the session id and the classname of the calling class.

Parameters:
userId - the user identifier
pedaObj - the pedagogical objective (e.g., discover)
contentIds - the identifiers of the goal learning objects
sessionId - the identifier of the currents session
clientName - the classname of the component calling the tutorial component
Returns:
the course as an OJDocument

achieveTask

public OJDocument achieveTask(String userId,
                              String pedaObj,
                              List contentIds,
                              List insertedItems,
                              String sessionId,
                              String clientName)
Return a course that helps the learner to achieve the given pedagogical objective on the content identifiers. The insertedItems are treated as being already inserted in the course. The parameters sessionId and clientName are used for providing additional information when the TutorialInteractionEvent is published. They can be any string but for better logging purposes should consist of the session id and the classname of the calling class.

Parameters:
userId - the user identifier
pedaObj - the pedagogical objective (e.g., discover)
contentIds - the identifiers of the goal learning objects
insertedItems - a list of items to be marked as inserted in the world state
sessionId - the identifier of the currents session
clientName - the classname of the component calling the tutorial component
Returns:
the course as an OJDocument

achieveTask

public OJDocument achieveTask(String userId,
                              Task task,
                              List insertedItems,
                              String sessionId,
                              String clientName)
Return a course that helps the learner to achieve the given pedagogical task. The insertedItems are treated as being already inserted in the course. The parameters sessionId and clientName are used for providing additional information when the TutorialInteractionEvent is published. They can be any string but for better logging purposes should consist of the session id and the classname of the calling class.

Parameters:
userId - the user identifier
task - Task
insertedItems - a list of items to be marked as inserted in the world state
sessionId - the identifier of the currents session
clientName - the classname of the component calling the tutorial component
Returns:
the course as an OJDocument

achieveTask

public OJDocument achieveTask(String userId,
                              Task task,
                              Map initialWorldState,
                              String sessionId,
                              String clientName)
Return a course that helps the learner to achieve the given pedagogical task. The initialWorldState is inserted in the initial world state of the planner. The parameters sessionId and clientName are used for providing additional information when the TutorialInteractionEvent is published. They can be any string but for better logging purposes should consist of the session id and the classname of the calling class.

Parameters:
userId - the user identifier
task - Task
initialWorldState - the initial world state
sessionId - the identifier of the currents session
clientName - the classname of the component calling the tutorial component
Returns:
the course as an OJDocument