org.qtitools.qti.node.test
Class TestPart

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.AbstractPart
                      extended by org.qtitools.qti.node.test.TestPart
All Implemented Interfaces:
java.io.Serializable, XmlNode, XmlObject, Validatable

public class TestPart
extends AbstractPart

Part of assessment test.

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

Field Summary
static java.lang.String ATTR_NAVIGATION_MODE_NAME
          Name of navigationMode attribute in xml schema.
static java.lang.String ATTR_SUBMISSION_MODE_NAME
          Name of submissionMode 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.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
TestPart(AssessmentTest parent)
          Constructs testPart.
 
Method Summary
 boolean areJumpsEnabled()
          Returns true if jumps (preConditions and branchRules) are enabled; false otherwise.
 java.util.List<AssessmentSection> getAssessmentSections()
          Gets assessmentSection children.
 java.util.List<AssessmentSection> getChildren()
          Gets abstractPart children.
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 ItemSessionControl getItemSessionControl()
          Gets itemSessionControl child if specified; defaultItemSessionControl otherwise.
 NavigationMode getNavigationMode()
          Gets value of navigationMode attribute.
 AssessmentTest getParent()
          Gets parent of this node or null (if node is root; for example AssessmentTest).
 SubmissionMode getSubmissionMode()
          Gets value of submissionMode attribute.
 java.util.List<TestFeedback> getTestFeedbacks()
          Gets testFeedback children.
 java.util.List<TestFeedback> getTestFeedbacks(TestFeedbackAccess requestedAccess)
          Gets all viewable testFeedbacks with given access.
 void setNavigationMode(NavigationMode navigationMode)
          Sets new value of navigationMode attribute.
 void setSubmissionMode(SubmissionMode submissionMode)
          Sets new value of submissionMode attribute.
 
Methods inherited from class org.qtitools.qti.node.test.AbstractPart
getBranchRules, getItemSessionControlNode, getParentTestPart, getPreConditions, isJumpSafeSource, isJumpSafeTarget, setItemSessionControlNode
 
Methods inherited from class org.qtitools.qti.node.test.ControlObject
getDuration, getFinishedCount, getGlobalIndex, getPresentedCount, getResponseTime, getTimeLimit, getTotalCount, getTotalTime, initialize, 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, 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, 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

ATTR_NAVIGATION_MODE_NAME

public static final java.lang.String ATTR_NAVIGATION_MODE_NAME
Name of navigationMode attribute in xml schema.

See Also:
Constant Field Values

ATTR_SUBMISSION_MODE_NAME

public static final java.lang.String ATTR_SUBMISSION_MODE_NAME
Name of submissionMode attribute in xml schema.

See Also:
Constant Field Values
Constructor Detail

TestPart

public TestPart(AssessmentTest parent)
Constructs testPart.

Parameters:
parent - parent of this testPart.
Method Detail

getParent

public AssessmentTest getParent()
Description copied from interface: XmlNode
Gets parent of this node or null (if node is root; for example AssessmentTest).

While testing some nodes (for example expressions) don't have properly set parent, but it is usable only for testing. (Some nodes cannot exists without parent even for testing).

Specified by:
getParent in interface XmlNode
Specified by:
getParent in interface XmlObject
Overrides:
getParent in class ControlObject
Returns:
parent of this node or null (if node is root; for example AssessmentTest)

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<AssessmentSection> getChildren()
Description copied from class: ControlObject
Gets abstractPart children.

Specified by:
getChildren in class ControlObject
Returns:
abstractPart children

getNavigationMode

public NavigationMode getNavigationMode()
Gets value of navigationMode attribute.

Returns:
value of navigationMode attribute
See Also:
setNavigationMode(org.qtitools.qti.node.test.NavigationMode)

setNavigationMode

public void setNavigationMode(NavigationMode navigationMode)
Sets new value of navigationMode attribute.

Parameters:
navigationMode - new value of navigationMode attribute
See Also:
getNavigationMode()

getSubmissionMode

public SubmissionMode getSubmissionMode()
Gets value of submissionMode attribute.

Returns:
value of submissionMode attribute
See Also:
setSubmissionMode(org.qtitools.qti.node.test.SubmissionMode)

setSubmissionMode

public void setSubmissionMode(SubmissionMode submissionMode)
Sets new value of submissionMode attribute.

Parameters:
submissionMode - new value of submissionMode attribute
See Also:
getSubmissionMode()

getItemSessionControl

public ItemSessionControl getItemSessionControl()
Gets itemSessionControl child if specified; defaultItemSessionControl otherwise.

Specified by:
getItemSessionControl in class AbstractPart
Returns:
itemSessionControl child if specified; defaultItemSessionControl otherwise

getAssessmentSections

public java.util.List<AssessmentSection> getAssessmentSections()
Gets assessmentSection children.

Returns:
assessmentSection children

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

areJumpsEnabled

public boolean areJumpsEnabled()
Returns true if jumps (preConditions and branchRules) are enabled; false otherwise. Jumps (preConditions and branchRules) are enabled only in linear individual mode. This is only convenient method for testing linear individual mode.

Returns:
true if jumps (preCondition and branchRule) are enabled; false otherwise


Copyright © 2009. All Rights Reserved.