org.qtitools.qti.node.item.interaction
Class EndAttemptInteraction

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.content.BodyElement
              extended by org.qtitools.qti.node.item.interaction.Interaction
                  extended by org.qtitools.qti.node.item.interaction.InlineInteraction
                      extended by org.qtitools.qti.node.item.interaction.EndAttemptInteraction
All Implemented Interfaces:
java.io.Serializable, Flow, Inline, ObjectFlow, XmlNode, XmlObject, Validatable

public class EndAttemptInteraction
extends InlineInteraction

The end attempt interaction is A special type of interaction which allows item authors to provide the candidate with control over the way in which the candidate terminates an attempt. The candidate can use the interaction to terminate the attempt (triggering response processing) immediately, typically to request A hint. It must be bound to A response variable with base-type boolean and single cardinality. If the candidate invokes response processing using an endAttemptInteraction then the associated response variable is set to true. If response processing is invoked in any other way, either through A different endAttemptInteraction or through the default method for the delivery engine, then the associated response variable is set to false. The default value of the response variable is always ignored. Attribute : title [1]: string The string that should be displayed to the candidate as A prompt for ending the attempt using this interaction. This should be short, preferably one word. A typical value would be "Hint". For example, in A graphical environment it would be presented as the label on A button that, when pressed, ends the attempt.

Author:
Jonathon Hare
See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_TITLE_NAME
          Name of title attribute in xml schema.
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
 
Fields inherited from class org.qtitools.qti.node.item.interaction.Interaction
ATTR_RESPONSE_IDENTIFIER_NAME, CLASS_TAG_SUFFIX, DISPLAY_NAME
 
Fields inherited from class org.qtitools.qti.node.content.BodyElement
ATTR_CLASS_NAME, ATTR_ID_NAME, ATTR_LABEL_NAME, ATTR_LANG_NAME
 
Fields inherited from interface org.qtitools.qti.node.content.basic.Inline
DISPLAY_NAME
 
Fields inherited from interface org.qtitools.qti.node.content.basic.Flow
DISPLAY_NAME
 
Constructor Summary
EndAttemptInteraction(XmlObject parent)
          Construct new interaction.
 
Method Summary
 void beforeProcessResponse()
          Perform any required processing for the interaction immediately before processResponse is called.
 java.util.List<? extends XmlNode> getChildren()
          Get A list of the content child nodes of this element
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 java.lang.String getTitle()
          Gets value of title attribute.
protected  Value processResponse(java.util.List<java.lang.String> responseList, ResponseDeclaration responseDeclaration)
           
 void setTitle(java.lang.String title)
          Sets new value of title attribute.
 ValidationResult validate()
          Validates this object.
 
Methods inherited from class org.qtitools.qti.node.item.interaction.Interaction
getResponseDeclaration, getResponseIdentifier, getShuffledOrder, initialize, processResponse, processResponse, setResponseIdentifier, validateResponse
 
Methods inherited from class org.qtitools.qti.node.content.BodyElement
appendChild, evaluate, getClassAttr, getFirstChild, getId, getLabel, getLang, getLastChild, insertBefore, removeChild, replaceChild, search, search, search, setId, setLabel, setLang
 
Methods inherited from class org.qtitools.qti.node.AbstractObject
getParent, getParentItem, getParentResult, getParentTest, setParent
 
Methods inherited from class org.qtitools.qti.node.AbstractNode
attrToXmlString, bodyToXmlString, getAttributes, getFullName, getIndent, getNode, getNode, getNode, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString, validateAttributes, validateChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_TAG

public static java.lang.String CLASS_TAG
Name of this class in xml schema.


ATTR_TITLE_NAME

public static final java.lang.String ATTR_TITLE_NAME
Name of title attribute in xml schema.

See Also:
Constant Field Values
Constructor Detail

EndAttemptInteraction

public EndAttemptInteraction(XmlObject parent)
Construct new interaction.

Parameters:
parent - Parent node
Method Detail

setTitle

public void setTitle(java.lang.String title)
Sets new value of title attribute.

Parameters:
title - new value of title attribute
See Also:
getTitle()

getTitle

public java.lang.String getTitle()
Gets value of title attribute.

Returns:
value of title attribute
See Also:
setTitle(java.lang.String)

getClassTag

public java.lang.String getClassTag()
Description copied from interface: XmlNode
Gets QTI class name of this node.

QTI class name has very important role during loading/saving nodes.

For example: Java class name is AssessmentTest; QTI class name is assessmentTest.

Specified by:
getClassTag in interface XmlNode
Specified by:
getClassTag in class AbstractNode
Returns:
QTI class name of this node

beforeProcessResponse

public void beforeProcessResponse()
Description copied from class: Interaction
Perform any required processing for the interaction immediately before processResponse is called. Most interactions wont need to do anything here - it is basically useful for interactions that need to set or reset A particular value (like EndAttemptInteraction).

Overrides:
beforeProcessResponse in class Interaction

processResponse

protected Value processResponse(java.util.List<java.lang.String> responseList,
                                ResponseDeclaration responseDeclaration)
Overrides:
processResponse in class Interaction

validate

public ValidationResult validate()
Description copied from interface: Validatable
Validates this object.

Specified by:
validate in interface Validatable
Overrides:
validate in class Interaction
Returns:
validation result

getChildren

public java.util.List<? extends XmlNode> getChildren()
Description copied from class: BodyElement
Get A list of the content child nodes of this element

Specified by:
getChildren in class BodyElement
Returns:
List of child nodes


Copyright © 2009. All Rights Reserved.