org.activemath.webapp.exercises
Class ExerciseController
java.lang.Object
org.infohazard.maverick.ctl.Throwaway2
org.infohazard.maverick.ctl.ThrowawayBean2
org.activemath.webapp.base.ControllerBase
org.activemath.webapp.exercises.ExerciseController
- All Implemented Interfaces:
- Controller
- Direct Known Subclasses:
- CasConsoleController, DRConsoleController, ExerciseSequencerExtensionController
public class ExerciseController
- extends ControllerBase
Generate a bean for an exercise. Request parameters:
- exerciseId - identifier of the exercise.
- fmt - output format.
| Methods inherited from class org.activemath.webapp.base.ControllerBase |
addError, addError, enableNoCache, escapeForHtmlSafety, getAccountManager, getAppSession, getCmdName, getCurrentUser, getErrors, getHttpSession, getLanguage, getModel, getOutputFormat, getRequest, getResponse, getSkin, hasErrors, perform, publishControllerEvent, sendError, sendError, sendJson, sendLoginRequired, sendRedirect, sendRedirect, setPasswd, setUser |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static Logger log
- The logger for this class
EXERCISE_CONTAINER
public static final String EXERCISE_CONTAINER
- key for exercise container attached to user
- See Also:
- Constant Field Values
_userInputHistory
protected Vector<InteractionManager.UserInputHistoryEntry> _userInputHistory
_teacherAssistant
protected InteractionManager _teacherAssistant
exerciseSheetItems
protected Vector<ExerciseController.ExerciseSheetItem> exerciseSheetItems
type
protected String type
- Bean properties / Request parameters Each set function corresponds to a
request parameter of the same name. When action() is called, properties
are already filled in.
exerciseId
protected String exerciseId
bookId
protected String bookId
userInput
protected String userInput
userInputPartition
protected String userInputPartition
userInputPosition
protected int userInputPosition
config
protected Configuration config
defaultInputSyntax
protected String defaultInputSyntax
userRequests
protected String[] userRequests
userInputSyntax
protected String userInputSyntax
userInputDelay
protected int userInputDelay
displayUserInputSyntaxOptions
protected boolean displayUserInputSyntaxOptions
displayOutputFormatOptions
protected boolean displayOutputFormatOptions
showFinishButton
protected boolean showFinishButton
speechContent
protected String speechContent
strategy
protected String strategy
presentationStrategy
protected String presentationStrategy
vmFileName
protected String vmFileName
isAssessment
protected boolean isAssessment
confidence
protected String confidence
confidenceEnabled
protected boolean confidenceEnabled
logExerciseResult
protected boolean logExerciseResult
ExerciseController
public ExerciseController()
setConfidence
public void setConfidence(String confidence)
setType
public void setType(String type)
setBook
public void setBook(String bookId)
- This variant is here to match the parameter name used by the
ViewBook controller.
- Parameters:
bookId - book identifier @see org.activemath.contoller.ViewBook#setBook(String)
setBookId
public void setBookId(String bookId)
getBookId
protected String getBookId()
setExerciseId
public void setExerciseId(String exerciseId)
setStrategy
public void setStrategy(String strategy)
setPresentationStrategy
public void setPresentationStrategy(String presentationStrategy)
getPresentationStrategy
public String getPresentationStrategy()
setVmFileName
public void setVmFileName(String vmFileName)
getVmFileName
public String getVmFileName()
setUserInput
public void setUserInput(String userInput)
setUserInputPosition
public void setUserInputPosition(int userInputPosition)
setUserInputDelay
public void setUserInputDelay(int value)
setUserInputSyntax
public void setUserInputSyntax(String userInputSyntax)
setUserInputPartition
public void setUserInputPartition(String userInputPartition)
setAssessment
public void setAssessment(String value)
action
protected String action()
throws Exception
- Implements the controller's action
- Overrides:
action in class ControllerBase
- Throws:
Exception- See Also:
ControllerBase.action()
initExercise
protected org.activemath.webapp.exercises.ExerciseStateContainer initExercise(User user,
AppModel model)
throws IOException
- Throws:
IOException
setInteractionManager
protected void setInteractionManager(InteractionManager manager)
setUserInputHistory
protected void setUserInputHistory(Vector<InteractionManager.UserInputHistoryEntry> history)
destroyExercise
protected void destroyExercise(User user)
checkRedirect
protected static void checkRedirect(User user,
String exerciseId,
AppModel model,
InteractionManager exerciseInteractionManager)
- Check whether there is a pending redirect, and if so enable it.
- Parameters:
user - user object, for access to user model.exerciseId - identifier of the current exercise.model - controller model.exerciseInteractionManager - interaction manager running the exercise. This will be removed
once the score computation gets moved to the user model, or
some other component.