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.

The starting point for parsing and managing QTI content:

import pyslet.qtiv2.xml as qti

Warning

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.

class pyslet.qtiv2.xml.QTIDocument(**args)

Bases: pyslet.xml.namespace.NSDocument

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.

AddToContentPackage(*args, **kwargs)

Deprecated equivalent to add_to_content_package()