3.3. IMS Question and Test Interoperability (version 2.1)¶
The IMS Question and Test Interoperability specification version 2.1 has yet to be finalized and is currently only available as a “Public Draft Specification” from the IMS GLC website: http://www.imsglobal.org/question/index.html
Version 2.1 is an extension of the pre-existing version 2.0 which was finalized in 2005. For more information on the history of the specification see http://en.wikipedia.org/wiki/QTI
This module implements version 2.1 of the specification in anticipation of the finalization of the specification by the consortium.
- 3.3.1. Items
- 3.3.2. Tests
- 3.3.3. Content Model
- 3.3.4. Interactions
- 3.3.5. Item Variables
- 3.3.6. Response Processing
- 3.3.7. Template Processing
- 3.3.8. Pre-conditions and Branching
- 3.3.9. Expressions
- 3.3.10. Core Types and Utilities
- 3.3.11. Meta-data and Usage Data
The starting point for parsing and managing QTI content:
import pyslet.qtiv2.xml as qti
The structure of this module has changed in version Pyslet version 0.7. You should now include pyslet.qtiv2.xml to get access to QTIDocument as there are now no names exposed directly through the older pyslet.imsqtiv2p1.
Used to represent all documents representing information from the QTI v2 specification.
Simple recipe to get started:
import pyslet.qtiv2.xml as qti doc = qti.QTIDocument() with open('myqti.xml', 'rb') as f: doc.read(src=f) # do stuff with the QTI document here
The root (doc.root) element of a QTI document may one of a number of elements, if you are interested in items look for an instance of qti.items.AssessmentItem, etc.
add_to_content_package(cp, md, dname=None)¶
Copies this QTI document into a content package and returns the resource ID used.
An optional directory name can be specified in which to put the resource files.