org.telscenter.pas.steps
Class Assessment

java.lang.Object
  extended by java.beans.beancontext.BeanContextChildSupport
      extended by org.telscenter.pas.beans.PasStep
          extended by org.telscenter.pas.steps.Assessment
All Implemented Interfaces:
java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextChildComponentProxy, java.beans.beancontext.BeanContextServiceRevokedListener, java.beans.beancontext.BeanContextServicesListener, java.io.Serializable, java.util.EventListener, net.sf.sail.common.beansupport.ITitleAware, IAuthorNotation, IHelp, IWorkReporter
Direct Known Subclasses:
ChallengeQuestion, Note, SelfAssessment, StudentAssessment

public abstract class Assessment
extends PasStep
implements IWorkReporter

Author:
aperritano
See Also:
Serialized Form

Field Summary
protected  net.sf.sail.core.beans.service.AgentService agentService
           
 AssessmentItem assessmentItem
           
protected  java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> responseDeclarationToSocks
           
protected  java.util.Map<java.lang.String,java.lang.Object> responses
           
protected  net.sf.sail.core.beans.service.SessionService sessionService
           
 
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
Constructor Summary
Assessment()
           
 
Method Summary
protected  void bindResponsesToSocks()
          Binds response id to socks
protected  void consumeService(java.beans.beancontext.BeanContextServices bcs, java.lang.Class<? extends java.lang.Object> serviceClass)
           
protected  java.lang.String extractBody(java.lang.String prompt)
          Extracts the text in between the ...
 net.sf.sail.core.beans.service.AgentService getAgentService()
           
 AssessmentItem getAssessmentItem()
           
abstract  java.awt.Component getComponent()
           
 java.util.List<javax.swing.JLabel> getCurrentAnswers()
           
 java.util.List<java.lang.String> getCurrentPrompts()
           
 java.util.List<javax.swing.JPanel> getCurrentStepParts()
           
 java.util.Map<java.lang.String,java.lang.String> getEntityToPromptMap()
          Returns a mapping(s) for this step Note that steps like Note can have multiple Rims because if it were a multi-part note step.
static BlockInteraction getInteractionByResponseDeclaration(java.util.List<BlockInteraction> interactions, ResponseDeclaration rd)
           
 java.lang.Integer getPossibleScore()
           
 javax.swing.JPanel getReportForLearner()
          Not needed any more use the one with navigation action
 javax.swing.JPanel getReportForLearner(NavigateAction navigateAction)
          Assessment needs to navigate back to its step with an part of its component has been clicked on
 com.lowagie.text.pdf.PdfPCell getReportForLearnerPDF(net.sf.sail.core.beans.service.AnnotationService annotationService)
           
 javax.swing.JPanel getReportForLearnerWithAnnotations()
          Note used any more
 javax.swing.JPanel getReportForLearnerWithAnnotations(NavigateAction navigateAction)
          Assessment needs to navigate back to its step with an part of its component has been clicked on
 java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> getResponseDeclarationToSocks()
           
 java.util.Map<java.lang.String,java.lang.Object> getResponses()
           
 net.sf.sail.core.beans.service.SessionService getSessionService()
           
static java.lang.String getStudentAnswer(Assessment assessment, BlockInteraction interaction)
          Given choiceInteraction, returns student's last choice, if any
 boolean getTabbed()
           
abstract  java.lang.String getType()
          Replaced by hoverString property
 void initStepParts()
           
 boolean isInjectPrompt()
           
 boolean isSubmitted()
           
static java.lang.String lastAnswer(java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> responseDeclarationToSocks, ResponseDeclaration rd)
           
static void saveAssessmentItem(AssessmentItem assessmentItem, java.util.Map<java.lang.String,java.lang.Object> responses, java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> responseDeclarationToSocks)
           
static void saveData(java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> responseDeclarationToSocks, ResponseDeclaration rd, net.sf.sail.core.entity.ISock<java.lang.String> sock, java.lang.String data)
           
 void setAssessmentItem(AssessmentItem assessmentItem)
           
 void setInjectPrompt(boolean injectPrompt)
           
 void setPossibleScore(java.lang.Integer possibleScore)
           
 void setSubmitted(boolean hasSubmitted)
           
 void setTabbed(boolean isTabbed)
           
 
Methods inherited from class org.telscenter.pas.beans.PasStep
addPropertyChangeListener, afterComponentAdded, beforeSessionStart, getAuthorNotes, getHelpId, getHintSet, getHoverString, getTitle, hasHints, initializeBeanContextResources, initializePasStep, removePropertyChangeListener, serviceAvailable, setAuthorNotes, setBeanContext, setHintSet, setHoverString, setTitle, stepEnter, stepExit, toString
 
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceRevoked, validatePendingSetBeanContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

assessmentItem

public AssessmentItem assessmentItem

responseDeclarationToSocks

protected transient java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> responseDeclarationToSocks

responses

protected transient java.util.Map<java.lang.String,java.lang.Object> responses

agentService

protected transient net.sf.sail.core.beans.service.AgentService agentService

sessionService

protected transient net.sf.sail.core.beans.service.SessionService sessionService
Constructor Detail

Assessment

public Assessment()
Method Detail

initStepParts

public void initStepParts()
Specified by:
initStepParts in interface IWorkReporter

consumeService

protected void consumeService(java.beans.beancontext.BeanContextServices bcs,
                              java.lang.Class<? extends java.lang.Object> serviceClass)
Overrides:
consumeService in class PasStep

bindResponsesToSocks

protected void bindResponsesToSocks()
Binds response id to socks


lastAnswer

public static java.lang.String lastAnswer(java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> responseDeclarationToSocks,
                                          ResponseDeclaration rd)
Parameters:
rd -
Returns:

saveAssessmentItem

public static void saveAssessmentItem(AssessmentItem assessmentItem,
                                      java.util.Map<java.lang.String,java.lang.Object> responses,
                                      java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> responseDeclarationToSocks)
Parameters:
assessmentItem - TODO
responses - TODO
responseDeclarationToSocks - TODO

saveData

public static void saveData(java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> responseDeclarationToSocks,
                            ResponseDeclaration rd,
                            net.sf.sail.core.entity.ISock<java.lang.String> sock,
                            java.lang.String data)

extractBody

protected java.lang.String extractBody(java.lang.String prompt)
Extracts the text in between the ...


getReportForLearner

public javax.swing.JPanel getReportForLearner(NavigateAction navigateAction)
Assessment needs to navigate back to its step with an part of its component has been clicked on

Specified by:
getReportForLearner in interface IWorkReporter
Parameters:
NavigateAction - - the ability to go to a step
Returns:

getReportForLearner

public javax.swing.JPanel getReportForLearner()
Not needed any more use the one with navigation action

Specified by:
getReportForLearner in interface IWorkReporter
Returns:

getReportForLearnerPDF

public com.lowagie.text.pdf.PdfPCell getReportForLearnerPDF(net.sf.sail.core.beans.service.AnnotationService annotationService)
Specified by:
getReportForLearnerPDF in interface IWorkReporter

getReportForLearnerWithAnnotations

public javax.swing.JPanel getReportForLearnerWithAnnotations(NavigateAction navigateAction)
Assessment needs to navigate back to its step with an part of its component has been clicked on

Specified by:
getReportForLearnerWithAnnotations in interface IWorkReporter
Parameters:
NavigateAction - - the ability to go to a step
Returns:

getReportForLearnerWithAnnotations

public javax.swing.JPanel getReportForLearnerWithAnnotations()
Note used any more

Specified by:
getReportForLearnerWithAnnotations in interface IWorkReporter

getAssessmentItem

public AssessmentItem getAssessmentItem()

setAssessmentItem

public void setAssessmentItem(AssessmentItem assessmentItem)

getComponent

public abstract java.awt.Component getComponent()
Specified by:
getComponent in interface java.beans.beancontext.BeanContextChildComponentProxy

getResponses

public java.util.Map<java.lang.String,java.lang.Object> getResponses()
Returns:
the responses

getStudentAnswer

public static java.lang.String getStudentAnswer(Assessment assessment,
                                                BlockInteraction interaction)
Given choiceInteraction, returns student's last choice, if any

Parameters:
interaction -
Returns:
String student's answer

getCurrentStepParts

public java.util.List<javax.swing.JPanel> getCurrentStepParts()
Specified by:
getCurrentStepParts in interface IWorkReporter

getCurrentPrompts

public java.util.List<java.lang.String> getCurrentPrompts()
Specified by:
getCurrentPrompts in interface IWorkReporter

getCurrentAnswers

public java.util.List<javax.swing.JLabel> getCurrentAnswers()
Specified by:
getCurrentAnswers in interface IWorkReporter

getInteractionByResponseDeclaration

public static BlockInteraction getInteractionByResponseDeclaration(java.util.List<BlockInteraction> interactions,
                                                                   ResponseDeclaration rd)

getType

public abstract java.lang.String getType()
Description copied from class: PasStep
Replaced by hoverString property

Overrides:
getType in class PasStep
Returns:

getResponseDeclarationToSocks

public java.util.Map<ResponseDeclaration,net.sf.sail.core.entity.ISock<java.lang.String>> getResponseDeclarationToSocks()
Returns:
the responseDeclarationToSocks

getEntityToPromptMap

public java.util.Map<java.lang.String,java.lang.String> getEntityToPromptMap()
Description copied from interface: IWorkReporter
Returns a mapping(s) for this step Note that steps like Note can have multiple Rims because if it were a multi-part note step.

Specified by:
getEntityToPromptMap in interface IWorkReporter
Returns:
Map rimname<->prompt mapping for this step.
See Also:
IWorkReporter.getEntityToPromptMap()

isInjectPrompt

public boolean isInjectPrompt()
Returns:
the injectPrompt

setInjectPrompt

public void setInjectPrompt(boolean injectPrompt)
Parameters:
injectPrompt - the injectPrompt to set

getPossibleScore

public java.lang.Integer getPossibleScore()
Specified by:
getPossibleScore in interface IWorkReporter

setPossibleScore

public void setPossibleScore(java.lang.Integer possibleScore)
Specified by:
setPossibleScore in interface IWorkReporter

getTabbed

public boolean getTabbed()

setTabbed

public void setTabbed(boolean isTabbed)

getAgentService

public net.sf.sail.core.beans.service.AgentService getAgentService()

getSessionService

public net.sf.sail.core.beans.service.SessionService getSessionService()

isSubmitted

public boolean isSubmitted()

setSubmitted

public void setSubmitted(boolean hasSubmitted)


Copyright © 2004-2008 TELS Center. All Rights Reserved.