|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.beans.beancontext.BeanContextChildSupport
org.telscenter.pas.beans.PasStep
org.telscenter.pas.steps.Assessment
org.telscenter.pas.steps.ChallengeQuestion
public class ChallengeQuestion
Implement of the Pas step type, ChallengeQuestion.
| Field Summary | |
|---|---|
static java.lang.String[] |
indexes
|
| Fields inherited from class org.telscenter.pas.steps.Assessment |
|---|
agentService, assessmentItem, responseDeclarationToSocks, responses, sessionService |
| Fields inherited from class java.beans.beancontext.BeanContextChildSupport |
|---|
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport |
| Constructor Summary | |
|---|---|
ChallengeQuestion()
|
|
| Method Summary | |
|---|---|
java.lang.String |
correctAnswer()
TODO: refactor into utils along w/ lastAnswer retrieves correct answer based on the inline feedback |
protected java.lang.String |
extractBody(java.lang.String prompt)
Extracts the text in between the ... |
protected java.lang.String |
getAnswer(ResponseDeclaration rd,
BlockInteraction bi)
|
java.lang.String[] |
getAttemptIndexes()
|
java.lang.String |
getChoiceOrdering()
|
java.awt.Component |
getComponent()
The entry method to CQ. |
protected java.lang.String |
getCorrectAnswerReport(int sNumAttempts,
java.util.List<java.lang.Integer> scores,
java.lang.String[] indexes)
provides scorereport to be shown for correct answer by stating how many attempts (tries) have been made and how many points have been earned |
java.lang.String |
getCorrectFeedbackInline()
returns the inline feedback if the chosen answer is the correct one |
ChallengeQuestionUI |
getCqUI()
|
java.util.Map<java.lang.String,java.lang.String> |
getEntityToPromptMap()
Returns a Note can have multiple
Rims because if it were a multi-part note step. |
protected java.lang.String |
getFeedbackContentFromChoices(java.util.List<SimpleChoice<java.lang.String>> choices)
returns the inline feedback from the choices, choosing the one for the correct answer if the number of points for this attempt is greater than 0, the feedback would include saying that "you answered on the nth try for x points" where n is the number of attempts the user has made, and x is the number of points allotted for that attempt on a particular question, otherwise the part about the points is not included. |
PasStep |
getGotoStep()
|
int |
getGotoStepIndex()
|
protected BlockInteraction |
getInteractionByResponseDeclaration(ResponseDeclaration rd)
|
net.sf.sail.core.entity.ISock<java.lang.String> |
getLastAnswerSock()
|
java.lang.String |
getLastFeedbackInline(Assessment assessment)
returns the inline feedback for the last answer chosen |
net.sf.sail.core.entity.ISockEntry<java.lang.String> |
getLastGotoStepVisitedSockEntry()
Checks if gotoStep has ever been visited |
int |
getMaxAttempts()
|
INavigationService |
getNavigationService()
|
PasProject |
getPasProject()
|
com.lowagie.text.pdf.PdfPCell |
getReportForLearnerPDF(boolean withAnnotations)
Returns a PDF-version of the report |
java.lang.String |
getScoreReport()
|
java.util.List<java.lang.Integer> |
getScores()
|
java.lang.String |
getScoringMode()
|
java.util.List<javax.swing.JPanel> |
getStepParts()
|
java.lang.String |
getType()
Replaced by hoverString property |
boolean |
isGotoStepEverVisited()
Checks if gotoStep has ever been visited |
boolean |
isGotoStepVisitedSinceLastWrongAnswer()
Checks if gotoStep has been visited between the last time this step was visited and now This must only be called if the last answer was wrong |
boolean |
isStudentAnswerCorrect(net.sf.sail.core.entity.ISock<java.lang.String> studentAnswerSock)
Checks if student's answer in the provided sock is correct |
java.lang.String |
lastAnswer()
retrieves last answer based on the data from student sock |
int |
numStudentAttempts()
|
void |
setChoiceOrdering(java.lang.String choiceOrdering)
|
void |
setCqUI(ChallengeQuestionUI cqUI)
|
void |
setGotoStep(PasStep gotoStep)
|
void |
setGotoStepIndex(int gotoStepIndex)
|
void |
setMaxAttempts(int maxAttempts)
|
void |
setNavigationService(INavigationService navigationService)
|
void |
setPasProject(PasProject pasProject)
|
void |
setScores(java.util.List<java.lang.Integer> scores)
|
void |
setScoringMode(java.lang.String scoringMode)
|
| 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 |
|---|
public static final java.lang.String[] indexes
| Constructor Detail |
|---|
public ChallengeQuestion()
| Method Detail |
|---|
public java.lang.String getType()
PasStep
getType in class Assessmentpublic java.awt.Component getComponent()
getComponent in interface java.beans.beancontext.BeanContextChildComponentProxygetComponent in class Assessmentpublic com.lowagie.text.pdf.PdfPCell getReportForLearnerPDF(boolean withAnnotations)
org.telscenter.pas.steps.ChallengeQuestion#getReportForLearnerPDF()public boolean isGotoStepEverVisited()
public net.sf.sail.core.entity.ISockEntry<java.lang.String> getLastGotoStepVisitedSockEntry()
public boolean isGotoStepVisitedSinceLastWrongAnswer()
public int numStudentAttempts()
protected java.lang.String getAnswer(ResponseDeclaration rd,
BlockInteraction bi)
rd - bi -
public java.lang.String correctAnswer()
public java.lang.String lastAnswer()
public net.sf.sail.core.entity.ISock<java.lang.String> getLastAnswerSock()
rd -
public boolean isStudentAnswerCorrect(net.sf.sail.core.entity.ISock<java.lang.String> studentAnswerSock)
studentAnswerSock - the Sock containing the student's answer
protected BlockInteraction getInteractionByResponseDeclaration(ResponseDeclaration rd)
rd -
public java.util.List<javax.swing.JPanel> getStepParts()
public java.lang.String getScoringMode()
public void setScoringMode(java.lang.String scoringMode)
scoringMode - how the scoring is done - quantitative, qualitative, or offpublic java.util.List<java.lang.Integer> getScores()
public void setScores(java.util.List<java.lang.Integer> scores)
scores - the scores to setpublic int getGotoStepIndex()
public void setGotoStepIndex(int gotoStepIndex)
gotoStepIndex - the gotoStepIndex to setpublic PasStep getGotoStep()
public void setGotoStep(PasStep gotoStep)
gotoStep - the step to go to when reviewing evidencepublic java.lang.String getScoreReport()
protected java.lang.String getCorrectAnswerReport(int sNumAttempts,
java.util.List<java.lang.Integer> scores,
java.lang.String[] indexes)
sNumAttempts - scores - initHtml -
public java.lang.String[] getAttemptIndexes()
public int getMaxAttempts()
public void setMaxAttempts(int maxAttempts)
maxAttempts - the maxAttempts to setpublic ChallengeQuestionUI getCqUI()
public void setCqUI(ChallengeQuestionUI cqUI)
cqUI - the cqUI to setpublic void setNavigationService(INavigationService navigationService)
navigationService - navigation service for being able to retrieve, visit, and
update steps in the navigation task panelpublic INavigationService getNavigationService()
public PasProject getPasProject()
public void setPasProject(PasProject pasProject)
pasProject - the pasProject to setpublic void setChoiceOrdering(java.lang.String choiceOrdering)
choiceOrdering - -
sets the variable for whether to reorder choices or notpublic java.lang.String getChoiceOrdering()
public java.lang.String getCorrectFeedbackInline()
protected java.lang.String getFeedbackContentFromChoices(java.util.List<SimpleChoice<java.lang.String>> choices)
public java.lang.String getLastFeedbackInline(Assessment assessment)
protected java.lang.String extractBody(java.lang.String prompt)
extractBody in class Assessmentpublic java.util.Map<java.lang.String,java.lang.String> getEntityToPromptMap()
IWorkReporterNote can have multiple
Rims because if it were a multi-part note step.
getEntityToPromptMap in interface IWorkReportergetEntityToPromptMap in class AssessmentMap rimname<->prompt mapping for this step.IWorkReporter.getEntityToPromptMap()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||