org.qtitools.qti.node.test
Class AssessmentTest

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.UniqueObject
              extended by org.qtitools.qti.node.test.ControlObject
                  extended by org.qtitools.qti.node.test.AssessmentTest
All Implemented Interfaces:
java.io.Serializable, XmlNode, XmlObject, Validatable

public class AssessmentTest
extends ControlObject

A test is A group of assessmentItems with an associated set of rules that determine which of the items the candidate sees, in what order, and in what way the candidate interacts with them. The rules describe the valid paths through the test, when responses are submitted for response processing and when (if at all) feedback is to be given.

Author:
Jiri Kajaba, Jonathon Hare
See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_DEFAULT_NAME_SPACE_NAME
          Name of xmlns attribute in xml schema.
static java.lang.String ATTR_DEFAULT_NAME_SPACE_VALUE
          Value of xmlns attribute.
static java.lang.String ATTR_TITLE_NAME
          Name of title attribute in xml schema.
static java.lang.String ATTR_TOOL_NAME_DEFAULT_VALUE
          Default value of toolName attribute.
static java.lang.String ATTR_TOOL_NAME_NAME
          Name of toolName attribute in xml schema.
static java.lang.String ATTR_TOOL_VERSION_DEFAULT_VALUE
          Default value of toolVersion attribute.
static java.lang.String ATTR_TOOL_VERSION_NAME
          Name of toolVersion attribute in xml schema.
static java.lang.String ATTR_XSI_NAME_SPACE_NAME
          Name of xmlns:xsi attribute in xml schema.
static java.lang.String ATTR_XSI_NAME_SPACE_VALUE
          Value of xmlns:xsi attribute.
static java.lang.String ATTR_XSI_SCHEMA_LOCATION_NAME
          Name of xsi:schemaLocation attribute in xml schema.
static java.lang.String ATTR_XSI_SCHEMA_LOCATION_VALUE
          Value of xsi:schemaLocation attribute.
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
static java.lang.String XML
          Header of xml file.
 
Fields inherited from class org.qtitools.qti.node.test.ControlObject
finished, VARIABLE_DURATION_NAME
 
Fields inherited from class org.qtitools.qti.node.UniqueObject
ATTR_IDENTIFIER_NAME
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
AssessmentTest()
          Constructs assessmentTest.
AssessmentTest(java.lang.String identifier, java.lang.String title)
          Convenience constructor for assessmentTest.
 
Method Summary
 AssessmentResult getAssessmentResult()
          Returns current result of whole assessment (test and all its items).
 java.util.List<TestPart> getChildren()
          Gets abstractPart children.
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 OutcomeDeclaration getOutcomeDeclaration(java.lang.String identifier)
          Gets outcomeDeclaration with given identifier or null.
 java.util.List<OutcomeDeclaration> getOutcomeDeclarations()
          Gets outcomeDeclaration children.
 OutcomeProcessing getOutcomeProcessing()
          Gets outcomeProcessing child.
 Value getOutcomeValue(java.lang.String identifier)
          Gets value of outcomeDeclaration with given identifier or null.
 java.util.Map<java.lang.String,Value> getOutcomeValues()
          Returns an unmodifiable map of outcome identifiers to outcome values.
 java.util.List<TestFeedback> getTestFeedbacks()
          Gets testFeedback children.
 java.util.List<TestFeedback> getTestFeedbacks(TestFeedbackAccess requestedAccess)
          Gets all viewable testFeedbacks with given access.
 java.util.List<TestPart> getTestParts()
          Gets testPart children.
 TestResult getTestResult(AssessmentResult parent)
          Returns current result of this test (only test itself, no items).
 Timer getTimer()
          Gets current timer.
 java.lang.String getTitle()
          Gets value of title attribute.
 java.lang.String getToolName()
          Gets value of toolName attribute.
 java.lang.String getToolVersion()
          Gets value of toolVersion attribute.
 void initialize()
          Initialises this object and all its abstractPart children.
 void processOutcome()
          Evaluates outcome processing.
 void setOutcomeProcessing(OutcomeProcessing outcomeProcessing)
          Sets new outcomeProcessing child.
 void setTimer(Timer timer)
          Sets new timer.
 void setTitle(java.lang.String title)
          Sets new value of title attribute.
 void setToolName(java.lang.String toolName)
          Sets new value of toolName attribute.
 void setToolVersion(java.lang.String toolVersion)
          Sets new value of toolVersion attribute.
 java.lang.String toXmlString(int depth, boolean printDefaultAttributes)
          Prints this node and all its children into string.
 
Methods inherited from class org.qtitools.qti.node.test.ControlObject
getDuration, getFinishedCount, getGlobalIndex, getParent, getPresentedCount, getResponseTime, getTimeLimit, getTotalCount, getTotalTime, isBuiltInVariable, isChildOf, isFinished, isPresented, lookup, lookupItemRef, lookupItemRefs, lookupItemRefs, lookupValue, passMaximumTimeLimit, passMinimumTimeLimit, setFinished, setTimeLimit
 
Methods inherited from class org.qtitools.qti.node.UniqueObject
getIdentifier, getSimpleName, setIdentifier, validateAttributes
 
Methods inherited from class org.qtitools.qti.node.AbstractObject
getParentItem, getParentResult, getParentTest, setParent
 
Methods inherited from class org.qtitools.qti.node.AbstractNode
attrToXmlString, bodyToXmlString, getAttributes, getFullName, getIndent, getNode, getNode, getNode, getNodeGroups, getParentRoot, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, validate, validateChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.qtitools.qti.node.XmlNode
getAttributes, getFullName, getNodeGroups, getParentRoot, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString
 
Methods inherited from interface org.qtitools.qti.validation.Validatable
validate
 

Field Detail

CLASS_TAG

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

See Also:
Constant Field Values

XML

public static final java.lang.String XML
Header of xml file.

See Also:
Constant Field Values

ATTR_DEFAULT_NAME_SPACE_NAME

public static final java.lang.String ATTR_DEFAULT_NAME_SPACE_NAME
Name of xmlns attribute in xml schema.

See Also:
Constant Field Values

ATTR_DEFAULT_NAME_SPACE_VALUE

public static final java.lang.String ATTR_DEFAULT_NAME_SPACE_VALUE
Value of xmlns attribute.

See Also:
Constant Field Values

ATTR_XSI_NAME_SPACE_NAME

public static final java.lang.String ATTR_XSI_NAME_SPACE_NAME
Name of xmlns:xsi attribute in xml schema.

See Also:
Constant Field Values

ATTR_XSI_NAME_SPACE_VALUE

public static final java.lang.String ATTR_XSI_NAME_SPACE_VALUE
Value of xmlns:xsi attribute.

See Also:
Constant Field Values

ATTR_XSI_SCHEMA_LOCATION_NAME

public static final java.lang.String ATTR_XSI_SCHEMA_LOCATION_NAME
Name of xsi:schemaLocation attribute in xml schema.

See Also:
Constant Field Values

ATTR_XSI_SCHEMA_LOCATION_VALUE

public static final java.lang.String ATTR_XSI_SCHEMA_LOCATION_VALUE
Value of xsi:schemaLocation attribute.

See Also:
Constant Field Values

ATTR_TITLE_NAME

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

See Also:
Constant Field Values

ATTR_TOOL_NAME_NAME

public static final java.lang.String ATTR_TOOL_NAME_NAME
Name of toolName attribute in xml schema.

See Also:
Constant Field Values

ATTR_TOOL_NAME_DEFAULT_VALUE

public static final java.lang.String ATTR_TOOL_NAME_DEFAULT_VALUE
Default value of toolName attribute.


ATTR_TOOL_VERSION_NAME

public static final java.lang.String ATTR_TOOL_VERSION_NAME
Name of toolVersion attribute in xml schema.

See Also:
Constant Field Values

ATTR_TOOL_VERSION_DEFAULT_VALUE

public static final java.lang.String ATTR_TOOL_VERSION_DEFAULT_VALUE
Default value of toolVersion attribute.

Constructor Detail

AssessmentTest

public AssessmentTest()
Constructs assessmentTest.


AssessmentTest

public AssessmentTest(java.lang.String identifier,
                      java.lang.String title)
Convenience constructor for assessmentTest. Sets the JQTI toolName and toolVersion automatically

Parameters:
identifier - Value of identifier attribute
title - Value of title attribute
Method Detail

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

getChildren

public java.util.List<TestPart> getChildren()
Description copied from class: ControlObject
Gets abstractPart children.

Specified by:
getChildren in class ControlObject
Returns:
abstractPart children

getTitle

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

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

setTitle

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

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

getToolName

public java.lang.String getToolName()
Gets value of toolName attribute.

Returns:
value of toolName attribute
See Also:
setToolName(java.lang.String)

setToolName

public void setToolName(java.lang.String toolName)
Sets new value of toolName attribute.

Parameters:
toolName - new value of toolName attribute
See Also:
getToolName()

getToolVersion

public java.lang.String getToolVersion()
Gets value of toolVersion attribute.

Returns:
value of toolVersion attribute
See Also:
setToolVersion(java.lang.String)

setToolVersion

public void setToolVersion(java.lang.String toolVersion)
Sets new value of toolVersion attribute.

Parameters:
toolVersion - new value of toolVersion attribute
See Also:
getToolVersion()

getOutcomeDeclarations

public java.util.List<OutcomeDeclaration> getOutcomeDeclarations()
Gets outcomeDeclaration children.

Returns:
outcomeDeclaration children

getOutcomeDeclaration

public OutcomeDeclaration getOutcomeDeclaration(java.lang.String identifier)
Gets outcomeDeclaration with given identifier or null.

Parameters:
identifier - given identifier
Returns:
outcomeDeclaration with given identifier or null

getOutcomeValue

public Value getOutcomeValue(java.lang.String identifier)
Gets value of outcomeDeclaration with given identifier or null.

Parameters:
identifier - given identifier
Returns:
value of outcomeDeclaration with given identifier or null

getOutcomeValues

public java.util.Map<java.lang.String,Value> getOutcomeValues()
Returns an unmodifiable map of outcome identifiers to outcome values.

Returns:
Unmodifiable map of outcome values.

getTestParts

public java.util.List<TestPart> getTestParts()
Gets testPart children.

Returns:
testPart children

getOutcomeProcessing

public OutcomeProcessing getOutcomeProcessing()
Gets outcomeProcessing child.

Returns:
outcomeProcessing child
See Also:
setOutcomeProcessing(org.qtitools.qti.node.outcome.processing.OutcomeProcessing)

setOutcomeProcessing

public void setOutcomeProcessing(OutcomeProcessing outcomeProcessing)
Sets new outcomeProcessing child.

Parameters:
outcomeProcessing - new outcomeProcessing child
See Also:
getOutcomeProcessing()

processOutcome

public void processOutcome()
Evaluates outcome processing.
  1. Resets outcomes to default values.
  2. Evaluates outcome processing.


getTestFeedbacks

public java.util.List<TestFeedback> getTestFeedbacks()
Gets testFeedback children.

Returns:
testFeedback children

getTestFeedbacks

public java.util.List<TestFeedback> getTestFeedbacks(TestFeedbackAccess requestedAccess)
Gets all viewable testFeedbacks with given access. Tests if feedbacks can be displayed.

Parameters:
requestedAccess - given access
Returns:
all testFeedbacks with given access

getTimer

public Timer getTimer()
Gets current timer.

Returns:
current timer
See Also:
setTimer(org.qtitools.qti.node.test.Timer)

setTimer

public void setTimer(Timer timer)
Sets new timer.

Parameters:
timer - new timer
See Also:
getTimer()

toXmlString

public java.lang.String toXmlString(int depth,
                                    boolean printDefaultAttributes)
Description copied from interface: XmlNode
Prints this node and all its children into string.

Specified by:
toXmlString in interface XmlNode
Overrides:
toXmlString in class AbstractNode
Parameters:
depth - indent (0 = no indent)
printDefaultAttributes - whether print attribute's default values
Returns:
xml string of this node and all its children
See Also:
XmlNode.toXmlString()

initialize

public void initialize()
Description copied from class: ControlObject
Initialises this object and all its abstractPart children.

Overrides:
initialize in class ControlObject

getTestResult

public TestResult getTestResult(AssessmentResult parent)
Returns current result of this test (only test itself, no items).

Parameters:
parent - parent of created result
Returns:
current result of this test (only test itself, no items)

getAssessmentResult

public AssessmentResult getAssessmentResult()
Returns current result of whole assessment (test and all its items).

Returns:
current result of whole assessment (test and all its items)


Copyright © 2009. All Rights Reserved.