3.2.2. Common Classes¶
This module contains the common data elements defined in section 3.6 of the binding document. The doc string of each element defined by IMS is introduced with a quote from that document to provide context. For more information see: http://www.imsglobal.org/question/qtiv1p2/imsqti_asi_bindv1p2.html
3.2.2.1. Content Model¶
Perhaps the biggest change between version 1 and version 2 of the specification was the content model. There were attempts to improve the original model through the introduction of the flow concept in version 1.2 but it wasn’t until the externally defined HTML content model was formally adopted in version 2 that some degree of predictability in rendering became possible.
-
class
pyslet.qtiv1.common.
ContentMixin
¶ Bases:
object
Mixin class for handling all content-containing elements.
This class is used by all elements that behave as content, the default implementation provides an additional contentChildren member that should be used to collect any content-like children.
-
contentChildren
= None¶ the list of content children
-
content_child
(child_class)¶ Returns True if child_class is an allowed subclass of ContentMixin in this context.
-
add_child
(child_class, name=None)¶ Creates a new child of this element.
Overrides the underlying Element class to implement special handling for ContentMixin and its subclasses. By default we accept any type of content but derived classes override this behaviour by providing an implementation of content_child to limit the range of elements to match their own content models.
-
get_content_children
()¶ Returns an iterable of the content children.
-
is_inline
()¶ True if this element can be inlined, False if it is block level
The default implementation returns True if all
contentChildren
can be inlined.
-
inline_children
()¶ True if all of this element’s
contentChildren
can all be inlined.
-
extract_text
()¶ Returns a tuple of (<text string>, <lang>).
Sometimes it is desirable to have a plain text representation of a content object. For example, an element may permit arbitrary content but a synopsis is required to set a metadata value.
Our algorithm for determining the language of the text is to first check if the language has been specified for the context. If it has then that language is used. Otherwise the first language attribute encountered in the content is used as the language. If no language is found then None is returned as the second value.
-
migrate_content_to_v2
(parent, child_type, log, children=None)¶ Migrates this content element to QTIv2.
The resulting QTIv2 content is added to parent.
child_type indicates whether the context allows block, inline or a mixture of element content types (flow). It is set to one of the following HTML classes:
pyslet.html401.BlockMixin
,pyslet.html401.InlineMixin
orpyslet.html401.FlowMixin
.The default implementation adds each of children or, if children is None, each of the local
contentChildren
. The algorithm handles flow elements by creating <p> elements where the context permits. Nested flows are handled by the addition of <br/>.
-
-
class
pyslet.qtiv1.common.
Material
(parent)¶ Bases:
pyslet.qtiv1.common.ContentMixin
,pyslet.qtiv1.common.QTICommentContainer
This is the container for any content that is to be displayed by the question-engine. The supported content types are text (emphasized or not), images, audio, video, application and applet. The content can be internally referenced to avoid the need for duplicate copies. Alternative information can be defined - this is used if the primary content cannot be displayed:
<!ELEMENT material (qticomment? , (mattext | matemtext | matimage | mataudio | matvideo | matapplet | matapplication | matref | matbreak | mat_extension)+ , altmaterial*)> <!ATTLIST material label CDATA #IMPLIED xml:lang CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
AltMaterial
(parent)¶ Bases:
pyslet.qtiv1.common.ContentMixin
,pyslet.qtiv1.common.QTICommentContainer
This is the container for alternative content. This content is to be displayed if, for whatever reason, the primary content cannot be rendered. Alternative language implementations of the host <material> element are also supported using this structure:
<!ELEMENT altmaterial (qticomment? , (mattext | matemtext | matimage | mataudio | matvideo | matapplet | matapplication | matref | matbreak | mat_extension)+)> <!ATTLIST altmaterial xml:lang CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
MatThingMixin
¶ Bases:
pyslet.qtiv1.common.ContentMixin
An abstract class used to help identify the mat* elements.
-
class
pyslet.qtiv1.common.
PositionMixin
¶ Mixin to define the positional attributes
width CDATA #IMPLIED height CDATA #IMPLIED y0 CDATA #IMPLIED x0 CDATA #IMPLIED
-
class
pyslet.qtiv1.common.
MatText
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.PositionMixin
,pyslet.qtiv1.common.MatThingMixin
The <mattext> element contains any text that is to be displayed to the users
<!ELEMENT mattext (#PCDATA)> <!ATTLIST mattext texttype CDATA 'text/plain' label CDATA #IMPLIED charset CDATA 'ascii-us' uri CDATA #IMPLIED xml:space (preserve | default ) 'default' xml:lang CDATA #IMPLIED entityref ENTITY #IMPLIED width CDATA #IMPLIED height CDATA #IMPLIED y0 CDATA #IMPLIED x0 CDATA #IMPLIED >
-
inlineWrapper
= None¶ an inline html object used to wrap inline elements
-
-
class
pyslet.qtiv1.common.
MatEmText
(parent)¶ Bases:
pyslet.qtiv1.common.MatText
The <matemtext> element contains any emphasized text that is to be displayed to the users. The type of emphasis is dependent on the question-engine rendering the text:
<!ELEMENT matemtext (#PCDATA)> <!ATTLIST matemtext texttype CDATA 'text/plain' label CDATA #IMPLIED charset CDATA 'ascii-us' uri CDATA #IMPLIED xml:space (preserve | default ) 'default' xml:lang CDATA #IMPLIED entityref ENTITY #IMPLIED width CDATA #IMPLIED height CDATA #IMPLIED y0 CDATA #IMPLIED x0 CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
MatBreak
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.MatThingMixin
The element that is used to insert a break in the flow of the associated material. The nature of the ‘break’ is dependent on the display-rendering engine:
<!ELEMENT matbreak EMPTY>
-
extract_text
()¶ Returns a simple line break
-
-
class
pyslet.qtiv1.common.
MatImage
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.PositionMixin
,pyslet.qtiv1.common.MatThingMixin
The <matimage> element is used to contain image content that is to be displayed to the users:
<!ELEMENT matimage (#PCDATA)> <!ATTLIST matimage imagtype CDATA 'image/jpeg' label CDATA #IMPLIED height CDATA #IMPLIED uri CDATA #IMPLIED embedded CDATA 'base64' width CDATA #IMPLIED y0 CDATA #IMPLIED x0 CDATA #IMPLIED entityref ENTITY #IMPLIED >
-
extract_text
()¶ We cannot extract text from matimage so we return a simple string.
-
-
class
pyslet.qtiv1.common.
MatAudio
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.MatThingMixin
The <mataudio> element is used to contain audio content that is to be displayed to the users:
<!ELEMENT mataudio (#PCDATA)> <!ATTLIST mataudio audiotype CDATA 'audio/base' label CDATA #IMPLIED uri CDATA #IMPLIED embedded CDATA 'base64' entityref ENTITY #IMPLIED >
-
extract_text
()¶ We cannot extract text from mataudio so we return a simple string.
-
-
class
pyslet.qtiv1.common.
MatVideo
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.PositionMixin
,pyslet.qtiv1.common.MatThingMixin
The <matvideo> element is used to contain video content that is to be displayed to the users:
<!ELEMENT matvideo (#PCDATA)> <!ATTLIST matvideo videotype CDATA 'video/avi' label CDATA #IMPLIED uri CDATA #IMPLIED width CDATA #IMPLIED height CDATA #IMPLIED y0 CDATA #IMPLIED x0 CDATA #IMPLIED embedded CDATA 'base64' entityref ENTITY #IMPLIED >
-
extract_text
()¶ We cannot extract text from matvideo so we return a simple string.
-
-
class
pyslet.qtiv1.common.
MatApplet
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.PositionMixin
,pyslet.qtiv1.common.MatThingMixin
The <matapplet> element is used to contain applet content that is to be displayed to the users. Parameters that are to be passed to the applet being launched should be enclosed in a CDATA block within the content of the <matapplet> element:
<!ELEMENT matapplet (#PCDATA)> <!ATTLIST matapplet label CDATA #IMPLIED uri CDATA #IMPLIED y0 CDATA #IMPLIED height CDATA #IMPLIED width CDATA #IMPLIED x0 CDATA #IMPLIED embedded CDATA 'base64' entityref ENTITY #IMPLIED >
-
extract_text
()¶ We cannot extract text from matapplet so we return a simple string.
-
-
class
pyslet.qtiv1.common.
MatApplication
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.MatThingMixin
The <matapplication> element is used to contain application content that is to be displayed to the users. Parameters that are to be passed to the application being launched should be enclosed in a CDATA block within the content of the <matapplication> element:
<!ELEMENT matapplication (#PCDATA)> <!ATTLIST matapplication apptype CDATA #IMPLIED label CDATA #IMPLIED uri CDATA #IMPLIED embedded CDATA 'base64' entityref ENTITY #IMPLIED >
-
extract_text
()¶ We cannot extract text from matapplication so we return a simple string.
-
-
class
pyslet.qtiv1.common.
MatRef
(parent)¶ Bases:
pyslet.qtiv1.common.MatThingMixin
,pyslet.qtiv1.core.QTIElement
The <matref> element is used to contain a reference to the required material. This material will have had an identifier assigned to enable such a reference to be reconciled when the instance is parsed into the system. <matref> should only be used to reference a material component and not a <material> element (the element <material_ref> should be used for the latter):
<!ELEMENT matref EMPTY> <!ATTLIST matref linkrefid CDATA #REQUIRED >
-
class
pyslet.qtiv1.common.
MatExtension
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.MatThingMixin
The extension facility to enable proprietary types of material to be included with the corresponding data object:
<!ELEMENT mat_extension ANY>
-
class
pyslet.qtiv1.common.
FlowMixin
¶ Bases:
object
Mix-in class to identify all flow elements:
( flow | flow_mat | flow_label)
-
class
pyslet.qtiv1.common.
FlowMatContainer
(parent)¶ Bases:
pyslet.qtiv1.common.ContentMixin
,pyslet.qtiv1.common.QTICommentContainer
Abstract class used to represent objects that contain flow_mat:
<!ELEMENT XXXXXXXXXX (qticomment? , (material+ | flow_mat+))>
-
class
pyslet.qtiv1.common.
FlowMat
(parent)¶ Bases:
pyslet.qtiv1.common.FlowMatContainer
,pyslet.qtiv1.common.FlowMixin
This element allows the materials to be displayed to the users to be grouped together using flows. The manner in which these flows are handled is dependent upon the display-engine:
<!ELEMENT flow_mat (qticomment? , (flow_mat | material | material_ref)+)> <!ATTLIST flow_mat class CDATA 'Block' >
-
is_inline
()¶ flowmat is always treated as a block if flow_class is specified, otherwise it is treated as a block unless it is an only child.
-
migrate_content_to_v2
(parent, child_type, log)¶ flow typically maps to a div element.
A flow with a specified class always becomes a div.
-
-
class
pyslet.qtiv1.common.
PresentationMaterial
(parent)¶ Bases:
pyslet.qtiv1.common.FlowMatContainer
This is material that must be presented to set the context of the parent evaluation. This could be at the Section level to contain common question material that is relevant to all of the contained Sections/Items. All the contained material must be presented:
<!ELEMENT presentation_material (qticomment? , flow_mat+)>
Our interpretation is generous here, we also accept <material> by default from
FlowMatContainer
. This element is one of the newer definitions in QTI v1, after the introduction of <flow>. It excludes <material> because it was assumed there would no legacy content. Adoption of flow was poor and it was replaced with direct inclusion of the html model in version 2 (where content is either inline or block level and flow is a general term to describe both for contexts where either is allowed).
-
class
pyslet.qtiv1.common.
Reference
¶ Bases:
pyslet.qtiv1.common.ContentMixin
,pyslet.qtiv1.common.QTICommentContainer
The container for all of the materials that can be referenced by other structures e.g. feedback material, presentation material etc. The presentation of this material is under the control of the structure that is referencing the material. There is no implied relationship between any of the contained material components:
<!ELEMENT reference (qticomment? , (material | mattext | matemtext | matimage | mataudio | matvideo | matapplet | matapplication | matbreak | mat_extension)+)>
-
class
pyslet.qtiv1.common.
MaterialRef
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
The <material_ref> element is used to contain a reference to the required full material block. This material will have had an identifier assigned to enable such a reference to be reconciled when the instance is parsed into the system:
<!ELEMENT material_ref EMPTY> <!ATTLIST material_ref linkrefid CDATA #REQUIRED >
3.2.2.2. Metadata Model¶
-
class
pyslet.qtiv1.common.
MetadataContainerMixin
¶ Bases:
object
A mix-in class used to hold dictionaries of metadata.
There is a single dictionary maintained to hold all metadata values, each value is a list of tuples of the form (value string, defining element). Values are keyed on the field label or tag name with any leading qmd_ prefix removed.
-
class
pyslet.qtiv1.common.
QTIMetadata
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
The container for all of the vocabulary-based QTI-specific meta-data. This structure is available to each of the four core ASI data structures:
<!ELEMENT qtimetadata (vocabulary? , qtimetadatafield+)>
-
class
pyslet.qtiv1.common.
Vocabulary
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
The vocabulary to be applied to the associated meta-data fields. The vocabulary is defined either using an external file or it is included as a comma separated list:
<!ELEMENT vocabulary (#PCDATA)> <!ATTLIST vocabulary uri CDATA #IMPLIED entityref ENTITY #IMPLIED vocab_type CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
QTIMetadataField
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
The structure responsible for containing each of the QTI-specific meta-data fields:
<!ELEMENT qtimetadatafield (fieldlabel , fieldentry)> <!ATTLIST qtimetadatafield xml:lang CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
FieldLabel
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
Used to contain the name of the QTI-specific meta-data field:
<!ELEMENT fieldlabel (#PCDATA)>
-
class
pyslet.qtiv1.common.
FieldEntry
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
Used to contain the actual data entry of the QTI-specific meta-data field named using the associated ‘fieldlabel’ element:
<!ELEMENT fieldentry (#PCDATA)>
3.2.2.3. Objectives & Rubric¶
-
class
pyslet.qtiv1.common.
Objectives
(parent)¶ Bases:
pyslet.qtiv1.common.FlowMatContainer
The objectives element is used to store the information that describes the educational aims of the Item. These objectives can be defined for each of the different ‘view’ perspectives. This element should not be used to contain information specific to an Item because the question-engine may not make this information available to the Item during the actual test:
<!ELEMENT objectives (qticomment? , (material+ | flow_mat+))> <!ATTLIST objectives view (All | Administrator | AdminAuthority | Assessor | Author | Candidate | InvigilatorProctor | Psychometrician | Scorer | Tutor ) 'All' >
-
migrate_to_v2
(v2_item, log)¶ Adds rubric representing these objectives to the given item’s body
-
migrate_objectives_to_lrm
(lom, log)¶ Adds educational description from these objectives.
-
-
class
pyslet.qtiv1.common.
Rubric
(parent)¶ Bases:
pyslet.qtiv1.common.FlowMatContainer
The rubric element is used to contain contextual information that is important to the element e.g. it could contain standard data values that might or might not be useful for answering the question. Different sets of rubric can be defined for each of the possible ‘views’. The material contained within the rubric must be displayed to the participant:
<!ELEMENT rubric (qticomment? , (material+ | flow_mat+))> <!ATTLIST rubric view (All | Administrator | AdminAuthority | Assessor | Author | Candidate | InvigilatorProctor | Psychometrician | Scorer | Tutor ) 'All' >
3.2.2.4. Response Processing Model¶
-
class
pyslet.qtiv1.common.
DecVar
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
The <decvar> element permits the declaration of the scoring variables
<!ELEMENT decvar (#PCDATA)> <!ATTLIST decvar varname CDATA 'SCORE' :: vartype (Integer | String | Decimal | Scientific | Boolean | Enumerated | Set ) 'Integer' defaultval CDATA #IMPLIED minvalue CDATA #IMPLIED maxvalue CDATA #IMPLIED members CDATA #IMPLIED cutvalue CDATA #IMPLIED >
-
content_changed
()¶ The decvar element is supposed to be empty but QTI v1 content is all over the place.
-
-
class
pyslet.qtiv1.common.
InterpretVar
(parent)¶ Bases:
pyslet.qtiv1.common.ContentMixin
,pyslet.qtiv1.core.QTIElement
The <interpretvar> element is used to provide statistical interpretation information about the associated variables:
<!ELEMENT interpretvar (material | material_ref)> <!ATTLIST interpretvar view (All | Administrator | AdminAuthority | Assessor | Author | Candidate | InvigilatorProctor | Psychometrician | Scorer | Tutor ) 'All' varname CDATA 'SCORE' >
-
class
pyslet.qtiv1.common.
SetVar
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
The <setvar> element is responsible for changing the value of the scoring variable as a result of the associated response processing test:
<!ELEMENT setvar (#PCDATA)> <!ATTLIST setvar varname CDATA 'SCORE' action (Set | Add | Subtract | Multiply | Divide ) 'Set' >
-
class
pyslet.qtiv1.common.
DisplayFeedback
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
The <displayfeedback> element is responsible for assigning an associated feedback to the response processing if the ‘True’ state is created through the associated response processing condition test:
<!ELEMENT displayfeedback (#PCDATA)> <!ATTLIST displayfeedback feedbacktype (Response | Solution | Hint ) 'Response' linkrefid CDATA #REQUIRED >
-
class
pyslet.qtiv1.common.
ConditionVar
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
The conditional test that is to be applied to the user’s response. A wide range of separate and combinatorial test can be applied:
<!ELEMENT conditionvar (not | and | or | unanswered | other | varequal | varlt | varlte | vargt | vargte | varsubset | varinside | varsubstring | durequal | durlt | durlte | durgt | durgte | var_extension)+>
-
class
pyslet.qtiv1.common.
ExtendableExpressionMixin
¶ Abstract mixin class to indicate an expression, including var_extension
-
class
pyslet.qtiv1.common.
ExpressionMixin
¶ Bases:
pyslet.qtiv1.common.ExtendableExpressionMixin
Abstract mixin class to indicate an expression excluding var_extension
-
class
pyslet.qtiv1.common.
VarThing
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
Abstract class for var* elements
<!ATTLIST * respident CDATA #REQUIRED index CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
VarEqual
(parent)¶ Bases:
pyslet.qtiv1.common.VarThing
The <varequal> element is the test of equivalence. The data for the test is contained within the element’s PCDATA string and must be the same as one of the <response_label> values (this were assigned using the ident attribute):
<!ELEMENT varequal (#PCDATA)> <!ATTLIST varequal case (Yes | No ) 'No' respident CDATA #REQUIRED" index CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
VarInequality
(parent)¶ Bases:
pyslet.qtiv1.common.VarThing
Abstract class for varlt, varlte, vargt and vargte.
-
migrate_inequality_to_v2
()¶ Returns the class to use in qtiv2
-
-
class
pyslet.qtiv1.common.
VarLT
(parent)¶ Bases:
pyslet.qtiv1.common.VarInequality
The <varlt> element is the ‘less than’ test. The data for the test is contained within the element’s PCDATA string and is assumed to be numerical in nature:
<!ELEMENT varlt (#PCDATA)> <!ATTLIST varlt respident CDATA #REQUIRED" index CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
VarLTE
(parent)¶ Bases:
pyslet.qtiv1.common.VarInequality
The <varlte> element is the ‘less than or equal’ test. The data for the test is contained within the element’s PCDATA string and is assumed to be numerical in nature:
<!ELEMENT varlte (#PCDATA)> <!ATTLIST varlte respident CDATA #REQUIRED" index CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
VarGT
(parent)¶ Bases:
pyslet.qtiv1.common.VarInequality
The <vargt> element is the ‘greater than’ test. The data for the test is contained within the element’s PCDATA string and is assumed to be numerical in nature:
<!ELEMENT vargt (#PCDATA)> <!ATTLIST vargt respident CDATA #REQUIRED" index CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
VarGTE
(parent)¶ Bases:
pyslet.qtiv1.common.VarInequality
The <vargte> element is the ‘greater than or equal to’ test. The data for the test is contained within the element’s PCDATA string and is assumed to be numerical in nature:
<!ELEMENT vargte (#PCDATA)> <!ATTLIST vargte respident CDATA #REQUIRED" index CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
VarSubset
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <varsubset> element is the ‘member of a list/set’ test. The data for the test is contained within the element’s PCDATA string. The set is a comma separated list with no enclosing parentheses:
<!ELEMENT varsubset (#PCDATA)> <!ATTLIST varsubset respident CDATA #REQUIRED" setmatch (Exact | Partial ) 'Exact' index CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
VarSubString
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <varsubstring> element is used to determine if a given string is a substring of some other string:
<!ELEMENT varsubstring (#PCDATA)> <!ATTLIST varsubstring index CDATA #IMPLIED respident CDATA #REQUIRED" case (Yes | No ) 'No' >
-
class
pyslet.qtiv1.common.
VarInside
(parent)¶ Bases:
pyslet.qtiv1.common.VarThing
The <varinside> element is the ‘xy-co-ordinate inside an area’ test. The data for the test is contained within the element’s PCDATA string and is a set of co-ordinates that define the area:
<!ELEMENT varinside (#PCDATA)> <!ATTLIST varinside areatype (Ellipse | Rectangle | Bounded ) #REQUIRED respident CDATA #REQUIRED" index CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
DurEqual
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <durequal> element is the ‘duration equal to’ test i.e. a test on the time taken to make the response:
<!ELEMENT durequal (#PCDATA)> <!ATTLIST durequal index CDATA #IMPLIED respident CDATA #REQUIRED" >
-
class
pyslet.qtiv1.common.
DurLT
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <durlt> element is the ‘duration less than’ test i.e. a test on the time taken to make the response:
<!ELEMENT durlt (#PCDATA)> <!ATTLIST durlt index CDATA #IMPLIED respident CDATA #REQUIRED" >
-
class
pyslet.qtiv1.common.
DurLTE
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <durlte> element is the ‘duration less than or equal to’ test i.e. a test on the time taken to make the response:
<!ELEMENT durlte (#PCDATA)> <!ATTLIST durlte index CDATA #IMPLIED respident CDATA #REQUIRED" >
-
class
pyslet.qtiv1.common.
DurGT
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <durgt> element is the ‘duration greater than’ test i.e. a test on the time taken to make the response:
<!ELEMENT durgt (#PCDATA)> <!ATTLIST durgt index CDATA #IMPLIED respident CDATA #REQUIRED" >
-
class
pyslet.qtiv1.common.
DurGTE
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <durgte> element is the ‘duration greater than or equal to’ test i.e. a test on the time taken to make the response:
<!ELEMENT durgte (#PCDATA)> <!ATTLIST durgte index CDATA #IMPLIED respident CDATA #REQUIRED" >
-
class
pyslet.qtiv1.common.
Not
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <not> element inverts the logical test outcome that is required. In the case of the <varequal> element produces a ‘not equals’ test:
<!ELEMENT not (and | or | not | unanswered | other | varequal | varlt | varlte | vargt | vargte | varsubset | varinside | varsubstring | durequal | durlt | durlte | durgt | durgte)>
-
class
pyslet.qtiv1.common.
And
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <and> element is used to create the Boolean ‘AND’ operation between the two or more enclosed tests. The result ‘True’ is returned if all of the tests return a ‘True’ value:
<!ELEMENT and (not | and | or | unanswered | other | varequal | varlt | varlte | vargt | vargte | varsubset | varinside | varsubstring | durequal | durlt | durlte | durgt | durgte)+>
-
class
pyslet.qtiv1.common.
Or
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <or> element is used to create the Boolean ‘OR’ operation between the two or more enclosed tests. The result ‘True’ is returned if one or more of the tests return a ‘True’ value:
<!ELEMENT or (not | and | or | unanswered | other | varequal | varlt | varlte | vargt | vargte | varsubset | varinside | varsubstring | durequal | durlt | durlte | durgt | durgte)+>
-
class
pyslet.qtiv1.common.
Unanswered
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <unanswered> element is the condition to be applied if a response is not received for the Item i.e. it is unanswered:
<!ELEMENT unanswered (#PCDATA)> <!ATTLIST unanswered respident CDATA #REQUIRED" >
-
class
pyslet.qtiv1.common.
Other
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExpressionMixin
The <other> element is used to trigger the condition when all of the other tests have not returned a ‘True’ state:
<!ELEMENT other (#PCDATA)>
-
class
pyslet.qtiv1.common.
VarExtension
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
,pyslet.qtiv1.common.ExtendableExpressionMixin
This element contains proprietary extensions to be applied to condition tests. This enables vendors to create their own conditional tests to be used on the participant responses:
<!ELEMENT var_extension ANY>
3.2.2.5. Miscellaneous Classes¶
-
class
pyslet.qtiv1.common.
QTICommentContainer
(parent)¶ Bases:
pyslet.qtiv1.core.QTIElement
Basic element to represent all elements that can contain a comment as their first child:
<!ELEMENT XXXXXXXXXXXX (qticomment? , ....... )>
-
class
pyslet.qtiv1.common.
QTIComment
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
This element contains the comments that are relevant to the host element. The comment is contained as a string:
<!ELEMENT qticomment (#PCDATA)> <!ATTLIST qticomment xml:lang CDATA #IMPLIED >
-
class
pyslet.qtiv1.common.
Duration
(parent, name=None)¶ Bases:
pyslet.qtiv1.core.QTIElement
The duration permitted for the completion of a particular activity. The duration is defined as per the ISO8601 standard. The information is entered as a string:
<!ELEMENT duration (#PCDATA)>