QTI v3 Best Practices and Implementation Guide

IMS Global QTI v3 Best Practices and Implementation Guide

IMS Candidate Final Public
Version 3.0
IMS Candidate Final Public
Date Issued: 20 July 2020
Status: This document is for review and adoption by the IMS membership.
This version: https://www.imsglobal.org/spec/qti/v3p0/impl/

IPR and Distribution Notice

Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the specification set forth in this document, and to provide supporting documentation.

IMS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on IMS's procedures with respect to rights in IMS specifications can be found at the IMS Intellectual Property Rights web page: http://www.imsglobal.org/ipr/imsipr_policyFinal.pdf.

The following participating organizations have made explicit license commitments to this specification:

Org name Date election made Necessary claims Type
HMH September 16, 2019 No RF RAND (Required & Optional Elements)

Use of this specification to develop products or services is governed by the license with IMS found on the IMS website: http://www.imsglobal.org/speclicense.html.

Permission is granted to all parties to use excerpts from this document as needed in producing requests for proposals.

The limited permissions granted above are perpetual and will not be revoked by IMS or its successors or assigns.

THIS SPECIFICATION IS BEING OFFERED WITHOUT ANY WARRANTY WHATSOEVER, AND IN PARTICULAR, ANY WARRANTY OF NONINFRINGEMENT IS EXPRESSLY DISCLAIMED. ANY USE OF THIS SPECIFICATION SHALL BE MADE ENTIRELY AT THE IMPLEMENTER'S OWN RISK, AND NEITHER THE CONSORTIUM, NOR ANY OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY IMPLEMENTER OR THIRD PARTY FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, DIRECTLY OR INDIRECTLY, ARISING FROM THE USE OF THIS SPECIFICATION.

Public contributions, comments and questions can be posted here: http://www.imsglobal.org/forums/ims-glc-public-forums-and-resources.

© 2020 IMS Global Learning Consortium, Inc. All Rights Reserved.

Trademark information: http://www.imsglobal.org/copyright.html

Abstract

This document is the Question & Test Interoperability® (QTI®) v3 Best Practices and Implementation Guide (BPIG). The BPIG consists of six sections describing the various structures and features of QTI and how to best implement them in your assessment products.

1. Introduction

The main purpose of the Question and Test Interoperability® (QTI®) specification is to define an information model and associated binding that can be used to represent and exchange assessment content. While the QTI specification is the primary method of interoperability, QTI 3 introduces a greater amount of delivery interoperability through new formatting and behavioral expectations for interactions.

This document contains examples of QTI 3. Many of the examples are illustrated by screenshots or rendered views of the items, which are designed to illustrate how a system might implement the specification. This is a guide to best practices for QTI 3 implementation, and examples are for illustrative purposes.

Each section of this document introduces a new aspect or feature of the specification, starting with the simplest constructions and continuing to more intricate examples.

1.1 Scope and Context

The IMS QTI work specifically relates to content providers (that is, question and test authors and publishers), developers of authoring and content management tools, assessment delivery systems and learning management systems. The data model for representing question-based content is suitable for targeting users in learning, education, and training across all age ranges and national contexts.

Common acronyms and terms with definitions related to assessment are included in the QTI Terms and Definitions document [QTI-TERM-30].

1.1.1 Relationship to IMS Global Standards

QTI 3 brings together QTI 2.x and Accessible Portable Item Protocol® (APIP®) [APIP-IMPL-10] accessibility and accommodation features into a single assessment specification.

QTI 3 uses an IMS Content Packaging [CP-12] specification profile to package and exchange assessment content. IMS AccessForAll™ [AFA-30] specifications are used to support accessibility functionality.

The QTI 3 project group has also produced an assessment metric profile in connection to the IMS Caliper Analytics® [CALIPER-11] specification.

The IMS Competencies and Academic Standards Exchange® (CASE®) [CASE-10] specification is used to exchange information about learning and education competencies. CASE can also transmit information about rubrics, criteria for performance tasks, which may or may not be aligned to competencies. An example of CASE being used with a QTI package is included in BPIG section 6.

In QTI, Learning Tool Interoperability® (LTI®) [LTI-13] can be used to launch a specific interactive experience for candidates. However, externally launched tools may be blocked during assessment sessions depending on the security protocols of the assessment. The recommended practice is to use LTI only when standardized QTI approaches have been exhausted.

1.1.3 Interoperability in QTI 3

The QTI 3 standard is intended to foster interoperability of assessment-based content packages. The QTI 3 standard is comprised of a collection of specification documents designed to ensure that the exchangeable package of assessment content adheres to a rigorous set of file structure expectations. QTI 3 introduces new assessment, section, and item specifications as well as a new QTI 3 Content Package profile (based on the 1.2 version of the IMS Content Package specification).

This revised item specification is enforced by a newer, more rigorous conformance process. User experience interoperability will enable content authors to produce questions and tests that render and behave consistently across systems implementing QTI 3. The resulting specification eases adoption by adding unambiguous content structural markup and accessibility information to QTI 3. The use of web-based markup (HTML5) describes assessment content and semantics, and CSS can describe how the content will be displayed to candidates, in terms of layout, colors, and animations. This helps eliminate rendering inconsistencies across platforms, and enable content authors to communicate specific formatting and rendering expectations for assessment delivery interfaces.

Delivery systems are expected to use the information supplied in the QTI 3 standardized exchange formats, but can elect to use proprietary or other delivery-focused formats during content rendering and data collection.

Within the content package exchange, there may be interoperability issues surrounding specific file formats (e.g., mime types) for some supporting media files or custom interaction code. The QTI 3 standard allows for the use of any media type at this time, so interoperability between vendors may require agreement on the provision of specific file formats. Likely areas where that would occur within the content are pre-recorded media files (audio or video-only, or audio with video) as part of an item stimulus or prompt, or as alternative or supplemental support content for specific support needs. The QTI 3 standard allows for the provision of multiple file formats, which could reduce run-time file-format incompatibility issues.

QTI 3 supports bi-directional text, Ruby Markup https://www.w3.org/International/articles/ruby/  , and vertical text (via CSS) to support internationalization.

Interoperability for QTI 3 is also supported by the use of an IMS governed conformance and certification process, which employs IMS provided online automated validation tools, and requires certified systems to demonstrate validation. The validation tools assist organizations by examining exchange files for structural consistency against the QTI 3 standard. (See the QTI 3 Conformance and Certification [QTI-CERT-30] documentation.)

1.1.4 Packaging

QTI uses the IMS Content Packaging specification for organizing, describing, and exchanging assessment content. Section 6 of this document provides examples of  IMS Content Packaging for metadata and variants.  

1.1.5 Future Scope

The IMS members contributing to the development of the QTI 3 specification regard this version 3 as a definitive set of features and functionality relating to Web and accessibility standards that should not require significant iterative updates or changes. Correction of errors is an expected part of any specification maintenance, but the QTI project group hopes version 3 meets market demands and will not require major additions or changes in scope.

1.2 Structure of this document

This Best Practices and Implementation Guide is organized to provide an introduction to implementing QTI, constructing a QTI 3 open standards-based solution, a description of the Item and Test models at the core of QTI content, how the content interacts with the Personal Needs and Preferences of students, and how packaging brings it all together. Example markup, screenshots of rendered QTI, and details about best practices in adopting the standard are provided in this best practices guide.

1.3 Conformance Statements

This document is an informative resource in the Document Set of the QTI 3.0 specification [QTI-INFO-30]. As such, it does not include any normative requirements. Occurrences in this document of terms such as MAY, MUST, MUST NOT, SHOULD or RECOMMENDED have no impact on the conformance criteria for implementors of this specification.

2. Structure of QTI 3 Assessment Content

The purpose of this section is to give a broad overview of the structure and conventions used when constructing a QTI 3 solution. The specifics of the various QTI 3 features are enumerated in the sections that follow.

The exchange of QTI 3 content can vary significantly in scope, ranging from the exchange of a package containing a single assessment item to multiple tests with various subsections, thousands of assessment items, and shared stimulus content.

QTI 3 Assessment content is exchanged in a content package, using the standardized structure of the assessment structures, including tests, sections, test-parts, shared-stimulus, and items, as well as any of the content resources (like images and media), metadata, usagedata and stylesheet references. See Section 6 for more information on content packaging for QTI 3.

Given the complexity of assessment content, the QTI 3 standard allows for fairly simple interactions and content, as well as more complex interactions and assessment structures. The needs of the assessment program generally dictate which of the many QTI 3 features are used in the exchanged content. Conformance and certification for QTI 3 features is discussed in separate documentation, QTI 3 Conformance and Certification [QTI-CERT-30].

An assessment program can optionally create content that includes additional, dormant content that is selectively presented to candidates based on their user profile. In these cases, there is a dependency between the authoring systems creating the additional content, registration systems that allow for candidates to indicate their assessment needs and preferences, and the delivery system which uses the candidate profiles to present the dormant assessment content to specific candidates.

Figure 1 Figure showing a person sitting at a computer taking a test.
Figure showing a person sitting at a computer taking a test, with a label that says DELIVERY. 
        Feeding into the delivery are two branches. The first branch is for Authoring Tools, where they export 
        Accessible QTI content. The second branch is for Rostering Tools, that provide PNP information about 
        the candidate. The content and the PNP information are used to personalize the candidate's user experience.

See AccessForAll 3.0 and the QTI 3 Profile Section 5: Personal Needs and Preferences for more information on personalizing the assessment experience for candidates.

An QTI 3 assessment delivery system presents assessment content to candidates using QTI 3 for presentation of content, instructions for data collection, response processing, and scoring. There are many different ways to configure a delivery system, and QTI 3 does not dictate the architecture of these systems. The purpose of QTI 3 is to provide standardized content exchange and some basic user experience delivery expectations.

QTI 3 content is exchanged in standardized files using XML structure, where candidate-facing content is represented using a combination of HTML and XML (for the interactions). The content files may also contain template information, feedback content, or additional dormant content for specific candidates based on their Personal Needs and Preferences (PNP). QTI 3 content may reference external "web content" files, such as images, video, or audio files, which can be packaged with the QTI 3 content files to create a QTI 3 content package.

The test structures may include further information about the structure of test, including the order of possible parts, sections, and items, or even adaptive testing information, as well as outcomes processing information. The test structure may also include instructions or information which is intended to be delivered to the candidate. All tests must contain at least one test part, and all parts must contain at least one section. Sections can contain further sections, which is referred to as "nested sections" in QTI. Adaptive testing includes staged adaptive by using preconditions and branch-rules or by using an external (IRT-based) adaptive algorithm (newly introduced in QTI 3). See Section 4 for more information on the Test structure. See Section 4.3 and 4.4 for more specifics around test parts and sections.

Assessment items contain the bulk of the content that is presented to candidates, and it is the only structure which allows for candidates to respond to questions via interactions. The assessment items also contain the response processing and outcome variables which provide the correct (or partially correct) responses and how to score those responses. See Section 3 for a complete description of the assessment item structure.

Assessment items often relate to a common, shared stimulus. This shared stimulus is contained in a stimulus structure, and is referenced from an assessment item.  See Section 3.7.6 for more specific information on Shared Stimulus content.

The sequence and structure of any valid QTI 3 file (tests, parts, sections, items, and stimulus) included in a content package is regulated by its associated XML Schema Definition (XSD). QTI 3 does leverage a number of W3C standards (HTML, MathML, CSS, SSML to name a few) which cannot be completely validated using the IMS validators. When using these related standards, the expectation is that implementers will follow the best practices recommended for each of the standards.

The content package also provides the mechanism for resolving hrefs used in QTI content to the actual resources providing that content. In many cases the content package may resolve a href (e.g. "items/item1.xml") to a URL relative to the base href of the content package, but there are some advanced content packaging use cases which may resolve the href to a variant of the resource (e.g. a file with the item translated to a different language) or may indicate that the resource is not directly rendered by the delivery engine, but must instead be LTI launched. For more information on QTI content packages see Section 6.

2.1 Metadata

QTI 3 makes use of the following metadata standards: QTI, Learning Object Metadata (LOM), and curriculum standards.

2.1.1 QTI Metadata

This allows metadata specific to QTI 3 to be added to a QTI 3 item resource in the imsmanifest.xml file.

Full details of the QTI 3 metadata model can be found in the IMS QTI Metadata Information Model and XSD Binding Version 3.0 document, but some of the defined metadata fields cover:

  • the interaction types used in the item
  • whether the item is a composite item
  • whether the item is time dependant or not
  • whether the item is adaptive or not
  • whether the item will generate feedback or not, and if the feedback is adaptive
  • whether the item makes a model solution available
  • whether the item is a concrete instance or a template used to create a concrete instance
  • how the item will be scored, by QTI response processing, by a human or by some form of external machine scoring
  • some information on the tool used to author the item

2.1.2 LOM Metadata

Metadata following the IMS QTI 3 profile of IEEE LOM can also be included, as well as the LOM metadata which can be applied to learning resources generally. This profile provides some rules on how to map QTI concepts to standard LOM fields. For example, that the test or item identifier should be present as an identifier in the LOM metadata. This profile also adds some additional QTI specific vocabularies as an extension to LOM. For example, it supports the Resource Discovery Network Resource Type Vocabulary (RDN/LTSN).

2.1.3 Curriculum Standards Metadata

This allows learning standards and IMS CASE (Competencies and Academic Standards Exchange) identifiers to be associated with a test or item. See the example in section 6.4 on support for CASE in QTI.

2.2 Markup Languages

2.2.1 XML

The QTI Information Model [QTI-INFO-30] is defined as an eXtensible Markup Language (XML) instance and bound by a set of XML Schema Definition (XSD) files. XML is a W3C Recommendation designed to store and transport data and provides the flexibility and extensibility necessary for QTI assessment content or data to be easily organized and exchanged.

2.2.2 HTML5

Beginning in version 2.2, QTI added a select group of HTML5 elements to the standard. These elements were primarily chosen to increase the accessibility of the assessment content. QTI 3 continues to use a subset of the the complete HTML5 specification to maintain the interoperability of the content being exchanged.

In QTI 3, there is an increased emphasis on the use of HTML5 markup. While the class attribute has been available in previous versions, the use of specific QTI standardized presentation classes was developed to increase rendering interoperability. This new approach uses classes where appropriate: for specifying styling information (presentation). An enumerated, shared vocabulary of styles (prefixed by the qti- prefix) will be maintained outside of the QTI specification (schema) to improve interoperability of styling information. See Section 3 for more details.

If a certain style does not exist in the shared vocabulary while authoring assessment content, a custom one can be used; if this happens frequently for a specific style, the style is a candidate for inclusion in the shared vocabulary.

For specifying behavior (semantics) outside of the existing QTI attributes, custom data attributes ( data-) should be used. In case a certain data- attribute is used frequently, and becomes a best  practice, it is a candidate for promotion to a built-in attribute, part of the QTI schema.

The new standardized QTI presentation classes and attributes use a "qti" prefix in their naming in the hope of preventing class naming conflicts. For all standardized QTI presentation classes, the names begin with "qti-"; for example "qti-labels-decimal" (used for interaction choices). For standardized custom attributes related to presentation, the attribute names begin with "data-qti-"; for example "data-qti-max-selections-message."

The use of these QTI-specific classes and attributes is generally described in the interactions or features for which they are intended. A full list of all standardized QTI vocabulary is included in Appendix B.

2.2.3 CSS3

QTI 3 does allow for the inclusion of Cascading Style Sheets (CSS) version 3 in content files to transfer the preferred rendering and behavior for test presentation. However, given the complexities of cascading styles, features such as @import and image references, and their possible conflict with delivery system default styles, the automatic acceptance of stylesheets is not required by certified QTI systems. Some assessment programs may, at their own discretion, create and demand support for their own stylesheets as part of the agreed upon scope of work for a particular contract or program.

Associating a stylesheet with an item, a test, a section, a rubric block, template block, feedback structure, or stimulus to control appearance involves using the QTI stylesheet element within the content structure.

There are specific sequential places within a given QTI XML file that can reference stylesheets, and some substructures within the XML files can also reference stylesheets. In each instance, multiple stylesheets can be listed, with the expectation that the styles "cascade" – where stylesheets listed after other stylesheets override previous stylesheets. However, there are instances where stylesheet references are made within nested nodes of the content, and the stylesheet within these nested nodes are meant to be scoped to that node only, and not intended to apply to any other content. For example, assessment items can contain references to stimulus, where the stimulus has a reference to a stylesheet. In this case, the stylesheet within the stimulus is intended only for that stimulus, and not applied to the item content. Similarly, if a stylesheet reference is made from within a rubric block within the qti-item-body node, the stylesheet for the rubric block is scoped only to that specific rubric block, and not for any other rubric blocks within that item, or the item content itself.

Adding a reference to a stylesheet is done by referencing the stylesheet from your file, as shown in the example below.

<qti-stylesheet href="style/custom/your-styles.css" type="text/css" />

Disclaimer: some systems will reject custom CSS as part of item content to maintain overall visual consistency. Only use custom CSS on the item-level as a last resort. Alternatively, please use the QTI 3 CSS Shared Vocabulary (see Section 3.6.2) and the QTI 3 Item Shared Vocabulary to improve interoperability and visual consistency. The use of these QTI-specific classes and data attributes is generally described in the interactions or features for which they are intended. A full list of all standardized QTI vocabulary is included in Appendix B.

QTI 3 does not support the use of CSS 3 Speech.

Note that as well as CSS introduced by item authors or QTI authoring systems via the stylesheet element, a qti-portable-custom-interaction would be able to dynamically insert CSS at run time into the HTML markup associated with the interaction. It is recommended that any such CSS generated be scoped to the interaction.

2.2.4 MathML

QTI 3 permits the use of MathML version 3 directly within the portions of the XML files that use HTML5 markup.

The simple example below illustrates the inclusion of a mathematical expression marked up with MathML into an item.

<!--
  This example adapted from the PET Handbook, copyright University of Cambridge ESOL Examinations
  -->
  <qti-assessment-itemxmlns="http://www.imsglobal.org/xsd/qti/imsqti_asiv3p0_v1p0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.imsglobal.org/xsd/qti/imsqti_itemv3p0_v1p0  
  https://www.imsglobal.org/xsd/qti/qtiv3p0/imsqti_asiv3p0_v1p0.xsd" identifier="math" 
  title="Relativity" adaptive="false" time-dependent="false" xml:lang="en">
  <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="identifier">
    <qti-correct-response>
      <qti-value>E</qti-value>
    </qti-correct-response>
  </qti-response-declaration>
  <qti-outcome-declaration identifier="SCORE" cardinality="single" base-type="float"/>
  <qti-item-body>
    <qti-choice-interaction response-identifier="RESPONSE" max-choices="1">
      <qti-prompt>
        Which famous scientist is popularly associated with the equation
        <div role="math" aria-label="E equals m c squared">
  <math xmlns="http://www.w3.org/1998/Math/MathML" >
            <mrow>
              <mi>E</mi>
              <mo>=</mo>
              <mi>m</mi>
              <msup>
                <mi>c</mi>
                <mn>2</mn>
              </msup>
            </mrow>
          </math>
        </div>
      </qti-prompt>
      <qti-simple-choice identifier="E">Einstein</qti-simple-choice>
      <qti-simple-choice identifier="G">Galileo</qti-simple-choice>
      <qti-simple-choice identifier="H">Hawking</qti-simple-choice>
      <qti-simple-choice identifier="N">Newton</qti-simple-choice>
    </qti-choice-interaction>
  </qti-item-body>
  <qti-response-processing 
  template="https://purl.imsglobal.org/spec/qti/v3p0/rptemplates/match_correct"/>
  </qti-assessment-item>

Note that schema location and namespaces may not be included in the examples here for ease of reading.

Note about IMS hosts schemas from external namespaces for efficient validation. Perhaps recommend the use of a catalog for local validation

2.2.5 Other Specialized Markup Languages

Specialized markup languages such as Chemical Markup Language (CML) exist for many domains that have a need for computer aided assessment. For that reason, integrating such markup languages with QTI is desirable. Other markup languages include MathML, SVG, and SSML.

A markup language that is widely supported by browsers is Scalable Vector Graphics [SVG]. While direct markup is not supported in the QTI 3 qti-item-body structure at this time, it is easy to include via HTML's 'img' or  'object' tag. Domain specific languages such as CML can often be rendered as SVG, thus providing a convenient way to integrate material with QTI 3.

At present, QTI's qti-printed-variable can be used within MathML and HTML.

A feature that is under consideration for future inclusion is the use of SVG and other languages via HTML 5's 'embed' tag [html5]. The use of this tag is not currently supported either within or outside HTML's 'object' tag.

2.2.6 SSML & PLS

There are two different methods for providing pronunciation information in assessment content that could be consumed by Text-to-Speech (TTS) software (and by extension Screen Reader software) in QTI 3. They are:

  • PLS
  • SSML

See Section 5 for examples that use SSML & PLS pronunciation.

2.3 QTI 3 Conventions

2.3.1 Use of data- attributes

The custom data-* attribute extends QTI 3.0 to support additional features. When defining a custom attribute, the best practice is to utilize clear naming conventions that describe what the attribute does in order to support interoperability. Documentation for your items should also include detailed information about intended use of custom attributes. Below is an example item with documentation on how each custom attribute is intended to be used.

Example of possible use cases:

items/data-attributes.xml

In this example qti-hottext element:

<qti-hottext-interaction 
  class="qti-input-control-hidden"
   max-choices="1" response-identifier="RESPONSE">
    <p>
  Sponsors of the Olympic Games <qti-hottext identifier="A"  data-group-name ="group1"     
  data-deselection-allowed ="false"  data-dont-word-wrap ="false">who bought</qti-hottext>
  advertising time on United States television <qti-hottext identifier="A" 
  data-group-name="group1" data-deselection-allowed="false" 
  data-dont-word-wrap="false">includes</qti-hottext> <qti-hottext identifier="A" 
  data-group-name="group1" data-deselection-allowed="false" data-dont-word-wrap="false">at 
  lease</qti-hottext> a dozen international firms <qti-hottext identifier="A" 
  data-group-name="group1" data-deselection-allowed="false" 
  data-dont-word-wrap="false">whose</qti-hottext> names 
  are familiar to American consumers. <qti-hottext identifier="A" data-group-name="group1"
  data-deselection-allowed="false" data-dont-word-wrap="false"Ne error.</qti-hottext>
    </p>
  </qti-hottext-interaction>

data-group-name allows for radio button group assignment.

data-deselection-allowed sets whether or not students can deselect that option.

data-don't-word-wrap defines if that option is allowed to wrap onto a new line.

2.3.2 Markup Styles and Conventions

QTI 3 introduces a limited number of shared CSS style names  and conventions for use by authoring and delivery systems.  See section 3.6.

By implementing these shared styles and conventions, QTI 3 authoring and delivery platforms can safely import/export – or render – items while preserving certain presentation characteristics without using custom stylesheet injection. Note that all of the shared styles are prefaced by the "qti-" string so as to avoid collisions with a delivery platform's existing CSS.

2.4 Accessibility of QTI 3

QTI 3 has several methods for achieving accessibility, primarily through the use of W3C web accessibility standards (including selected HTML5 elements, WAI-ARIA 1.0, SSML 1.1, and PLS 1.0), and the use of a QTI 3 feature called "catalog" referencing.

Valid QTI 3 content many contain web accessibility markup, including Accessible Rich Internet Applications [wai-aria] 1.0 and Speech Synthesis Mark-up Language [speech-synthesis11] 1.1 in the text-based HTML content. QTI also allows for some additional HTML5 tags in the HTML markup, to aid in the structural intent of the content to aid Assistive Technology test takers. Content instances may also reference Pronunciation Lexicon Standard [pronunciation-lexicon] files to instruct Text-to-Speech Synthesis engines on pronunciation, emphasis, and timing.

In addition to promoting the use of international internet accessibility markup, QTI 3 has additional supports that may assist candidates in accessing assessment content, or receiving special assessment accommodations. The specific needs of candidates can be provided to delivery systems using the data provided in a candidate's Personal Needs & Preferences (PNP) file (see Section 5). Alternate or additional content can be authored and exchanged in QTI 3 files which is intended to be provided to candidates who specifically request this alternate or additional content (see Section 5).

2.4.1 Use of W3C Standards in QTI

Assessment delivery systems that use web delivery platforms can be made accessible to Assistive Technology audiences by using standardized accessible web markup. QTI v3 supports and encourages the use of W3C standards, including HTML5, WCAG 2.0, WAI-ARIA 1.0, SSML 1.1, MathML 3, CML, CSS3 (except CSS3 Speech), and PLS. The proper use of these standards will greatly increase the accessibility of the assessment content exchanged in a QTI 3 content package. For guidance around the proper use of the W3C standards for accessibility, use the extensive online W3C documentation .

While W3C recommended techniques are continuously being modified, the exchange of QTI 3 content may have more restricted markup, using fixed released versions and accepted best practices for content transfer. However, delivery systems may choose to adopt newer techniques for the candidate-facing code during presentation (a live assessment session). The methods that are most likely to give candidates access to content, and the ability to respond to interactions, are encouraged to be implemented as soon as they are available and robust enough to be practically implemented.

2.4.2 Candidate Profiles

QTI 3 is capable of using candidate profiles to offer assessment presentation modifications for specific candidates. QTI 3 uses the Access for All® (AfA®) 3.0 standard [AFA-30] for the exchange of candidate profiles, also known as Personal Needs & Preferences (PNP) profiles. The vocabulary used in AfA 3.0 is closely aligned with the predefined supports that can be provided in QTI 3 content.

Through the use of a candidate PNP, a delivery system can provide additional assessment tools for candidates, modify the assessment session parameters (e.g., time limits), or inform test proctors of any special needs of the candidate. Additionally, the assessment content can contain content alternatives or supplemental content that can be activated based on the specific support needs of the candidate.

A description of all the QTI 3 predefined supports can be found in Section 5 of this guide.

2.4.3 Using Catalogs to Store Support-Specific Content

QTI 3 uses a feature called "catalogs" to provide additional content for specific supports which can be activated for specific users, either based on their candidate PNP information or through other test administrative controls. Within an item, any element within the qti-item-body (including the qti-item-body element itself) can point to a referenced container called a "catalog" that contains one or more snippets of content that support the referencing content.

A general description of how to reference and use catalogs can be found in Section 3.7.10, and examples for each of the QTI 3 profile of the AfA 3.0 supports can be found in Section 5.

2.5 Use of Portable Custom Interactions (PCI)

QTI defines a rich set of interaction types but it is not possible for QTI to fully define all interaction types which may be required by educational organizations, particularly with growth in the use of technology enhanced items.

QTI 2 offered an extension mechanism, customInteraction, which allowed interaction content not defined in the QTI Assessment Test, Section and Item specifications to be included in a QTI assessment item, but such items are not in general inter-operable.

To address this interoperability gap, a best practice, known as the Portable Custom Interaction (PCI), was established for QTI 2, which standardizes the contents of a custom interaction element so that it can be utilized by any assessment engine which implements the Portable Content Interaction Best Practice.

In QTI 3 this has been superseded by the introduction of a new interaction type, qti-portable-custom-interaction which makes an enhanced version of this best practice part of the QTI specification. For more information see Section 3.2.22b and Section 3.7.12.

2.6 Results and Metrics: Caliper Assessment Metric Profile

In addition to using the Response Processing Templates in Section 3.4 to score items, there is now a QTI 3.0 Assessment Profile for Caliper Analytics® in development. Adopting this profile allows use of the IMS learning  Sensor API™to define basic learning events and to standardize and simplify the gathering of learning metrics across learning environments. Using Caliper to capture student activity during an assessment will allow for metrics that are unavailable from a simple score on each item. For more details on Caliper Analytics [CALIPER-11] please review the latest specification.

Review the  Results Reporting Specification [QTI-RR-30] for more information.

2.7 Internationalization

2.7.1 BI-directional Text and Content

Item authors might want to specify the base directionality of their item contents. This is done by the 'dir' attribute, enabling text and content bi-directionality (BIDI). Although the [UNICODE] specification supports directionality of characters, the 'dir' attribute enables item authors to specify the direction of texts but also other kinds of contents, such as tables or interactions. The Content Model described by QTI 3.0 Information Model obey to bidirectional algorithm, inheritance of text direction information, and direction of embedded text specified by the [html40] and [html5] specifications.

Composition of Water (Hebrew)

packaging/items/choice_multiple_rtl.xml

The following example is an Hebrew version of the Composition of Water item. An enclosing div' has a 'dir' attribute with a value of "rtl" (Right to Left). As a result, the 'rtl' directionality is in effect (by inheritance) for all nested block elements. The ChoiceInteraction and its content must be then displayed from right to left as well.

Figure 2 Composition of Water, Hebrew version (Illustration)
A sample choiceInteraction item in Hebrew showing the possible checkboxes on the left with the 
              answers justified to the right. The question is right justified at the top.

Grand Prix of Bahrain (Hebrew)

packaging/items/order_rtl.xml

The following example describes the use of the bdo class to turn off the bidirectional algorithm for given text portions ("F1", "Rubens Barrichello", "Jenson Button", "Michael Schumacher").

Figure 3 Grand Prix of Bahrain, Hebrew version (Illustration)
A sample orderInteraction item in Hebrew showing the possible answers to arrange in the proper order.

2.7.2 Ruby Markup

QTI 3.0 includes Ruby Markup support. Its intent is to provide a way to render small annotations rendered alongside base text. As explained in depth by the W3C Ruby Markup and Styling article, "Ruby is used in East Asian countries to describe characters that readers might not be familiar with, or describe the meaning of ideographic characters". [ruby] Markup in QTI 3.0 adheres to the description of W3C in [html5].

Hometown (Japanese)

packaging/items/choice_ruby.xml

The item example below makes use of the ruby, rb and rt classes to annotate base text in paragraphs and choices.

Figure 4 Hometown (Japanese) example.
A sample choiceInteraction item using Ruby Markup in Japanese characters.

3. Item Structure

Items are the essential building blocks of an assessment and make up the bulk of the test material. Items contain the assessment stimuli and prompts (the questions), and also the response areas (the interactions) and scoring instructions.

In order for organizations to exchange the assessment items, the item files may also need to contain a variety of data elements that support the item content. These data elements  are briefly explained in this subsection, and with greater details throughout Section 3 of this implementation guide. An assessment item encompasses the information that is presented to a candidate and information about how to score the item. Scoring takes place when candidate responses are transformed into outcomes by response processing rules.

3.1 The qti-assessment-item Element

The qti-assessment-item element contains all the other QTI 3 item structures, and the opening qti-assessment-item element contains the following attributes (* denotes the attribute is required):

  • All namespace declarations, including schema locations*
  • identifier*
  • label
  • language (xml:lang)
  • tool name (tool-name)
  • tool version (tool-version)
  • title
  • adaptive item indicator (adaptive)
  • time dependent (time-dependent) item indicator*

The qti-assessment-item node must contain an "identifier" attribute with a non-null string to identify the item. It is used to identify the item as a unique entity within the context of the exchange of assessment content, so organizations may wish to add organizational prefixes to their identifier information to ensure uniqueness among multiple vendors.

You can optionally add a "label" as an attribute, in whatever way is meaningful as an organizational label for the item(s).

The "xml:lang" attribute is optional, though it should be included as a best practice, as the language is a primary accessibility support for web-based documents.

Both the "tool-name" and "tool-version" are optional elements, which usually indicate the tool name and version that generated the item.

The "title" is an additional optional attribute, which generally contains a more human readable string of text that describes the item.

The "adaptive" attribute is also optional, and the default value is false, where only boolean values (true/false) are permitted. By not including the adaptive attribute, the item will NOT be considered adaptive (changing to the responses of the candidate). The adaptive attribute is not related to adaptive assessments, where the sequence of the item within the context of an assessment is non-linear. See Section 3.7.2  for more information on item adaptivity.

The "time-dependent" attribute is a required attribute, where boolean values (true/false) are permitted. A time dependent item (time-dependent="true") is one in which time; i.e., the amount of time a candidate is provided by a delivery system to enter a response, is important for the psychometric properties - the calibration - of the item. Along with response evaluation, this attribute can also be used in conjunction with other Test attributes by delivery systems to enforce candidate attempt duration limits.

3.1.1 Structures within the qti-assessment-item Node

The QTI-specific XML structures are described in the QTI 3Item XSD. The QTI 3 Item XSD can be found at https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_itemv3p0_v1p0.xsd , which is a subset of the full QTI 3 XSD found at https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd. The namespace is http://www.imsglobal.org/xsd/imsqtiasi_v3p0

An item typically includes the following information:

  • Scoring data
  • The item content presented to the candidate, which itself contains:
  • Any directions/instructions
  • Any stimuli or references to stimuli
  • The prompt(s)
  • The interaction(s)
  • Feedback for the candidate
  • Supplemental content or references to supplemental content
  • Content displayed, voiced, or printed, contingent on the candidate's Access for All (AFA) Personal Needs and Preferences (PNP)

The above information is stored in specific QTI 3structures, and must be supplied in the sequence listed below :

  1. qti-context-declaration
  2. qti-response-declaration
  3. qti-outcome-declaration
  4. qti-template-declaration
  5. qti-template-processing
  6. qti-assessment-stimulus-ref
  7. qti-companion-materials-info
  8. qti-response-processing
  9. qti-modal-feedback

The inclusion or exclusion of the above structures depends on the complexity of the item, and on the needs of the assessment program using the assessment content.

Scoring an item can be quite complex, and the information used to provide the response information and the score(s)received (the outcome(s)) are possible using a combination of the following structures:

  1. qit-context-declaration
  2. qti-response-declaration
  3. qti-outcome-declaration
  4. qti-response-processing

Content (and content presentation data) to be presented to the candidate is supplied or referenced in a combination of these structures:

  1. qti-assessment-stimulus-ref
  2. qti-companion-materials-info
  3. qti-stylesheet
  4. qti-item-body

Content presented to candidates using variables use these structures:

  1. qti-template-declaration
  2. qti-template-processing
  3. qti-catalog-info
  4. qti-modal-feedback

A brief introduction to the AssessmentItem structures is provided below.

3.1.1.1 Context Declaration

The qti-context-declaration nodes are used to make "contextual" variable declarations that are global in scope to an item. When evaluating TemplateProcessing and ResponseProcessing instructions in an AssessmentItem, having contextual information available in the information model can improve the effectiveness, efficiency, and personalization of TemplateProcessing and ResponseProcessing instructions. Contextual information can include candidate information, test information, and system (or environmental) information. Context declarations are also permitted in tests.  See Section 3.7.11  for a longer description of context declarations.

3.1.1.2 Response Declaration

Response variables are declared using qti-response-declaration nodes. Interactions in the itemBody must be bound to one of these declared variables . The response declaration supplies the values for the scoring of the item. It may indicate what the correct response is, or the partially correct response(s). The base-type and cardinality defined for a response variable must match the types and cardinality required by the interactions bound to that response variable.

3.1.1.3 Outcome Declaration

Outcome variables are declared using qti-outcome-declaration nodes. The outcome variables represent the score that the candidate can receive for responding to, or not responding to, the item. The outcomes variables values are set either from a default given in the outcome declaration itself or by a ResponseRule during ResponseProcessing. See Section 3.5  for a longer description of outcome declarations.

3.1.1.4 Template Declaration

Use qti-template-declaration nodes to declare item variables that are to be used specifically for the purposes of cloning items. Template variables can have their value set only during TemplateProcessing. Template declarations are referred to within the qti-item-body in order to individualize the clone and possibly also within the ResponseProcessing rules if the cloning process affects the way the item is scored. See Section 3.7.4  for a longer description of using templates in items.

3.1.1.5 Template Processing

Use the qti-template-processing node for template processing. Template processing consists of one or more TemplateRules that are followed by a cloning engine or delivery system in order to assign values to the template variables. Template processing is identical in form to ResponseProcessing except that the purpose is to assign values to template variables, not outcome variables. See Section 3.7.4  for a description on using template processing in items.

Reference to a Shared Stimulus

The qti-assessment-stimulus-ref element can be used to associate one or more external; i.e., external to the qti-assessment-item XML, stimulus blocks with a particular item.  A common use case is to author and package a stimulus such as a passage, which can then be shared among multiple items. See Section 3.7.7  for more specifics on how to link items to a shared stimulus.

3.1.1.6 Companion Materials

The qti-companion-materials-info node is used to indicate if the item should be presented to candidates with other kinds of (built-in) assessment tools or materials (companion materials), including: calculators, protractors, rulers, digital materials, or physical materials. See Section 3.7.8  for a longer description of including companion materials in items.

3.1.1.7 Stylesheets

The qti-stylesheet nodes are used to associate external stylesheets for the item. QTI 3 supports CSS 2.1 and CSS 3.0 stylesheets (excluding speech). Any number of stylesheets can be included in an item. See Section 3.6  for examples of how to include stylesheets in items.

For conformance purposes, the use of stylesheets may be ignored by delivery systems, where support for stylesheets is not required for QTI systems.

For interoperability and implementation purposes, QTI shared CSS vocabulary classes take precedence over CSS stylesheets.  See Section 3.6.1  for details about QTI 3 shared vocabulary CSS classes.

3.1.1.8 The Item Body

The qti-item-body node contains the text, graphics, media objects and interactions that describe the item's content and information about how it is structured. Only one qti-item-body node is allowed within an item. The qti-item-body is presented to candidates by combining the qti-item-body content with stylesheet information, either explicitly or implicitly using the default style rules of the delivery or authoring system. The ItemBody contains formatted, structured HTML content (see @@@ Section 2.3), as well as any prompt content (optionally contained within the qti-prompt nodes) and any interactions.

Composite items are items that contain more than one interaction within the ItemBody. Composite items may contain multiple instances of the same type of interaction or have a mixture of interaction types within the ItemBody. See Section 3.2  for documentation for specific QTI interactions, and Section 3.3  for the use of composite items.

Because ItemBody content is expected to be presented to candidates with a wide variance of perceptual, cognitive processing, physical capabilities, etc.; assessment content should be made as accessible as possible to the widest range of candidates. Guidance on how to provide accessible content is sprinkled throughout this implementation guide, but is certainly not the definitive nor complete documentation on providing accessible content to people. Implementers should stay current in methods and approaches that help increase access to assessment content for all users.

The ItemBody content must be presented to the candidate during an active assessment session. In the assessment session, the candidate must be able to interact with each of the presented interactions and therefore set or update the values of the associated response variables.

The ItemBody may be presented to the candidate when the item session is in the closed or review state. In these states, although the candidate's responses should be presented, the interactions must be disabled so as to prevent the candidate from setting or updating the values of the associated response variables.

The ItemBody may be presented to the candidate in the solution state, in which case the correct values of the response variables must be presented and the associated interactions disabled.

Adaptive items are a feature that allows an item to be scored adaptively over a sequence of attempts. This allows the candidate to alter their answer following feedback or to be posed additional questions based on their current answer.

The ItemBody may also contain rubric blocks (qti-rubric-block), which is content that may be presented to one of the possible audiences for the content, including the author, candidate, proctor, scorer, testConstructor, or tutor. This content would only be shown to the specified audience when the role of that audience is specifically known the system presenting the item. See Section 3.7.5  for more information on using rubric blocks in an assessmentItem.

3.1.1.9 Catalog Resources

The qti-catalog-info node holds one or more catalogs. The ItemBody content references specific catalogs within the qti-catalog-info node. Catalogs hold and reference item content that is presented to candidates based on their candidate profile (PNP) requirements. See Section 5 for a longer description of using catalogs to store support-specific content.  In addition to Section 5, there is an annotated item in Section 3.8.1  that includes the use of catalogs for encoding Glossaries and Keyword Translations.

3.1.1.10 Response Processing

Use the qti-response-processing node for response processing – the process by which a delivery engine assigns outcomes (the scores) based on the candidate's responses. Response processing can be achieved using either a response processing template (a reference to a common processing pattern), or by using customized response processing. See Section 3.4.2  for information on using response processing templates, and Section 3.7.1  for information on customized response processing.

3.2 Interaction Types

All QTI v2.2 interaction types are included in QTI 3. However, the interaction elements have been renamed to reflect a web component-friendly syntax which will enable QTI processors to render ItemBody interaction content - should they choose to do so – with web components, and without having to apply further interaction transformations.

The QTI 3 interaction web components-friendly vocabulary introduces the "qti-" prefix on every QTI element. Furthermore, camelcase elements and attributes are replaced with all-lowercase elements/attributes with hyphen separators. See the example below of a choice interaction with the QTI 3 web components-friendly vocabulary.

Example: qti-choice-interaction

<qti-assessment-item><qti-item-body>
    <p>Look at the text in the picture.</p>
    <p><img src="images/sign.png" alt="NEVER LEAVE LUGGAGE UNATTENDED" /></p>
    <
  qti-choice-interaction
   max-choices="1" response-identifier="RESPONSE">
      <qti-prompt>What does it say?</qti-prompt>
  <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
  <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
  <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
    </qti-choice-interaction>
  </qti-item-body>
  </qti-assessment-item>

In another example (a hotspot interaction), note how the object element is considered an HTML element - and therefore not prefixed by "qti-" - even though it is a sub-element of an interaction.

Example: qti-hotspot-interaction

<qti-assessment-item><qti-item-body>
    <p>The picture below illustrates four of the most popular destinations for 
  air travelers arriving in the United Kingdom: London, Manchester, Edinburgh and Glasgow. 
  Please choose all of the cities Northof London.</p>
    <qti-hotspot-interaction max-choices="0" response-identifier="RESPONSE">
      <object data="ukair.png" height="280" type="image/png" width="206">UK Map</object>
      <qti-hotspot-choice coords="77,115,10" identifier="A" shape="circle"/>
      <qti-hotspot-choice coords="118,184,10" identifier="B" shape="circle"/>
      <qti-hotspot-choice coords="150,235,10" identifier="C" shape="circle"/>
      <qti-hotspot-choice coords="96,114,10" identifier="D" shape="circle"/>
    </qti-hotspot-interaction>
  </qti-item-body>
  </qti-assessment-item>

QTI 3 includes the following standardized interactions:

  1. Choice (qti-choice-interaction): presents a set of choices to the candidate. The candidate's task is to select one or more of the choices, up to a maximum number of choices allowed. (See Section 3.2.2 )
  2. Text Entry (qti-text-entry-interaction): an inline interaction that accepts text from the candidate. (See Section 3.2.3 )
  3. Extended Text(qti-extended-text-interaction): a block interaction that allows the candidate to enter an extended amount of text.
  4. Gap Match (qti-gap-match-interaction): a block interaction that contains a number of gaps that the candidate can fill from an associated set of choices.
  5. Hot Spot(qti-hotspot-interaction): a graphical interaction with a corresponding set of choices that are defined as areas of the graphic image. The candidate's task is to select one or more of the areas (hotspots).
  6. Hot Text (qti-hot-text-interaction): presents a set of choices to the candidate represented as selectable runs of text embedded within a surrounding context, such as a passage of text.
  7. Inline Choice (qti-inline-choice-interaction): an inline interaction that presents the user with a set of choices, each of which is an answer option (usually text). The candidate's task is to select one of the choices.
  8. Match (qti-match-interaction): a block interaction that presents candidates with two sets of choices and allows them to create associations between pairs of choices in the two sets, but not between pairs of choices in the same set.
  9. Order (qti-order-interaction): the candidate's task is to reorder the choices, the order in which the choices are displayed initially is significant.
  10. Graphic Order(qti-graphic-order-interaction): A graphic order interaction is a graphic interaction with a corresponding set of hotspot choices that are defined as areas of the graphic image. The candidate's task is to impose an ordering on the areas (hotspots).
  11. Associate (qti-associate-interaction): a block interaction that presents candidates with a number of choices and allows them to create associations between them.
  12. Graphic Associate (qti-graphic-associate-interaction): a graphic interaction with a corresponding set of choices that are defined as areas of the graphic image. The candidate's task is to associate the areas (hotspots) with each other.
  13. Graphic Gap Match (qti-graphic-gap-match-interaction): a graphical interaction with a set of gaps that are defined as areas (hotspots) of the graphic image and an additional set of gap choices that are defined outside the image. The candidate must associate the gap choices with the gaps in the image and be able to review the image with the gaps filled in context, as indicated by their choices.
  14. Media (qti-media-interaction): allows more control over the way the candidate interacts with a time-based media object and allows the number of times the media object was experienced to be reported in the value of the associated response variable.
  15. Position Object (qti-position-object-interaction): consists of a single image which must be positioned on another graphic image (the stage) by the candidate.
  16. Select Point (qti-select-point-interaction): a graphic interaction in which the candidate's task is to select one or more points.
  17. Slider (qti-slider-interaction): presents the candidate with a control for selecting a numerical value between a lower and upper bound.
  18. Upload(qti-upload-interaction): allows the candidate to upload a pre-prepared file representing their response.
  19. Drawing(qti-drawing-interaction): allows the candidate to use drawing tools provided by the delivery system to modify a given graphical image (the canvas). The result is a file in the same format as the original image.
  20. Custom(qti-custom-interaction) and Portable Custom (qti-portable-custom-interaction): allow the item author to present an interaction with a custom user interface and behavior, supported by, respectively, delivery engine-specific or author-provided code.  Portable Custom Interactions (PCIs) allow the Javascript code implementing the interaction to be made available to delivery systems, with a standard Javascript interface, offering the potential for making PCIs more interoperable and portable between conforming delivery engines.
  21. End Attempt (qti-end-attempt-interaction): is a special interaction which immediately ends the current attempt on an assessment item.  It may be used, for example, to allow the candidate to request a hint or model solution, or in an adaptive item to let the candidate display feedback or to move to the next in a series of interactions in the item.

Each of the interactions described in the following sections can contain sub-elements and attributes. For full descriptions of these features, see the QTI 3 Information Model document.

3.2.1 Interoperability and Utilizing Shared Vocabularies

Previous versions of QTI lack specificity with respect to interaction presentation, styling, and behavior. Consequently, QTI authoring systems and delivery systems have implemented interactions with custom presentation/behavior definitions, which in turn have become an impediment to interoperability. To improve interaction presentation/behavior interoperability, QTI 3 introduces, "shared vocabularies" that describe more fine-grained presentation control and more semantically-explicit styling and behaviors.

There are two primary mechanisms of the QTI 3 interaction shared vocabularies:

  1. An interaction's class attribute, and
  2. An interaction's " data-" attributes.

In order to prevent collisions with existing classes, the QTI 3 interaction shared vocabularies  use classes with the "qti-" prefix.

Although the class and " data-" attributes already exist in QTI 2.2, the shared vocabularies explicitly define how to use these attributes to achieve certain agreed-upon rendered presentations. By agreeing to implement interaction styling and behaviors according to the definitions of the shared vocabularies, interaction interoperability may be greatly improved.

Implementers of custom presentations/behaviors should avoid using classes with the "qti-" prefix, and should also avoid using the QTI 3 established "data-" attributes from the shared vocabularies. Over time, it is the expectation that the shared vocabularies will evolve as common use-cases emerge.

When using classes that indicate that the presentation of content should be horizontal (qti-orientation-horizontal, qti-choices-stacking-2, etc.), it can force some of the choices outside the single width of the viewing portal, which can be problematic for candidates. For low-vision candidates using magnification (or text-appearance → font-size or word-spacing), the likelihood of horizontal scrolling is increased. When choices are placed off-screen, candidates can accidentally disregard the choices, candidates are required to use additional working memory to respond to the item, and it adds significant time for low-vision candidates.

If the candidate is known to have low-vision, and choices could be displayed beyond the width of a single viewport, presentation systems should consider presenting the choices vertically.

3.2.2 Choice Interaction

The ChoiceInteraction.Type (qti-choice-interaction) interaction presents a collection of choices to the candidate. The candidate's task is to select one or more of the choices, up to a maximum of max-choices. The interaction is always initialized with no choices selected.

The ChoiceInteraction.Type must be bound to a response variable with a base-type of identifier and single or multiple cardinality.

ChoiceInteraction Attributes (element: qti-choice-interaction)

Name Usage Value(s) Default
max-choices optional Non-negative integer 1
min-choices optional Non-negative integer 0 (unlimited)
orientation optional Vocabulary:• horizontal• vertical
shuffle optional boolean false

The choice interaction is made up of choices, which use the qti-simple-choice element (SimpleChoice.Type) to present an ordered list of choices to the candidate.

As noted in the table above, the "shuffle" attribute is optional and defaults to false.  However, if the shuffle attribute is set to "true", and the delivery engine supports the discretionary "shuffle" feature, the presentation system must randomize the order in which the choices are originally listed in the Assessment Item XML, subject to the value of the fixed attribute of each choice. If fixed is "true" for a choice then the position of this choice within the interaction must not be changed by the presentation system even if the immediately enclosing interaction supports the shuffling of choices. If no value is specified then the choice is free to be shuffled.

SimpleChoice (element: qti-simple-choice) Attributes

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier
show-hide optional Vocabulary:• show• hide show
fixed optional boolean false

Below is an example of a choice interaction that allows the candidate to select multiple answer options to respond to the prompt.

Example: qti-choice-interaction (multiple cardinality)

<qti-assessment-item xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 
  https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd" 
  xml:lang="en-US" identifier="QTI3multiplechoice2" time-dependent="false">
    <qti-response-declaration identifier="RESPONSE" cardinality="multiple" base-type="identifier">
      <qti-correct-response>
        <qti-value>H</qti-value>
        <qti-value>O</qti-value>
      </qti-correct-response>
    </qti-response-declaration>
    <qti-outcome-declaration identifier="SCORE" cardinality="single" base-type="float"/>
    <qti-item-body>
      <qti-choice-interaction response-identifier="RESPONSE" min-choices="1" max-choices="6">
        <qti-prompt>Which of the following elements are used to form water?</qti-prompt>
        <qti-simple-choice identifier="H">Hydrogen</qti-simple-choice>
        <qti-simple-choice identifier="He">Helium</qti-simple-choice>
        <qti-simple-choice identifier="C">Carbon</qti-simple-choice>
        <qti-simple-choice identifier="O">Oxygen</qti-simple-choice>
        <qti-simple-choice identifier="N">Nitrogen</qti-simple-choice>
        <qti-simple-choice identifier="Cl">Chlorine</qti-simple-choice>
      </qti-choice-interaction>
    </qti-item-body>
  </qti-assessment-item>
Figure 5 Expected Rendering: Choices rendered in a single column, vertically oriented.
Question with 6 response options presented vertically (each option on a new line).

The qti-choice-interaction has a considerable amount of its shared vocabulary dedicated to the presentation/layout of the interaction's associated qti-simple-choices. Each qti-simple-choice consists of a collection of elements, displayed from left to right, defined as follows:

  1. A "control"; e.g., either a radio button or checkbox control, and
  2. A "label"; e.g., often an alphanumeric character such as, "A", "B", "1", "2", etc.
  3. A "label suffix"; e.g., a "." or ")" character after the label, and
  4. A "description"; e.g., the HTML content contained by a qti-simple-choice element

By default, in the absence of any shared vocabulary, the presentation of each choice control, label, label suffix, and description, is left to the implementer, with the only requirement that the choices are displayed in a single column, vertically oriented.

3.2.2.1 Choice Label

For explicit choice labeling, use the class attribute as follows:

Values
qti-labels-none No labels displayed.
qti-labels-decimal Display numeric characters 1, 2, 3, …
qti-labels-lower-alpha Display lowercase characters a, b, c, …
qti-labels-upper-alpha Display uppercase characters A, B, C, …

In the absence of choice labeling, delivery systems should render platform defaults.

Example: Demonstrates class="qti-labels-none"


  <qti-choice-interaction 
  class="qti-labels-none"
   max-choices="1"    response-identifier="RESPONSE">
  <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
  <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
   <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 6 Expected Rendering: No visual labels.
3 response options, each with a circular button with no numbers, letters, or punctuation associated with the buttons.

Example: Demonstrates class="qti-labels-decimal"

<
  qti-choice-interaction 
  class="qti-labels-decimal"
   max-choices="1"    response-identifier="RESPONSE">
  <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
  <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
  <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 7 Expected Rendering: Visual labels are numeric.

Example: Demonstrates class="qti-labels-lower-alpha"

<qti-choice-interaction 
  class="qti-labels-lower-alpha"
   max-choices="1"    response-identifier="RESPONSE">
  <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
  <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
  <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 8 Expected Rendering: Visual labels are lowercase alphabetic.
3 response options, each with a circular button. Next to each circle is an ascending alphabet letter in lowercase.

Example: Demonstrates class="qti-labels-upper-alpha"

<qti-choice-interaction 
  class="qti-labels-upper-alpha"
   max-choices="1"    response-identifier="RESPONSE">
  <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
   <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
  <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 9 Expected Rendering: Visual labels are uppercase alphabetic.
3 response options, each with a circular button. Next to each circle is an ascending alphabet letter in uppercase.
3.2.2.2 Choice Label Suffix

For explicit choice suffix labeling, use the class attribute as follows:

Values
qti-labels-suffix-none No character is displayed after the choice label.
qti-labels-suffix-period A period "." character is displayed after the choice label.
qti-labels-suffix-parenthesis A right parenthesis ")" character is displayed after the choice label.

In the absence of choice suffix labeling, delivery systems should render platform defaults.

Example: Demonstrates class="qti-labels-suffix-none"

<qti-choice-interaction 
  class="qti-labels-suffix-none"
   max-choices="1"    response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 10 Expected Rendering: No visual label suffix.
3 response options, each with a circular button. Next to 
                        each circle is an ascending alphabet letter in uppercase, and there is no punctuation after each letter.

Example: Demonstrates class="qti-labels-suffix-period"

<qti-choice-interaction 
  class="qti-labels-suffix-period"
   max-choices="1"    response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 11 Expected Rendering: A period "." visual label suffix.
3 response options, each with a circular button. Next to each circle 
                        is an ascending alphabet letter in uppercase, and there is a period character 
                        immediately after each letter.

Example: Demonstrates class="qti-labels-suffix-parenthesis"

<qti-choice-interaction class="qti-labels-suffix-parenthesis"
   max-choices="1"    response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 12 Expected Rendering: A right parenthesis ")" visual label suffix.
3 response options, each with a circular button. Next to each circle is an ascending 
                        alphabet letter in uppercase, and there is a right parenthesis “)” character immediately after each letter.
3.2.2.3 Combining Choice Label and Choice Label Suffix

It is possible to combine choice label and choice label suffix classes in order to make explicit the desired presentation of the label.  In the absence of choice labeling and choice suffix labeling, delivery systems should render platform defaults.

Example: Demonstrates class="qti-labels-lower-alpha qti-labels-suffix-parenthesis"

<qti-choice-interaction 
  class="qti-labels-lower-alpha qti-labels-suffix-parenthesis"
   max-choices="1" response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 13 Expected Rendering: Visual labels lowercase alpha with a right parenthesis ")" visual label suffix.
3 response options, each with a circular button. Next to each circle is an ascending alphabet letter in lowercase, 
                        and there is a right parenthesis “)” character immediately after each letter.

Example: Demonstrates class="qti-labels-decimal qti-labels-suffix-period"

<qti-choice-interaction 
  class="qti-labels-decimal qti-labels-suffix-period"
   max-choices="1" response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 14 Expected Rendering: Visual labels numeric with a period "." visual label suffix.
3 response options, each with a circular button. Next to each circle is an ascending number, and 
                        there is a period “.” character immediately after each number.
3.2.2.4 Choice Orientation

For explicit choice visual orientation, use the class attribute as follows:

Values
qti-orientation-vertical Choices are displayed from top to bottom, vertically.
qti-orientation-horizontal Choices are displayed from left to right, horizontally.

When displaying horizontally-oriented lists of choices, delivery systems are not expected to display more than five choices in any row.  

Example: Demonstrates class="qti-orientation-vertical"

<qti-choice-interaction 
  class="qti-orientation-vertical"
   max-choices="1" shuffle="false"   response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 15 Expected Rendering: Choices are displayed from top to bottom, vertically.
3 response options, each with a circular button, each option on its own line, one above the next response option.

Example: Demonstrates class="qti-orientation-horizontal"

<qti-choice-interaction 
  class="qti-orientation-horizontal"
   max-choices="1"    response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 16 Expected Rendering: Choices are displayed from left to right, horizontally. Note: a maximum of 5 choices displayed in any row.
3 response options, each with a circular button where each option is in the same horizontal row, one immediately to the right of the next one. 
                        The text in the options wraps to a second line immediately below the first line of the same option.
3.2.2.5 Choice Stacking

For explicit choice stacking, use the class attribute as follows:

Values
qti-choices-stacking-1 Choices are stacked in 1 column.
qti-choices-stacking-2 Choices are stacked in 2 columns.
qti-choices-stacking-3 Choices are stacked in 3 columns.
qti-choices-stacking-4 Choices are stacked in 4 columns.
qti-choices-stacking-5 Choices are stacked in 5 columns.

By default, with vertical orientation, default stacking = 1. With horizontal orientation, default stacking equals the number of choices; e.g., if there are 4 choices then default stacking is 4 when orientation is horizontal. Furthermore, when orientation is horizontal, no delivery system is expected to stack more than 5 choices in a single row.  In the absence of an orientation class (horizontal or vertical), stacking is implicitly horizontal.

Example: Demonstrates class="qti-choices-stacking-1"

<qti-choice-interaction 
  class="qti-choices-stacking-1"
   max-choices="0"    response-identifier="RESPONSE">
    <qti-simple-choice fixed="false" identifier="H">Hydrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="He">Helium</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="C">Carbon</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="O">Oxygen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="N">Nitrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="Cl">Chlorine</qti-simple-choice>
  </qti-choice-interaction>
Figure 17 Expected Rendering: Choices are displayed in one column.
6 response options, each with a circular button, each option on its own line, one above the next response option.

Example: Demonstrates class="qti-choices-stacking-2"

<qti-choice-interaction 
  class="qti-choices-stacking-2"
   max-choices="0"    response-identifier="RESPONSE">
    <qti-simple-choice fixed="false" identifier="H">Hydrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="He">Helium</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="C">Carbon</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="O">Oxygen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="N">Nitrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="Cl">Chlorine</qti-simple-choice>
  </qti-choice-interaction>
Figure 18 Expected Rendering: Choices are displayed in two columns.
6 response options, each with a circular button. There are 2 columns of 
                        responses, 3 options in each column. The option order is left to right, top to bottom.

Example: Demonstrates class="qti-choices-stacking-3"

<qti-choice-interaction 
  class="qti-choices-stacking-3"
   max-choices="0"    response-identifier="RESPONSE">
    <qti-simple-choice fixed="false" identifier="H">Hydrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="He">Helium</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="C">Carbon</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="O">Oxygen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="N">Nitrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="Cl">Chlorine</qti-simple-choice>
  </qti-choice-interaction>
Figure 19 Expected Rendering: Choices are displayed in three columns.
6 response options, each with a circular button. There are 3 columns of responses, 
                        2 options in each column. The option order is left to right, top to bottom.

Example: Demonstrates class="qti-choices-stacking-4"

<qti-choice-interaction 
  class="qti-choices-stacking-4"
   max-choices="0"    response-identifier="RESPONSE">
    <qti-simple-choice fixed="false" identifier="H">Hydrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="He">Helium</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="C">Carbon</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="O">Oxygen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="N">Nitrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="Cl">Chlorine</qti-simple-choice>
  </qti-choice-interaction>
Figure 20 Expected Rendering: Choices are displayed in four columns.
6 response options, each with a circular button. There are 4 columns of responses, 
                        2 options in the first two columns, and one option the last two columns. The option order is 
                        left to right, top to bottom.

Example: Demonstrates class="qti-choices-stacking-5"

<qti-choice-interaction 
  class="qti-choices-stacking-5"
   max-choices="0"    response-identifier="RESPONSE">
    <qti-simple-choice fixed="false" identifier="H">Hydrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="He">Helium</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="C">Carbon</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="O">Oxygen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="N">Nitrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="Cl">Chlorine</qti-simple-choice>
  </qti-choice-interaction>
Figure 21 Expected Rendering: Choices are displayed in five columns.
6 ansresponsewer options, each with a circular button. There are 5 columns of responses, 
                        2 options in the first columns, and one option the last 4 columns. The option order is left to right, 
                        top to bottom.
3.2.2.6 Combining Orientation and Choice Stacking

Combining an orientation class with a stacking class is used to explicitly set the visual order of the choices.  Horizontal stacking must result in a "Z" order of the choices, while vertical stacking must result in a so-called, "Reverse N" visual order of the choices.  

Please see the examples below.

Example: Demonstrates class="qti-choices-stacking-3 qti-orientation-horizontal"

<qti-choice-interaction 
  class="qti-choices-stacking-3 qti-orientation-horizontal"
   max-choices="0" response-identifier="RESPONSE">
    <qti-simple-choice fixed="false" identifier="H">Hydrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="He">Helium</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="C">Carbon</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="O">Oxygen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="N">Nitrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="Cl">Chlorine</qti-simple-choice>
  </qti-choice-interaction>
Figure 22 Expected Rendering: Choices are displayed in three columns, Choices are in "Z" order.
6 response options, each with a rounded square button. There are 3 columns of responses, 2 options in 
                        each column in two rows. Read as rows (left to right) the option order for the first row is A, B, C; the second 
                        row is D, E, F.

Example: Demonstrates class="qti-choices-stacking-3 qti-orientation-vertical"

<qti-choice-interaction 
  class="qti-choices-stacking-3 qti-orientation-vertical"
  max-choices="0" response-identifier="RESPONSE">
    <qti-simple-choice fixed="false" identifier="H">Hydrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="He">Helium</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="C">Carbon</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="O">Oxygen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="N">Nitrogen</qti-simple-choice>
    <qti-simple-choice fixed="false" identifier="Cl">Chlorine</qti-simple-choice>
  </qti-choice-interaction>
Figure 23 Expected Rendering: Choices are displayed in three columns because of the stacking class, and choices are in so-called, "Reverse N" order as a result of the explicit vertical specification.
6 response options, each with a rounded square button. There are 3 columns 
                        of responses, 2 options in each column in two rows. Read as rows (left to right) the 
                        option order for the first row is A, C, E; the second row is B, D, F.

Example: Demonstrates class="qti-choices-stacking-2 qti-orientation-vertical"

<qti-choice-interaction 
  class="qti-choices-stacking-2 qti-orientation-vertical"
   max-choices="1" shuffle="false" response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 24 Expected Rendering: Choices are displayed in two columns, Choices are in "Reverse N" visual order.
3 response options, each with a circular button. There are 2 columns of responses, 2 options in the 
                        first column and 1 option in the second column. Read as rows (left to right) the option order for the first 
                        row is A, B; the second row is C.

Example: Demonstrates class="qti-choices-stacking-2 qti-orientation-horizontal"

<qti-choice-interaction 
  class="qti-choices-stacking-2 qti-orientation-horizontal"
   max-choices="1" shuffle="false" response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 25 Expected Rendering: Choices are displayed in two columns, Choices are in "Z" visual order.
@@@
3.2.2.7 Choice with No Input Control

To specify choice rendering with no input control (radio/checkbox), use the class attribute as follows:

Values
qti-input-control-hidden Hide the input controls of the choices.

When input controls are hidden, delivery systems should ensure that choice presentation follows WCAG 2.0 AA (or better) guidelines for text and images. Hidden in the context of input controls is intended to mean that the controls are only visually hidden – the controls MUST be available programmatically (available for assistive technology).

Example: Demonstrates class="qti-input-control-hidden"

<qti-choice-interaction 
  class="qti-input-control-hidden"
   max-choices="1"    response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 26 Expected Rendering: Choices without input controls (all choices unselected).
3 response options with no buttons are presented though there are uppercase ascending 
                        letters next to each choice. Each response option is surrounded by a thin blue line where the 
                        whole response option becomes the 'button.'
Figure 27 Choices without input controls (second choice selected).
3 response options with no buttons are presented and there are no letters 
                        or numbers next to any of the choices. Each response option is surrounded by a thin 
                        blue line where the whole response option becomes the 'button.'

Note: The above two examples include choice labels (A., B., etc.).  This is not a part of the expected rendering when qti-input-control-hidden is specified.  Delivery platforms may choose a different labeling style except in the case where shared labeling vocabulary is specified.

Example: Demonstrates class="qti-input-control-hidden qti-labels-none"

<qti-choice-interaction 
  class="qti-input-control-hidden qti-labels-none"
   max-choices="1" shuffle="false"    response-identifier="RESPONSE">
    <qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
    <qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
  </qti-choice-interaction>
Figure 28 Expected Rendering: Choices without input controls and no labels.
@@@
3.2.2.8 Choice Interaction Custom max|min-choices Messages

To specify custom max-choices or min-choices messages, use a data- attribute as follows:

Values
data-max-selections-message Custom message to be rendered by the delivery platform upon violation of the max-choices constraint.
data-min-selections-message Custom message to be rendered by the delivery platform upon violation of the min-choices constraint.

In the absence of such custom message overrides, delivery systems should render platform defaults.

3.2.3 Text Entry Interaction

A Text Entry Interaction is an inline interaction that obtains a simple piece of text from the candidate. Like qti-inline-choice-interaction, the delivery engine must allow the candidate to review their choice within the context of the surrounding text.

The TextEntryInteraction.Type (qti-text-entry-interaction) must be bound to a response variable with single or record cardinality only. If the response variable has single cardinality the base-type must be one of string, integer or float; if it has record cardinality the permitted fields are 'stringValue', 'floatValue', etc.

TextEntryInteraction Attributes (element: qti-text-entry-interaction)

Name Usage Value(s) Default
response-identifier required Identifier
base optional xs:int Default is 10.
string-identifier optional Identifier of a qti-response-declaration with base-type=string
expected-length optional Non-negative integer
pattern-mask optional string
placeholder-text optional string
format optional Normalized string

The bulk of the shared vocabulary for this interaction adds further definition to the presentation width of the input element by utilizing the class attribute.

3.2.3.1 Input Width

For input element width definition, use the class attribute as follows:

Values
qti-input-width-1 Input element width at least 1 character.
qti-input-width-2 Input element width at least 2 characters.
qti-input-width-3 Input element width at least 3 characters.
qti-input-width-4 Input element width at least 4 characters.
qti-input-width-6 Input element width at least 6 characters.
qti-input-width-10 Input element width at least 10 characters.
qti-input-width-15 Input element width at least 15 characters.
qti-input-width-20 Input element width at least 20 characters.
qti-input-width-72 Input element width at least 72 characters. (Intended to be interpreted as the full width of a tablet.)

The input element widths are intended to provide a general visual impression, and are not expected to exactly match the width of the designated characters. By default, in the absence of any shared vocabulary, the presentation width of the input element is left to the implementer.

Example: Demonstrates various "qti-input-width-1 | 2 | 3 | 4 | 6 | 10 | 15 | 20 | 72" classes

<p>qti-input-width-1 : <qti-text-entry-interaction class="qti-input-width-1"
 expected-length="15" response-identifier="RESPONSE1"/></p>
<p>qti-input-width-2 : <qti-text-entry-interaction class="qti-input-width-2"
 expected-length="15" response-identifier="RESPONSE2"/></p>
<p>qti-input-width-3 : <qti-text-entry-interaction class="qti-input-width-3"
 expected-length="15" response-identifier="RESPONSE3"/></p>
<p>qti-input-width-4 : <qti-text-entry-interaction class="qti-input-width-4"
 expected-length="15" response-identifier="RESPONSE4"/></p>
<p>qti-input-width-6 : <qti-text-entry-interaction class="qti-input-width-6"
 expected-length="15" response-identifier="RESPONSE5"/></p>
<p>qti-input-width-10: <qti-text-entry-interaction class="qti-input-width-10"
 expected-length="15" response-identifier="RESPONSE6"/></p>
<p>qti-input-width-15: <qti-text-entry-interaction class="qti-input-width-15"
 expected-length="15" response-identifier="RESPONSE7"/></p>
<p>qti-input-width-20: <qti-text-entry-interaction class="qti-input-width-20"
 expected-length="20" response-identifier="RESPONSE8"/></p>
<p>qti-input-width-72: <qti-text-entry-interaction class="qti-input-width-72"
 expected-length="72" response-identifier="RESPONSE9"/></p>
Figure 29 Expected Rendering: Visual input widths at least a minimum number of characters wide.
9 different rows, with different text entry boxes representing the different widths 
                        expressed in the shared vocabulary classes. The text boxes are empty.
Figure 30 With Characters Entered.
9 different rows, with different text entry boxes representing the different widths 
                        expressed in the shared vocabulary classes. The text boxes are filled with M characters equal 
                        to the class name width (e.g. qti-input-width-10 has 10 M characters in the box).
3.2.3.2 Custom Pattern Mask Message

To specify a custom pattern mask message, use a data- attribute as follows:

Values
data-patternmask-message Custom message to be rendered by the delivery platform upon violation of the pattern mask constraints.

Example: Demonstrates data-patternmask-message

<p>
 qti-input-width-6, pattern-mask=([0-9.]{0,6}), data-patternmask-message:<br /> 
<div role="math">
 <math xmlns="http://www.w3.org/1998/Math/MathML">
   <mrow> <mn>14</mn> <mo class="sign">×</mo> 
<mrow> <mi>tan</mi> <mo></mo> <mfenced> 
<mrow> <mn>67</mn> </mrow> </mfenced> </mrow>
   </mrow>
 </math> = <qti-text-entry-interactionclass="qti-input-width-6" expected-length="6"
 pattern-mask="([0-9.]{0,6})" data-patternmask-message="Maximum of 6 digits or a decimal
 point permitted"  response-identifier="RESPONSE"/>
  </div>
</p>
Figure 31 Expected Rendering: Display the custom message when invalid input entered.
A math problem is shown with a text entry box. The box has 6 numbers in it with a pop up box pointing to the text entry box that says, 
                        'Maximum of 6 digits or a decimal point permitted.'

3.2.4 Extended Text Interaction

If an extended written response is required from the candidate then the Extended Text Interaction (qti-extended-text-interaction) is appropriate. An extended text interaction is a block Interaction that allows the candidate to enter an extended amount of text.

ExtendedTextInteraction Attributes (element: qti-extended-text-interaction)

Name Usage Value(s) Default
base optional xs:int 10
string-identifier optional Identifier of a response variable with base-type=string
expected-length optional Non-negative integer
pattern-mask optional xs:string
placeholder-text optional xs:string
max-strings optional Non-negative integer
min-strings optional Non-negative integer 0 (unlimited)
expected-lines optional Non-negative integer
format optional

Vocabulary:• plain

• preformatted• xhtml

plain

The qti-extended-text-interaction must be bound to a response variable of single, multiple, ordered or record cardinality. If the response variable has record cardinality the fields in the record must be 'stringValue', 'floatValue', etc. Otherwise it must have a base-type of string, integer or float. When bound to response variable with single cardinality a single string of text is required from the candidate. When bound to a response variable with multiple or ordered cardinality several separate text strings may be required.

The shared vocabulary for the extended text interaction is intended to provide more precision when describing:

  1. Interaction height
  2. Character counter behavior
  3. Plain or Rich Text options
  4. A custom pattern-mask message

Responsive design implies that delivery systems should display an input area (typically, this will be a <textarea> or <div> html element) that has a width equal to 100% of the interaction's encapsulating container. Consequently, there is no shared vocabulary for overriding the width of this interaction.

3.2.4.1 Interaction Height

For input area height definition, use the class attribute as follows:

Values
qti-height-lines-3 Input area is approximately 3 lines tall.
qti-height-lines-6 Input area is approximately 6 lines tall.
qti-height-lines-15 Input area is approximately 15 lines tall.

The input element heights are intended to provide a general visual impression, and are not expected to exactly match the height of the designated lines. By default, in the absence of any shared vocabulary, the presentation height of the input element is left to the implementer.

Example: Demonstrates format="plain" and class="qti-height-lines-3"

<qti-extended-text-interaction class="qti-height-lines-3" format="plain" response-identifier="RESPONSE" />
Figure 32 Expected Rendering: Display a plain input area with a height of 3 lines.
A text entry box is shown. The box is the full width of the containing box. 
                        There are 3 lines of text displayed in the box, where the bottom of the box is just below the third line of text.

Example: Demonstrates format="xhtml" and class="qti-height-lines-3"

<qti-extended-text-interaction class="qti-height-lines-3" format="xhtml" expected-length="200" response-identifier="RESPONSE" />
Figure 33 Expected Rendering: Display a Rich Text Editor with input area height of 3 lines.
A text entry box is shown with 3 lines of text. The box is the full width of the containing box. 
                        On the top of the text entry box is a bar containing editing buttons (bold, italic, underline, bulleted list, 
                        numeric list, undo, redo).

Example: Demonstrates format="plain" and class="qti-height-lines-6"

<qti-extended-text-interaction class="qti-height-lines-6" format="plain" response-identifier="RESPONSE" />
Figure 34 Expected Rendering: Display a plain input area with height of 6 lines.
A text entry box is shown. The box is the full width of the containing box. 
                        There are 4 lines of text displayed in the box, where the bottom of the box is just below the sixth line of text.

Example: Demonstrates format="xhtml" and class="qti-height-lines-6"

<qti-extended-text-interaction class="qti-height-lines-6" format="xhtml" expected-length="200" response-identifier="RESPONSE" />
Figure 35 Expected Rendering: Display a Rich Text Editor with input area height of 6 lines.
A text entry box is shown with 6 lines of text. The box is the full width of the containing box. 
                        On the top of the text entry box is a bar containing editing buttons (bold, italic, underline, bulleted 
                        list, numeric list, undo, redo).

Example: Demonstrates format="plain" and class="qti-height-lines-15"

<qti-extended-text-interaction class="qti-height-lines-15" format="plain" response-identifier="RESPONSE" />
Figure 36 Expected Rendering: Display a plain input area with height of 15 lines.
A text entry box is shown. The box is the full width of the containing box. There are 15 
                        lines of text displayed in the box, where the bottom of the box is just below the fifteenth line of text.

Example: Demonstrates format="xhtml" and class="qti-height-lines-15"

<qti-extended-text-interaction class="qti-height-lines-15" format="xhtml" expected-length="200" response-identifier="RESPONSE" />
Figure 37 Expected Rendering: Display a Rich Text Editor with input area height of 15 lines.
A text entry box is shown with 15 lines of text. The box is the full width of the containing box. 
                        On the top of the text entry box is a bar containing editing buttons (bold, italic, underline, bulleted list, 
                        numeric list, undo, redo).
3.2.4.2 Character Counter Behavior

By default, a character counter is not displayed. For specifying character (not word) counter display and behavior, use the class attribute as follows:

Values
qti-counter-down Display a character counter, starting at the value of the expected-length attribute and counting down to 0.
qti-counter-up Display a character counter, starting at 0 and increasing to the value of the expected-length attribute.

In the case where the format of the interaction is "xhtml", the delivery system is expected to count only the text of the markup elements.  Example: <span>Hello</span> has 5 characters.

Example: Demonstrates qti-counter-down

<qti-extended-text-interaction class="qti-height-lines-3 qti-counter-down" format="plain" expected-length="200" response-identifier="RESPONSE" />
Figure 38 Expected Rendering: Display a character counter counting down from 200 characters.
A text entry box is shown with a sentence in it that is 45 characters long. Below the entry box is a 
                        small box displaying the text '45 / 200'.

Example: Demonstrates qti-counter-up

<qti-extended-text-interaction class="qti-height-lines-3 qti-counter-up" format="plain" expected-length="200" response-identifier="RESPONSE" />
Figure 39 Expected Rendering: Display a character counter counting up from 0 to 200 characters.
A text entry box is shown with a sentence in it that is 45 characters long. 
                        Below the simple text editor bar is a small box displaying the text '45 / 200'.

Example: Demonstrates qti-counter-up with format="xhtml"

<qti-extended-text-interaction class="qti-height-lines-3 qti-counter-up" format="xhtml" expected-length="200" response-identifier="RESPONSE" />
Figure 40 Expected Rendering: Display a character counter counting up from 0 to 200 characters.
A text entry box is shown with a sentence in it that is 45 characters long. One of the words is bolded, 
                        one is italic, and one is underlined. Within the rich text editor bar is a small box displaying the text '45 / 200'.
3.2.4.3 Custom Pattern Mask Message

To specify a custom pattern mask message, use a data- attribute as follows:

Values
data-patternmask-message Custom message to be rendered by the delivery platform upon violation of the pattern mask constraints.

Example: Demonstrates data-patternmask-message

<p>
    qti-expected-length=6<br />patternmask=([0-9.]{0,6})<br />
    data-patternmask-message="Maximum of 6 digits or a decimal point permitted"
  </p>
  <div role="math">
  <qti-extended-text-interaction class="qti-height-lines-3" pattern-mask="([0-9.]{0,6})"           
  data-patternmask-message="Maximum of 6 digits or a decimal point permitted"
     format="plain" expected-length="6" response-identifier="RESPONSE">
     <qti-prompt><p><math xmlns="http://www.w3.org/1998/Math/MathML">
          <mrow> <mn>14</mn> <mo class="sign">×</mo> 
  <mrow> <mi>tan</mi> <mo></mo> <mfenced> <mrow> <mn>67</mn> </mrow> </mfenced> </mrow>
          </mrow> 
        </math> =</p></qti-prompt>
  </qti-extended-text-interaction>
  </div>
Figure 41 Expected Rendering: Display the custom message when invalid input entered.
A math problem is shown with a text entry box. The box has 6 numbers in it with a pop up box 
                        pointing to the text entry box that says, 'Maximum of 6 digits or a decimal point permitted.'

3.2.5 Gap Match Interaction

A gap match interaction is a block Interaction that contains a number of gaps that the candidate can fill from an associated set of choices. The candidate must be able to review the content with the gaps filled in context, as indicated by their choices.

The GapMatchInteraction.Type (qti-gap-match-interaction)  is similar to Match Interaction (qti-match-interaction) except that the choices in the second set are gaps (qti-gap) in a given passage of text and the task involves selecting choices from the first set and using them to fill the gaps. The same attributes are involved in controlling which, and how many, pairings are allowed, though there is no match-max attribute for the gaps because they can only ever have one associated choice. The scoring is again done with a mapping.

GapMatchInteration Attributes (element: qti-gap-match-interaction)

Name Usage Value(s) Default
max-associations optional Non-negative number 1
min-associations optional Non-negative number
shuffle optional boolean false

Sub-elements include qti-gap-text (GapText.Type) and qti-gap-img (GapImg.Type).

GapText Attributes (element: qti-gap-text)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier of a template variable used to control the visibility of the qti-gap-text
show-hide optional Vocabulary:• show• hide show
match-group optional IdentifierList
match-max required Non-negative integer
match-min optional Non-negative integer 0 (unlimited)

The qti-gap-img contains a single HTML object element.

GapImg Attributes (element: qti-gap-img)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier of a template variable used to control the visibility of the qti-gap-img
show-hide optional Vocabulary:• show• hide show
match-group optional IdentifierList
match-max required Non-negative integer, 0 means unlimited
match-min optional Non-negative integer <= match-max 0
object-label optional string
top optional empty
left optional empty

Additional formatting may be applied within the qti-gap-text element allowing for a greater variation.' Allowed formats include:

'br', 'img', 'xi:include', 'm:math', 'object', 'qti-printed-variable', 'a', 'abbr', 'acronym', 'b', 'big', 'cite', 'code', 'dfn', 'em', 'qti-feedback-inline', 'i', 'kbd', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'tt', 'var', 'qti-template-inline', 'bdi', 'bdo', 'label', 'ruby', 'ssml11:*'.

The qti-gap-match-interaction must be bound to a response variable with base-type directedPair and either single or multiple cardinality, depending on the number of gaps. The choices represent the source of the pairing and gaps the targets. Each gap can have at most one choice associated with it. The maximum occurrence of the choices is controlled by the match-max attribute of qti-gap-text or qti-gap-img.

The shared vocabulary for the Gap Match Interaction is intended to provide more precision when describing:

  1. Positioning of the Gap Choices container with respect to the passage of text containing the Gaps.
  2. Gap Choices container width.
  3. Gap element widths.
  4. Custom max|min-associations message overrides.
3.2.5.1 Gap Choices Container | Gap Positioning

For explicit gap choices container positioning with respect to the passage text containing the gaps, use the class attribute as follows:

Values
qti-choices-top The gap choices container is displayed above the passage text.
qti-choices-bottom The gap choices container is displayed below the passage text.
qti-choices-left The gap choices container is displayed to the left of the passage text.
qti-choices-right The gap choices container is displayed to the right of the passage text.

The following examples demonstrate shared vocabulary describing the visual orientation of the gap match choices container with respect to the passage text containing the gaps.

Example: Demonstrates class="qti-choices-top"

<qti-gap-match-interaction 
  class="qti-choices-top"
   response-identifier="RESPONSE" shuffle="false">
    <qti-gap-text identifier="W" match-max="1">winter</qti-gap-text>
    <qti-gap-text identifier="Sp" match-max="1">spring</qti-gap-text>
    <qti-gap-text identifier="Su" match-max="1">summer</qti-gap-text>
    <qti-gap-text identifier="A" match-max="1">autumn</qti-gap-text>
    <blockquote>
      <p>
        Now is the <qti-gap identifier="G1"/> of our discontent<br/>
        Made glorious <qti-gap identifier="G2"/> by this sun of York;<br/> 
        And all the clouds that lour'd upon our house<br/>
        In the deep bosom of the ocean buried.
      </p>
    </blockquote>
  </qti-gap-match-interaction>
Figure 42 Expected Rendering: The gap choices are displayed above the passage text.
There are 4 words within scored rectangles set side-by-side with each other. 
                        Below these boxed words are 4 lines of text including 2 inline rectangles (drop targets).

Example: Demonstrates class="qti-choices-bottom"

<qti-gap-match-interaction 
  class="qti-choices-bottom"
   response-identifier="RESPONSE" shuffle="false">
    <qti-gap-text identifier="W" match-max="1">winter</qti-gap-text>
    <qti-gap-text identifier="Sp" match-max="1">spring</qti-gap-text>
    <qti-gap-text identifier="Su" match-max="1">summer</qti-gap-text>
    <qti-gap-text identifier="A" match-max="1">autumn</qti-gap-text>
    <blockquote>
      <p>
        Now is the <qti-gap identifier="G1"/> of our discontent<br/>
        Made glorious <qti-gap identifier="G2"/> by this sun of York;<br/> 
        And all the clouds that lour'd upon our house<br/>
        In the deep bosom of the ocean buried.
      </p>
    </blockquote>
  </qti-gap-match-interaction>
Figure 43 Expected Rendering: The gap choices are displayed below the passage text.
There are 4 lines of text including 2 inline rectangles (drop targets). Below this text are 
                        4 words within scored rectangles set side-by-side with each other.

Example: Demonstrates class="qti-choices-left"

<qti-gap-match-interaction 
  class="qti-choices-left"
   response-identifier="RESPONSE" shuffle="false">
    <qti-gap-text identifier="W" match-max="1">winter</qti-gap-text>
    <qti-gap-text identifier="Sp" match-max="1">spring</qti-gap-text>
    <qti-gap-text identifier="Su" match-max="1">summer</qti-gap-text>
    <qti-gap-text identifier="A" match-max="1">autumn</qti-gap-text>
    <blockquote>
      <p>
        Now is the <qti-gap identifier="G1"/> of our discontent<br/>
        Made glorious <qti-gap identifier="G2"/> by this sun of York;<br/> 
        And all the clouds that lour'd upon our house<br/>
        In the deep bosom of the ocean buried.
      </p>
    </blockquote>
  </qti-gap-match-interaction>
Figure 44 Expected Rendering: The gap choices are displayed to the left of the passage text.
There are 4 words within scored rectangles set side-by-side with each other. Next to, on the 
                        right side of these boxed words is a block of 4 lines of text including 2 inline rectangles (drop targets).

Example: Demonstrates class="qti-choices-right"

<qti-gap-match-interaction 
  class="qti-choices-right"
   response-identifier="RESPONSE" shuffle="false">
    <qti-gap-text identifier="W" match-max="1">winter</qti-gap-text>
    <qti-gap-text identifier="Sp" match-max="1">spring</qti-gap-text>
    <qti-gap-text identifier="Su" match-max="1">summer</qti-gap-text>
    <qti-gap-text identifier="A" match-max="1">autumn</qti-gap-text>
    <blockquote>
      <p>
        Now is the <qti-gap identifier="G1"/> of our discontent<br/>
        Made glorious <qti-gap identifier="G2"/> by this sun of York;<br/> 
        And all the clouds that lour'd upon our house<br/>
        In the deep bosom of the ocean buried.
      </p>
    </blockquote>
  </qti-gap-match-interaction>
Figure 45 Expected Rendering: The gap choices are displayed to the right of the passage text.
There is a block of 4 lines of text including 2 inline rectangles (drop targets). Next to, on the 
                        right side of the block of text are 4 words within scored rectangles set side-by-side with each other.
3.2.5.2 Gap Choices Container Width

A common implementation of the gap match interaction is to place the gap choices in a so-called "gap choices container".  If the gap choices are implemented with responsive design, then one can achieve a visual equivalent of gap choices stacking by manipulating the gap choices container width.

For specifying explicit gap choices container width, use a data- attribute as follows:

Values
data-choices-container-width The gap choices container width in pixels.  Example: data-choices-container-width="100"

The assumption is that the container sizes would scale when content is magnified. There is likely to be a significant decrease in the ability for low-vision users to respond to the item who may magnify the content large enough to have portions of the container displayed off-screen.

Example: Demonstrates qti-choices-top and data-choices-container-width="200"

<qti-gap-match-interaction class="qti-choices-top
  "data-choices-container-width="200"
   response-identifier="RESPONSE" shuffle="false">
    <qti-gap-text identifier="W" match-max="1">winter</qti-gap-text>
    <qti-gap-text identifier="Sp" match-max="1">spring</qti-gap-text>
    <qti-gap-text identifier="Su" match-max="1">summer</qti-gap-text>
    <qti-gap-text identifier="A" match-max="1">autumn</qti-gap-text>
    <blockquote>
      <p>
        Now is the <qti-gap identifier="G1"/> of our discontent<br/>
        Made glorious <qti-gap identifier="G2"/> by this sun of York;<br/> 
        And all the clouds that lour'd upon our house<br/>
        In the deep bosom of the ocean buried.
      </p>
    </blockquote>
  </qti-gap-match-interaction>
Figure 46 Expected Rendering: The gap choices container is set to width of 200px, resulting in a stacking effect.
There are 4 words within scored boxes set 2 boxes on top of 2 other boxes. Below these 
                        boxed words are 4 lines of text including 2 inline rectangles (drop targets).

Example: Demonstrates qti-choices-left and data-choices-container-width="100"

<qti-gap-match-interaction class="qti-choices-left
  "data-choices-container-width="200"
   response-identifier="RESPONSE" shuffle="false">
    <qti-gap-text identifier="W" match-max="1">winter</qti-gap-text>
    <qti-gap-text identifier="Sp" match-max="1">spring</qti-gap-text>
    <qti-gap-text identifier="Su" match-max="1">summer</qti-gap-text>
    <qti-gap-text identifier="A" match-max="1">autumn</qti-gap-text>
    <blockquote>
      <p>
        Now is the <qti-gap identifier="G1"/> of our discontent<br/>
        Made glorious <qti-gap identifier="G2"/> by this sun of York;<br/> 
        And all the clouds that lour'd upon our house<br/>
        In the deep bosom of the ocean buried.
      </p>
    </blockquote>
  </qti-gap-match-interaction>
Figure 47 Expected Rendering: The gap choices container is set to width of 100px, resulting in a stacking effect.
There are 4 words within boxes set one on top of another (a single column, one box per row). 
                          Next to, on the right side of these boxed words is a block of 4 lines of text including 2 inline rectangles (drop targets).
3.2.5.3 Gap Element Input Width

For gap element width definition, use the class attribute as follows:

Values
qti-input-width-1 Gap element width at least 1 character.
qti-input-width-2 Gap element width at least 2 characters.
qti-input-width-3 Gap element width at least 3 characters.
qti-input-width-4 Gap element width at least 4 characters.
qti-input-width-6 Gap element width at least 6 characters.
qti-input-width-10 Gap element width at least 10 characters.
qti-input-width-15 Gap element width at least 15 characters.
qti-input-width-20 Gap element width at least 20 characters.
qti-input-width-72

Gap element width at least 72 characters.

(Intended to be interpreted as the full width of a tablet.)

The gap element widths are intended to provide a general visual impression. By default, in the absence of any shared vocabulary, the presentation width of a gap element is left to the implementer.

Note that the assumption is that input sizes scale with increased magnification of the content, though the input areas should never wrap to another line of text. Limits on scaling could be problematic for low-vision candidates, particularly at higher levels of magnification.

Example: Demonstrates all gap element "qti-input-widths-1 | 2 | 3 | 4 | 6 | 10 | 15 | 20 | 72" classes.

<qti-gap-match-interaction class="qti-choices-top" response-identifier="RESPONSE4">
    <qti-gap-text identifier="gt1" match-max="1">M</qti-gap-text>
    <qti-gap-text identifier="gt2" match-max="1">MM</qti-gap-text>
    <qti-gap-text identifier="gt3" match-max="1">MMM</qti-gap-text>
    <qti-gap-text identifier="gt4" match-max="1">MMMM</qti-gap-text>
    <qti-gap-text identifier="gt6" match-max="1">MMMMMM</qti-gap-text>
    <p>
      qti-input-width-1 :  <qti-gap class="qti-input-width-1"  identifier="G1"/><br />
      qti-input-width-2 :  <qti-gap class="qti-input-width-2"  identifier="G2"/><br />
      qti-input-width-3 :  <qti-gap class="qti-input-width-3"  identifier="G3"/><br />
      qti-input-width-4 :  <qti-gap class="qti-input-width-4"  identifier="G4"/><br />
      qti-input-width-6 :  <qti-gap class="qti-input-width-6"  identifier="G6"/><br />
      qti-input-width-10 : <qti-gap class="qti-input-width-10" identifier="G10"/><br />
      qti-input-width-15 : <qti-gap class="qti-input-width-15" identifier="G15"/><br />
      qti-input-width-20 : <qti-gap class="qti-input-width-20" identifier="G20"/><br />
      qti-input-width-72 : <qti-gap class="qti-input-width-72" identifier="G72"/>
    </p>
  </qti-gap-match-interaction>
Figure 48 Expected Rendering: Visual gap widths at least a minimum number of characters wide.
There are 5 words within scored rectangles set side-by-side with each other, each 
                        word has a different number of characters where the boxes get larger to fit the amount of 
                        characters. Below these boxed words are 9 lines of text each with different sized rectangles 
                        (drop targets). There is nothing in any of the drop targets.

Figure 49 With some of the gaps filled:
There are 9 lines of text each with different sized rectangles (drop targets). 
                        There are 5 boxes with text (of different lengths) dropped in different drop targets.
3.2.5.4 Gap Match Custom max|min-associations Messages

To specify custom max-associations or min-associations messages, use a data- attribute as follows:

Values
data-max-selections-message Custom message to be rendered by the delivery platform upon violation of the max-associations constraint.
data-min-selections-message Custom message to be rendered by the delivery platform upon violation of the min-associations constraint.

In the absence of such custom message overrides, delivery systems should render platform defaults.

3.2.6 Hotspot

A HotspotInteraction.Type (qti-hotspot-interaction) is a graphical interaction with a corresponding set of choices that are defined as areas of the graphic image. The candidate's task is to select one or more of the areas (hotspots).

The hotspot interaction should only be used when the spatial relationship of the choices with respect to each other (as represented by the graphic image) is important to the needs of the item. Otherwise, Choice Interaction should be used instead with separate material for each option.

The delivery engine must clearly indicate selected hotspots when such hotspots are selected.  If the Shared Vocabulary class qti-unselected-hidden is present, the delivery engine must hide the hotspots in their unselected and unfocused state.  If the qti-unselected-hidden is not present, indicating hotspots in their unselected and unfocused state is left to the delivery engine.

HotspotInteraction Attributes (element: qti-hotspot-interaction)

Name Usage Value(s) Default
max-choices optional Non-negative number 1
min-choices optional Non-negative number 0 (unlimited)

The sub-element sequence for the qti-hotspot-interaction:

  1. object (must have only 1)
  2. qti-hotspot-choice (at least 1)

HotspotChoice Attributes (element: qti-hotspot-choice)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier of a template variable used to control the visibility of the qti-hotspot-choice
show-hide optional Vocabulary:• show• hide show
shape required Vocabulary:• circle• default• ellipse• poly• rect
coords required Coords.Type
hotspot-label optional string

The hotspot interaction must be bound to a response variable with a base-type of identifier and single or multiple cardinality.

The shared vocabulary for the Hotspot Interaction is intended to provide more precision when describing:

  1. Hotspot Selections theming.
  2. Custom max|min-choices message overrides.
3.2.6.1 Hotspot Selections Theming

For explicit hotspot selection theming, use the class attribute as follows:

Values
qti-selections-light Delivery platform must implement hotspot selections in a color that the platform believes to be of suitable color contrast and opacity against a "dark" background image.
qti-selections-dark Delivery platform must implement hotspot selections in a color that the platform believes to be of suitable color contrast and opacity against a "light" background image.
qti-unselected-hidden Hotspot selections are visually hidden until focused or selected.

When using qti-selections-dark and qti-selections-light classes, the intent is to increase the contrast between the selections and the background, to ensure candidates can clearly identify the selections.  In the absence of such hotspot selection theming overrides, delivery systems should render platform defaults.

For qti-unselected-hidden, note that there is an obvious visual bias for these types of questions. In addition, the selection should only be visually-hidden. Selections should always be programmatically available (usable by keyboards and assistive technology) to candidates.

Example: Demonstrates Hotspot selections with class="qti-selections-light" and class="qti-selections-dark"

<qti-hotspot-interaction 
  class="qti-selections-light"
   max-choices="0" response-identifier="RESPONSE1">
    <object data="ukair.png" height="280" type="image/png" width="206">UK Map</object>
    <qti-hotspot-choice coords="77,115,10" identifier="A" shape="circle"/>
    <qti-hotspot-choice coords="118,184,10" identifier="B" shape="circle"/>
    <qti-hotspot-choice coords="150,235,10" identifier="C" shape="circle"/>
    <qti-hotspot-choice coords="96,114,10" identifier="D" shape="circle"/>
  </qti-hotspot-interaction>
  <qti-hotspot-interaction class="qti-selections-dark" max-choices="0" 
  response-identifier="RESPONSE2">
    <object data="ukair.png" height="280" type="image/png" width="206">UK Map</object>
    <qti-hotspot-choice coords="77,115,10" identifier="A" shape="circle"/>
    <qti-hotspot-choice coords="118,184,10" identifier="B" shape="circle"/>
    <qti-hotspot-choice coords="150,235,10" identifier="C" shape="circle"/>
    <qti-hotspot-choice coords="96,114,10" identifier="D" shape="circle"/>
  </qti-hotspot-interaction>

Expected Rendering: Hotspot selections are rendered with colors and opacities of the delivery platform's choosing. In the two hotspot interactions below, two of the four hotspots are selected, and two are unselected. All hotspots are visible, even in their unselected state, though this is left to the delivery platform.

Figure 50 Hotspot image showing orange lined circles in their selected and unselected states.
There are 2 line drawings of the United Kingdom. Each drawing has 4 circles. 
                          2 of each of the 4 circles are shown with thin lines, and 2 with thick lines. The first drawing 
                          has orange lined circles.
Figure 51 Hotspot image showing blue lined circles in their selected and unselected states.
The second drawing has blue lined circles.

Example: Demonstrates Hotspot selections with class= " qti-selections-light "  and class= " qti-selections-dark " , and " qti-unselected-hidden "  in both.

<qti-hotspot-interaction 
  class="qti-selections-light qti-unselected-hidden"
   max-choices="0" response-identifier="RESPONSE1">
    <object data="ukair.png" height="280" type="image/png" width="206">UK Map</object>
    <qti-hotspot-choice coords="77,115,10" identifier="A" shape="circle"/>
    <qti-hotspot-choice coords="118,184,10" identifier="B" shape="circle"/>
    <qti-hotspot-choice coords="150,235,10" identifier="C" shape="circle"/>
    <qti-hotspot-choice coords="96,114,10" identifier="D" shape="circle"/>
  </qti-hotspot-interaction>
  <qti-hotspot-interaction class="qti-selections-dark qti-unselected-hidden"
   max-choices="0" response-identifier="RESPONSE2">
    <object data="ukair.png" height="280" type="image/png" width="206">UK Map</object>
    <qti-hotspot-choice coords="77,115,10" identifier="A" shape="circle"/>
    <qti-hotspot-choice coords="118,184,10" identifier="B" shape="circle"/>
    <qti-hotspot-choice coords="150,235,10" identifier="C" shape="circle"/>
    <qti-hotspot-choice coords="96,114,10" identifier="D" shape="circle"/>
  </qti-hotspot-interaction>

Expected Rendering: Hotspots are rendered invisible in their unselected and unfocused state, with visible colors and opacities of the platform's choosing in their selected state. In the two hotspot interactions below, two of the four hotspots are selected (visible), and two are unselected and unfocused (invisible).

Figure 52 Hotspot image showing orange lined circles in their selected states.
There are 2 line drawings of the United Kingdom. Each drawing has 2 colored circles. 
                          The first drawing has orange lined circles.
Figure 53 Hotspot image showing blue lined circles in their selected states.
The second drawing has blue lined circles.

3.2.6.2 Hotspot  Interaction Custom max|min-choices Messages

To specify custom max-choices or min-choices messages, use a data- attribute as follows:

Values
data-max-selections-message Custom message to be rendered by the delivery platform upon violation of the max-choices constraint.
data-min-selections-message Custom message to be rendered by the delivery platform upon violation of the min-choices constraint.

In the absence of such custom message overrides, delivery systems should render platform defaults.

3.2.7 Hot Text

The HotTextInteraction.Type (qti-hottext-interaction) presents a set of choices to the candidate represented as selectable runs of text embedded within a surrounding context, such as a simple passage of text. Like Choice Interaction, the candidate's task is to select one or more of the choices, up to a maximum of max-choices.

The interaction is initialized from the qti-default-value of the associated response variable, a NULL value indicating that no choices are selected (the usual case).

HotTextInteraction Attributes (element: qti-hottext-interaction)

Name Usage Value(s) Default
min-choices optional Non-negative integer 0 (unlimited)
max-choices optional Non-negative integer 1

The qti-hottext-interaction must be bound to a response variable with a base-type of identifier and single or multiple cardinality.

The shared vocabulary for the Hot Text Interaction is intended to provide more precision when describing:

  1. Hiding the input control of the Hot Text choices.
  2. Custom max|min-choices message overrides.
3.2.7.1 Hot Text Choices with No Input Controls

To specify Hot Text choice rendering with no input control (radio/checkbox), use the class attribute as follows:

Values
qti-input-control-hidden Hide the input controls of the Hot Text choices.

When input controls are hidden, delivery systems should ensure that choice presentation follows WCAG 2.0 AA (or better) guidelines for text and images.  By default, in the absence of any shared vocabulary, the presentation of input controls on the Hot Text elements is left to the delivery system.

Example: Demonstrates class="qti-input-control-hidden"

<qti-hottext-interaction class="qti-input-control-hidden" max-choices="1" 
response-identifier="RESPONSE">
  <p>
    Sponsors of the Olympic Games <qti-hottext identifier="A">who bought</qti-hottext>
    advertising time on United States television <qti-hottext identifier="B">includes</qti-hottext> 
<qti-hottext identifier="C">at least</qti-hottext> a 
    dozen international firms <qti-hottext identifier="D">whose</qti-hottext> names 
    are familiar to American consumers. <qti-hottext identifier="E">No error.</qti-hottext>
  </p>
</qti-hottext-interaction>
Figure 54 Expected Rendering: Hot Text Choices without input controls (all choices unselected).
A sentence of text is shown. Some words are within boxes and the letters are colored blue instead of the unboxed words, which are black.
Figure 55 Hot Text Choices without input controls (second choice selected).
A sentence of text is shown. Some words are within boxes and the letters are colored 
                        blue instead of the unboxed words, which are black. The second word box is shown with a blue background and white letters.
3.2.7.2 Hot Text  Interaction Custom max|min-choices Messages

To specify custom max-choices or min-choices messages, use a data- attribute as follows:

Values
data-max-selections-message Custom message to be rendered by the delivery platform upon violation of the max-choices constraint.
data-min-selections-message Custom message to be rendered by the delivery platform upon violation of the min-choices constraint.

In the absence of such custom message overrides, delivery systems should render platform defaults.

3.2.8 Inline Choice

The InlineChoiceInteraction.Type (qti-inline-choice-interaction) is an inline interaction to display a set of simple text choices in context in a surrounding text, which may be subject to variable value substitution with qti-printed-variable.

InlineChoiceInteraction Attributes (element: qti-inline-choice-interaction)

Name Usage Value(s) Default
identifier required Identifier
required optional boolean

false

If true then a choice must be selected by the candidate in order to form a valid response to the interaction.

shuffle optional boolean false

The sub-element seCoolquence of qti-inline-choice-interaction is:

  1. qti-label (maximum of 1)
  2. qti-inline-choice (at least 1)

InlineChoice Attributes (element: qti-inline-choice)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier of a template variable used to control the visibility of the choice
show-hide optional Vocabulary:• show• hide show
fixed optional boolean false

When rendering an inline choice interaction, the common implementation is an embodiment of a <select> html form element or a combo box form control.  

Below is an example of an inline choice interaction that allows the candidate to select one answer option to respond to the prompt.

Example: qti-inline-choice-interaction

<qti-assessment-item xmlns="http://www.imsglobal.org/xsd/qti/imsqtiasi_v3p0" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.imsglobal.org/xsd/qti/imsqti_itemv3p0_v1p0 
  https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
  identifier="QTI3-inline-choice" time-dependent="false" xml:lang="eng-US">
    <qti-response-declaration base-type="identifier" cardinality="single" identifier="RESPONSE">
      <qti-correct-response>
        <qti-value>Y</qti-value>
      </qti-correct-response>
    </qti-response-declaration>
    <qti-outcome-declaration base-type="float" cardinality="single" identifier="SCORE"/>
    <qti-item-body>
      <p>Identify the missing word in this famous quote from Shakespeare's Richard III.</p>
      <blockquote>
        <p>Now is the winter of our discontent
        <br/>Made glorious summer by this sun of 
        <qti-inline-choice-interaction response-identifier="RESPONSE" shuffle="false">
          <qti-inline-choice identifier="G">Gloucester</qti-inline-choice>
          <qti-inline-choice identifier="L">Lancaster</qti-inline-choice>
          <qti-inline-choice identifier="Y">York</qti-inline-choice>
        </qti-inline-choice-interaction>;
        <br/>And all the clouds that lour'd upon our house
        <br/>In the deep bosom of the ocean buried.</p>
      </blockquote>
    </qti-item-body>
    <qti-response-processing template="https://purl.imsglobal.org/spec/qti/v3p0/rptemplates/match_correct.xml"/>
  </qti-assessment-item>
Figure 56 Expected Rendering: The inline choice interaction rendered inline (not block) with the surrounding inline markup.
A sentence of text is shown, with 4 lines of a poem below. 
                      The second line of the poem ends with a drop down box, with 3 choices displayed.

The bulk of the shared vocabulary for this interaction adds further definition to the presentation width of the selection element by utilizing the class attribute.

3.2.8.1 Input Width

For selection element width definition, use the class attribute as follows:

Values
qti-input-width-1 Selection element width at least 1 character.
qti-input-width-2 Selection element width at least 2 characters.
qti-input-width-3 Selection element width at least 3 characters.
qti-input-width-4 Selection element width at least 4 characters.
qti-input-width-6 Selection element width at least 6 characters.
qti-input-width-10 Selection element width at least 10 characters.
qti-input-width-15 Selection element width at least 15 characters.
qti-input-width-20 Selection element width at least 20 characters.
qti-input-width-72 Selection element width at least 72 characters.(Intended to be interpreted as the full width of a tablet.)

The selection element widths are intended to provide a general visual impression, and are not expected to exactly match the width of the designated characters. By default, in the absence of any shared vocabulary, the presentation width of the selection element is left to the implementer.

Example: Demonstrates various "qti-input-width-1 | 2 | 3 | 4 | 6 | 10 | 15 | 20 | 72" classes

<p>qti-input-width-1 : <qti-inline-choice-interaction class="qti-input-width-1"
  response-identifier="RESPONSE1"/></p>
  <p>qti-input-width-2 : <qti-inline-choice-interaction class="qti-input-width-2"
   response-identifier="RESPONSE2"/></p>
  <p>qti-input-width-3 : <qti-inline-choice-interaction class="qti-input-width-3"
   response-identifier="RESPONSE3"/></p>
  <p>qti-input-width-4 : <qti-inline-choice-interaction class="qti-input-width-4"
   response-identifier="RESPONSE4"/></p>
  <p>qti-input-width-6 : <qti-inline-choice-interaction class="qti-input-width-6"
   response-identifier="RESPONSE5"/></p>
  <p>qti-input-width-10: <qti-inline-choice-interaction class="qti-input-width-10"
   response-identifier="RESPONSE6"/></p>
  <p>qti-input-width-15: <qti-inline-choice-interaction class="qti-input-width-15"
   response-identifier="RESPONSE7"/></p>
  <p>qti-input-width-20: <qti-inline-choice-interaction class="qti-input-width-20"
   response-identifier="RESPONSE8"/></p>
  <p>qti-input-width-72: <qti-inline-choice-interaction class="qti-input-width-72"
   response-identifier="RESPONSE9"/></p>
Figure 57 Expected Rendering: Visual selection widths at least a minimum number of characters wide.
9 lines of text are shown, each ending with a different sized dropdown box. The width of the 
                        dropdown matches the number indicated in the QTI shared vocabulary class (e.g. qti-input-width-10 has a dropdown box 10 characters wide.
3.2.8.2 Custom Prompt Messages

Delivery systems may display a word or a phrase - a so-called, "prompt" - inside the boundaries of the selection element when the element is in an unselected state.  To specify custom text, use a data- attribute as follows:

Values
data-prompt Custom text to be rendered by the delivery platform when the selection element is in an unselected state.

In the absence of custom prompt overrides, delivery systems should render platform defaults.

Example: Demonstrates data-prompt

<qti-inline-choice-interaction class="qti-input-width-10" data-prompt="Select an Answer"
response-identifier="RESPONSE">
  <qti-inline-choice identifier="G">Gloucester</qti-inline-choice>
  <qti-inline-choice identifier="L">Lancaster</qti-inline-choice>
  <qti-inline-choice identifier="Y">York</qti-inline-choice>
</qti-inline-choice-interaction>
Figure 58 Expected Rendering: The custom prompt is displayed as the first choice.
A math equation is shown. A dropbox is displayed after the equals sign. The dropbox is open, 
                        and the default text displayed on the dropbox controls and the top of the choices is 'Select an Answer'.

3.2.9 Match

A MatchInteraction.Type (qti-match-interaction) is a blockInteraction that presents candidates with two sets of choices and allows them to create associations between pairs of choices in the two sets, but not between pairs of choices in the same set. Further restrictions can still be placed on the allowable associations using the match-max characteristic of the choices.

The sub-element within qti-match-interaction is qti-simple-match-set.   MatchInteration Attributes (element: qti-match-interaction)

Name Usage Value(s) Default
max-associations optional Non-negative number 1
min-associations optional Non-negative number
shuffle optional boolean false

The sub-element of qti-match-interaction is qti-simple-match-set (SimpleMatchSet.Type). The qti-simple-match-set has an optional "id" attribute which contains a UniqueIdentifier.Type. The qti-simple-match-set contains an ordered set of choices using qti-simple-associable-choice (SimpleAssociableChoice.Type) elements.

SimpleAssociableChoice Attributes (element: qti-simple-associable-choice)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier
show-hide optional Vocabulary:• show• hide show
match-group optional IdentifierList
match-max required Non-negative integer
match-min optional Non-negative integer 0 (unlimited)
fixed optional boolean false

The match interaction must be bound to a response variable with base-type directedPair and either single or multiple cardinality.

The shared vocabulary for the Match Interaction is intended to provide more precision when describing:

  1. Non-tabular Match Interaction positioning of the first Simple Match Set choices with respect to the second Simple Match Set choices.
  2. Tabular Match Interaction styling.
  3. Custom max|min-associations message overrides.
3.2.9.1 Non-Tabular Match Interaction Choice | Target Positioning

For explicit choice | target positioning, use the class attribute as follows:

Values
qti-choices-top The first Simple Match Set choices are displayed above the second Simple Match Set choices.
qti-choices-bottom The first Simple Match Set choices are displayed below the second Simple Match Set choices.
qti-choices-left The first Simple Match Set choices are displayed to the left of the second Simple Match Set choices.
qti-choices-right The first Simple Match Set choices are displayed to the right of the second Simple Match Set choices.

Note about accessibility when using targeting position classes: there may be issues related to the order that choices and targets are presented to assistive technology candidates. If the candidate is known to be using assistive technology (screen readers), by default the choices should be presented first, followed by the targets second.

The following examples demonstrate shared vocabulary describing the visual orientation of the list of match choices; i.e., the  choices of the first Simple Match Set, with respect to the list of match targets; i.e., the choices of the second Simple Match Set.

Example: Demonstrates class="qti-choices-top"

<qti-match-interaction class="
  qti-choices-top" max-associations="4" response-identifier="RESPONSE">
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="C" match-max="1">Capulet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="D" match-max="1">Demetrius</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="L" match-max="1">Lysander</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="P" match-max="1">Prospero</qti-simple-associable-choice>
    </qti-simple-match-set>
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="M" match-max="4">A Midsummer-Night's Dream</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="R" match-max="4">Romeo and Juliet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="T" match-max="4">The Tempest</qti-simple-associable-choice>
    </qti-simple-match-set>
  </qti-match-interaction>
Figure 59 Expected Rendering: The first Simple Match Set choices are displayed above the second Simple Match Set choices.
4 boxes with words in them are displayed side-by-side in a single row, where the line for the 
                        box and the letters of the words are blue. Below the word boxes are 3 large rectangles also displayed 
                        side-by-side in a single row, where the lines around the boxes and the letters of the words are dark grey.

Example: Demonstrates class="qti-choices-bottom"

<qti-match-interaction class="
  qti-choices-bottom" max-associations="4" response-identifier="RESPONSE">
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="C" match-max="1">Capulet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="D" match-max="1">Demetrius</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="L" match-max="1">Lysander</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="P" match-max="1">Prospero</qti-simple-associable-choice>
    </qti-simple-match-set>
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="M" match-max="4">A Midsummer-Night's Dream</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="R" match-max="4">Romeo and Juliet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="T" match-max="4">The Tempest</qti-simple-associable-choice>
    </qti-simple-match-set>
  </qti-match-interaction>
Figure 60 Expected Rendering: The first Simple Match Set choices are displayed below the second Simple Match Set choices.
There are 3 large rectangles with words in them displayed side-by-side in a single row, 
                        where the lines around the boxes and the letters of the words are dark grey. Below the large boxes 
                        are 4 smaller boxes with words in them also displayed side-by-side in a single row, where the line 
                        for the box and the letters of the words are blue.

Example: Demonstrates class="qti-choices-left"

<qti-match-interaction class="qti-choices-left" 
  max-associations="4" response-identifier="RESPONSE">
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="C" match-max="1">Capulet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="D" match-max="1">Demetrius</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="L" match-max="1">Lysander</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="P" match-max="1">Prospero</qti-simple-associable-choice>
    </qti-simple-match-set>
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="M" match-max="4">A Midsummer-Night's Dream</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="R" match-max="4">Romeo and Juliet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="T" match-max="4">The Tempest</qti-simple-associable-choice>
    </qti-simple-match-set>
  </qti-match-interaction>
Figure 61 Expected Rendering: The first Simple Match Set choices are displayed to the left of  the second Simple Match Set choices.
4 boxes with words in them are displayed side-by-side in a single row, where the 
                        line for the box and the letters of the words are blue. To the right of the blue boxes are 
                        3 large rectangles also displayed side-by-side in a single row, where the lines around the 
                        boxes and the letters of the words are dark grey.

Example: Demonstrates class="qti-choices-right"

<qti-match-interaction class="qti-choices-right" 
  max-associations="4" response-identifier="RESPONSE">
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="C" match-max="1">Capulet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="D" match-max="1">Demetrius</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="L" match-max="1">Lysander</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="P" match-max="1">Prospero</qti-simple-associable-choice>
    </qti-simple-match-set>
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="M" match-max="4">A Midsummer-Night's Dream</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="R" match-max="4">Romeo and Juliet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="T" match-max="4">The Tempest</qti-simple-associable-choice>
    </qti-simple-match-set>
  </qti-match-interaction>
Figure 62 Expected Rendering: The first Simple Match Set choices are displayed to the right of the second Simple Match Set choices.
There are 3 large rectangles with words in them displayed side-by-side in a single row, 
                        where the lines around the boxes and the letters of the words are dark grey. To the right of the 
                        large boxes are 4 smaller boxes with words in them also displayed side-by-side in a single row, 
                        where the line for the box and the letters of the words are blue.
3.2.9.2 Tabular Match Interactions

Delivery systems may implement Match Interaction's in a visual Tabular fashion. When they do so, the shared vocabulary is intended to provide visual styles and content to improve interoperability and visual consistency.

For explicit Tabular embodiments of Match Interactions, use the class attribute:

Values
qti-match-tabular Render a visual table with the choices of the first Simple Match Set as the table row headers, and the choices of the second Simple Match Set as the table column headers.
qti-header-hidden For certain presentations, it can be advantageous to hide the column headers.  This class enables this presentation.  Do not display the top row of the table where the column headers are displayed.

Class qti-header-hidden, and data- attribute data-first-column-header (see below) are only relevant when qti-match-tabular is specified.

To specify the text of the top-left header cell of the table, use a data- attribute as follows:

Values
data-first-column-header Custom text to be rendered in the top-left header cell of the table (headings must be visible).

A note about accessibility when using qti-match-tabular: there are known issues for assistive technology users (screen readers in particular) when putting content into tables. There are sometimes differences between screen readers in the order that content is read out loud. Because the cells contain interactive controls, assistive technology needs to be able to provide navigation within the table (between the cells) as well as coordinating the match interaction. If any possible candidates may be using screen readers to respond to match interactions, using HTML tables may not be the best choice for presentation.

In addition, there is a likely negative impact to assistive technology candidates when using the qti-header-hidden, as the headers are used to orient assistive technology users.

The following examples show expected rendering when class is qti-match-tabular.

Example: Demonstrates class="qti-match-tabular"

<qti-match-interaction class="
  qti-match-tabular" max-associations="4" response-identifier="RESPONSE">
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="C" match-max="1">Capulet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="D" match-max="1">Demetrius</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="L" match-max="1">Lysander</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="P" match-max="1">Prospero</qti-simple-associable-choice>
    </qti-simple-match-set>
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="M" match-max="4">A Midsummer-Night's Dream</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="R" match-max="4">Romeo and Juliet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="T" match-max="4">The Tempest</qti-simple-associable-choice>
    </qti-simple-match-set>
  </qti-match-interaction>
Figure 63 Expected Rendering: Tabular display, with the first Simple Match Set choices are displayed in the row headings, and the second Simple Match Set choices are the column headings.
A table 4 columns wide and 5 rows high is shown. The top, left cell is empty. 
                        The last 3 column headings contain play titles. The bottom 4 row headings contain play characters. 
                        The cells within the table contain rounded rectangle buttons.

Example: Demonstrates class="qti-match-tabular qti-header-hidden"

<qti-match-interaction class="qti-match-tabular qti-header-hidden" 
  max-associations="4" response-identifier="RESPONSE">
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="C" match-max="1">Capulet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="D" match-max="1">Demetrius</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="L" match-max="1">Lysander</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="P" match-max="1">Prospero</qti-simple-associable-choice>
    </qti-simple-match-set>
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="M" match-max="4">A Midsummer-Night's Dream</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="R" match-max="4">Romeo and Juliet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="T" match-max="4">The Tempest</qti-simple-associable-choice>
    </qti-simple-match-set>
  </qti-match-interaction>
Figure 64 Expected Rendering: Tabular display, with no table header row displayed.
A table 4 columns wide and 4 rows high is shown. There are no column headings displayed. 
                        The row headings contain play characters. The cells within the table contain rounded rectangle buttons.

Example: Demonstrates class="qti-match-tabular" data-first-column-header="Characters"

<qti-match-interaction class="qti-match-tabular" data-first-column-header="Characters"
   max-associations="4" response-identifier="RESPONSE">
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="C" match-max="1">Capulet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="D" match-max="1">Demetrius</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="L" match-max="1">Lysander</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="P" match-max="1">Prospero</qti-simple-associable-choice>
    </qti-simple-match-set>
    <qti-simple-match-set>
      <qti-simple-associable-choice identifier="M" match-max="4">A Midsummer-Night's Dream</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="R" match-max="4">Romeo and Juliet</qti-simple-associable-choice>
      <qti-simple-associable-choice identifier="T" match-max="4">The Tempest</qti-simple-associable-choice>
    </qti-simple-match-set>
  </qti-match-interaction>
Figure 65 Expected Rendering: Tabular display, with "Characters" in the top-left header cell.
A table 4 columns wide and 5 rows high is shown. The top, left cell has the word “Characters”. 
                        The last 3 column headings contain play titles. The bottom 4 row headings contain play characters. 
                        The cells within the table contain rounded rectangle buttons.
3.2.9.3 Match Custom max|min-associations Messages

To specify custom max-associations or min-associations messages, use a data- attribute as follows:

Values
data-max-selections-message Custom message to be rendered by the delivery platform upon violation of the max-associations constraint.
data-min-selections-message Custom message to be rendered by the delivery platform upon violation of the min-associations constraint.

In the absence of such custom message overrides, delivery systems should render platform defaults.

3.2.10 Order

In an OrderInteraction.Type (qti-order-interaction) the candidate's task is to reorder the choices, the order in which the choices are displayed initially is significant. By default the candidate's task is to order all of the choices but a subset of the choices can be requested using the max-choices and min-choices attributes. When specified the candidate must first select a (sub)set of the choices and then impose an ordering on them.

OrderInteraction Attributes (element: qti-order-interaction)

Name Usage Value(s) Default
min-choices optional Non-negative number
max-choices optional Non-negative number
orientation optional Vocabulary:• horizontal• vertical
shuffle optional false

The sub-element of qti-order-interaction is qti-simple-choice (SimpleChoice.Type) where there must be at least one qti-simple-choice in the interaction to be valid, and at least 2 choices to be useful as an order interaction.

SimpleChoice (element: qti-simple-choice) Attributes

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier
show-hide optional Vocabulary:• show• hide show
fixed optional boolean false
3.2.10.1 Order Target Labels

In certain rendering embodiments where the ordering choices are separated from an ordering target area (see 3.2.10.3 Ordering Choices | Ordering Target Container Positioning ), it may be desirable to specify labels for the order target elements.  For explicit labeling of order target elements, use the same classes as for choice interaction; i.e., use the class attribute as follows:

Values
qti-labels-none No labels displayed (default)
qti-labels-decimal Display numeric characters 1, 2, 3, …
qti-labels-lower-alpha Display lowercase characters a, b, c, …
qti-labels-upper-alpha Display uppercase characters A, B, C, …

In the absence of order target labeling, delivery systems should render platform defaults.

Example: Demonstrates qti-choices-top and qti-labels-none

<qti-order-interaction response-identifier="RESPONSE" class="qti-choices-top 
  qti-labels-none" orientation="horizontal">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 66 Expected Rendering: Order choices above the targets with no target labels displayed.
3 blue boxes with names in them are displayed side-by-side in a single row. 
                        Below the blue boxes are 3 larger grey boxes also displayed side-by-side in a single row, 
                        where the lines around the boxes are dark grey – there are no words in these boxes.

Example: Demonstrates qti-choices-top and qti-labels-decimal

<qti-order-interaction response-identifier="RESPONSE" class="qti-choices-top 
  qti-labels-decimal" orientation="horizontal">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 67 Expected Rendering: Order choices above the targets and order target visual labels are numeric.
A blue box with a name in it is displayed. Below the word boxes are 3 larger blue boxes 
                        also displayed side-by-side in a single row – there are ascending numbers at the top of these boxes. 
                        Within the first 2 grey boxes are blue boxes with names in them.

Example: Demonstrates qti-choices-top and qti-labels-lower-alpha

<qti-order-interaction response-identifier="RESPONSE" class="qti-choices-top 
  qti-labels-lower-alpha" orientation="horizontal">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 68 Expected Rendering: Order choices above the targets and order target visual labels are lowercase alphabetic.
A blue box with a name in it is displayed. Below the word boxes are 3 larger gray boxes 
                        also displayed side-by-side in a single row, where the lines around the boxes are dark grey – there 
                        are ascending lowercase letters at the top of these boxes. Within the first 2 grey boxes are blue boxes with names in them.

Example: Demonstrates qti-choices-top and qti-labels-upper-alpha

<qti-order-interaction response-identifier="RESPONSE" class="qti-choices-top 
  qti-labels-upper-alpha" orientation="horizontal">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 69 Expected Rendering: Order choices above the targets and order target visual labels are uppercase alphabetic.
A blue box with a name in it is displayed. Below the blue boxes are 3 larger grey boxes 
                        also displayed side-by-side in a single row – there are ascending uppercase letters at the top of 
                        these boxes. Within the first 2 grey boxes are blue boxes with names in them.
3.2.10.2 Order Target Label Suffixes

For explicit suffix labeling of order target elements, use the same classes as for choice interaction; i.e., use the class attribute as follows:

Values
qti-labels-suffix-none No character is displayed after the order target label.
qti-labels-suffix-period A period "." character is displayed after the order target label.
qti-labels-suffix-parenthesis A right parenthesis ")" character is displayed after the order target  label.

In the absence of order target suffix labeling, delivery systems should render platform defaults.

Example: Demonstrates qti-choices-left and qti-labels-decimal and qti-labels-suffix-none

<qti-order-interaction response-identifier="RESPONSE" class="qti-choices-left 
  qti-labels-decimal qti-labels-suffix-none" orientation="vertical">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 70 Expected Rendering: Orientation is vertical, order choices to the left of the targets, and order target visual labels are numeric with no label suffixes.
3 blue boxes with names in them are displayed one-above-the-other in a single column. 
                        To the right of the blue boxes are 3 larger grey boxes also displayed one-above-the-other in a single column – 
                        there are ascending numbers at the top of these boxes.

Example: Demonstrates qti-choices-left and qti-labels-decimal and qti-labels-suffix-period

<qti-order-interaction response-identifier="RESPONSE" class="qti-choices-left 
  qti-labels-decimal qti-labels-suffix-period" orientation="vertical">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 71 Expected Rendering: Orientation is vertical, order choices to the left of the targets, and order target visual labels are numeric with period "." label suffixes.
3 blue boxes with names in them are displayed one-above-the-other in a single column. 
                        To the right of the blue boxes are 3 larger grey boxes also displayed one-above-the-other in a single column – 
                        there are ascending numbers with a period character after the number at the top of these boxes.

Example: Demonstrates qti-choices-left and qti-labels-decimal and qti-labels-suffix-parenthesis

<qti-order-interaction response-identifier="RESPONSE" class="qti-choices-left 
  qti-labels-decimal qti-labels-suffix-parenthesis" orientation="vertical">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 72 Expected Rendering: Orientation is vertical, order choices to the left of the targets, and order target visual labels are numeric with right parenthesis ")" label suffixes.
3 grey boxes with ascending numbers in them are displayed one-above-the-other in a single column. 
                        To the right of the blue boxes are 3 larger grey boxes also displayed one-above-the-other in a single column – 
                        there are ascending numbers with a right parenthesis character after the number at the top of these boxes.
3.2.10.3 Ordering Choices | Order Target Container Positioning

For explicit ordering choice | order target container positioning, use the class attribute as follows:

Values
qti-choices-top The choices container is displayed above the order target  container
qti-choices-bottom The choices container is displayed below the order target  container
qti-choices-left The choices container is displayed to the left of the order target container
qti-choices-right The choices container is displayed to the right of the order target container

In the absence of choices | order target container positioning, delivery systems should render platform defaults.

Example: Demonstrates class="qti-choices-top"

<qti-order-interaction response-identifier="RESPONSE" class="
  qti-choices-top">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 73 Expected Rendering: Choices displayed above the order targets.
3 blue boxes with names in them are displayed side-by-side in a single row. 
                        Below the blue boxes are 3 larger grey boxes also displayed side-by-side in a single row, 
                        where the lines around the boxes are dark grey – there are ascending numbers in these grey boxes.

Example: Demonstrates class="qti-choices-bottom"

<qti-order-interaction response-identifier="RESPONSE" class="
  qti-choices-bottom">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 74 Expected Rendering: Choices displayed below the order targets.
3 gray boxes with ascending numbers in them are displayed side-by-side in a single row. 
                        Below the gray boxes are 3 smaller blue boxes also displayed side-by-side in a single row – there are names in the blue boxes.

Example: Demonstrates class="qti-choices-left"

<qti-order-interaction response-identifier="RESPONSE" class="
  qti-choices-left">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 75 Expected Rendering: Choices displayed to the left of the order targets.
3 blue boxes with names in them are displayed side-by-side in a single row. To the right of the blue 
                        boxes are 3 larger grey boxes also displayed side-by-side in a single row, where the lines around the boxes are 
                        dark grey – there are ascending numbers in these grey boxes.

Example: Demonstrates class="qti-choices-right"

<qti-order-interaction response-identifier="RESPONSE" class="
  qti-choices-right">
        <qti-prompt>The following F1 drivers finished on the podium in
        the first ever Grand Prix of Bahrain. Can you rearrange them
        into the correct finishing order?</qti-prompt>
        <qti-simple-choice identifier="DriverA">Rubens Barrichello</qti-simple-choice>
        <qti-simple-choice identifier="DriverB">Jenson Button</qti-simple-choice>
        <qti-simple-choice identifier="DriverC">Michael Schumacher</qti-simple-choice>
  </qti-order-interaction>
Figure 76 Expected Rendering: Choices displayed to the right of the order targets.
3 gray boxes with ascending numbers in them are displayed side-by-side in a single row. 
                        To the right of the gray boxes are 3 smaller blue boxes also displayed side-by-side in a single row – there are names in the blue boxes.
3.2.10.4 Ordering Choices Container Width

For specifying explicit ordering choices container width, use a data- attribute as follows:

Values
data-choices-container-width The ordering choices container width in pixels.  Example: data-choices-container-width="100"
3.2.10.5 Ordering Custom max|min-selections Messages

To specify custom max-choices or min-choices messages, use a data- attribute as follows:

Values
data-max-selections-message Custom message to be rendered by the delivery platform upon violation of the max-choices constraint.
data-min-selections-message Custom message to be rendered by the delivery platform upon violation of the min-choices constraint.

3.2.11 Graphic Order

A GraphicOrderInteraction.Type (qti-associate-interaction) is a graphic interaction with a corresponding set of choices that are defined as areas of the graphic image. The candidate's task is to impose an ordering on the areas (hotspots). The order hotspot interaction should only be used when the spatial relationship of the choices with respect to each other (as represented by the graphic image) is important to the needs of the item.

Otherwise, Order interaction should be used instead with separate material for each option. The delivery engine must clearly indicate all defined area(s) of the image.

Graphic Order Interaction Attributes (element: qti-graphic-order-interaction)

Name Usage Value(s) Default
max-choices optional Non-negative number If unspecified, all of the choices may be ordered.
min-choices optional Non-negative number If unspecified, all of the choices must be ordered and max-choices is ignored.

The sub-element sequence for the qti-graphic-order-interaction:

  1. object (must have only 1)
  2. qti-hotspot-choice (at least 1)

HotspotChoice Attributes (element: qti-hotspot-choice)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier of a template variable used to control the visibility of the qti-hotspot-choice
show-hide optional Vocabulary:• show• hide show
shape required Vocabulary:• circle• default• ellipse• poly• rect
coords required Coords.Type
hotspot-label optional string

The graphic order interaction must be bound to a response variable with a base-type of identifier and ordered cardinality.

Example: Demonstrates qti-graphic-order-interaction

<qti-graphic-order-interaction response-identifier="RESPONSE"> 
 <qti-prompt>
     Mark the airports shown on the map according to Lorna's preferences.
 </qti-prompt> 
 <object type="image/png" width="206" height="280" data="images/ukair.png"></object> 
 <qti-hotspot-choice shape="circle" coords="78,102,8" identifier="A"/> 
 <qti-hotspot-choice shape="circle" coords="117,171,8" identifier="B"/> 
 <qti-hotspot-choice shape="circle" coords="166,227,8" identifier="C"/> 
 <qti-hotspot-choice shape="circle" coords="100,102,8" identifier="D"/>
</qti-graphic-order-interaction>
Figure 77 Graphic Order Interaction example.
2 paragraphs of text are shown above an image. The image is a line drawing of the United Kingdom. 
                      There are 4 places that have icons of airplanes placed on the drawing. Next to 3 of the icons are large blue numbers. 
                      A fourth large number is placed off to the side of the drawing.

3.2.12 Associate

An AssociateInteraction.Type (qti-associate-interaction) is a block interaction that presents candidates with a number of  choices and allows them to create associations between them.

AssociateInteraction Attributes (element: qti-associate-interaction)

Name Usage Value(s) Default
max-associations optional Non-negative number 1
min-associations optional Non-negative number 0 (unlimited)
shuffle optional boolean false

The sub-element of qti-associate-interaction is qti-simple-associable-choice, where there must be at least one qti-simple-associable-choice.

SimpleAssociableChoice Attributes (element: qti-simple-associable-choice)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier
show-hide optional Vocabulary:• show• hide show
match-max required Non-negative integer
match-min optional Non-negative integer 0 (unlimited)
fixed optional boolean

The qti-associate-interaction must be bound to a response variable with base-type pair and either single or multiple cardinality.

Example: Demonstrates qti-associate-interaction max-associations="3"

      <qti-associate-interaction response-identifier="RESPONSE" max-associations="3">
          <qti-prompt>
            Hidden in this list of characters from famous
            Shakespeare plays are three pairs of rivals. Can you match
            each character to his adversary?
          </qti-prompt>
          <qti-simple-associable-choice identifier="A" match-max="1">
            Antonio
          </qti-simple-associable-choice>
          <qti-simple-associable-choice identifier="C" match-max="1">
            Capulet
          </qti-simple-associable-choice>
          <qti-simple-associable-choice identifier="D" match-max="1">
            Demetrius
          </qti-simple-associable-choice>
          <qti-simple-associable-choice identifier="L" match-max="1">
            Lysander
          </qti-simple-associable-choice>
          <qti-simple-associable-choice identifier="M" match-max="1">
            Montague
          </qti-simple-associable-choice>
          <qti-simple-associable-choice identifier="P" match-max="1">
            Prospero
          </qti-simple-associable-choice>
        </qti-associate-interaction>
Figure 78 Graphic Associate Interaction example.
3 lines of text are shown above an image. The image contains two long rectangular boxes labeled with text.
                      Below that are six smaller boxes, 4 containing text labels and 2 unlabled. 
                      The two longer boxes can be moved to the unlabled boxes.

3.2.13 Graphic Associate

A GraphicAssociateInteraction.Type (qti-graphic-associate-interaction) is a graphic interaction with a corresponding set of choices that are defined as areas of the graphic image. The candidate's task is to associate the areas (hotspots) with each other. The graphic associate interaction should only be used when the graphical relationship of the choices with respect to each other (as represented by the graphic image) is important to the needs of the item. Otherwise, an Associate Interaction should be used instead with separate material for each option. The delivery engine must clearly indicate all defined area(s) of the image.

AssociateInteraction Attributes (element: qti-associate-interaction)

Name Usage Value(s) Default
max-associations optional Non-negative number 1
min-associations optional Non-negative number

The sub-element sequence:

  1. object (limited to a single occurrence)
  2. qti-associable-hotspot (at least 1)

AssociableHotspot Attributes (element: qti-associable-hotspot)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier
show-hide optional Vocabulary:• show• hide show
match-group optional IdentifierList
shape required Vocabulary:• circle• default• ellipse• poly• rect
coords required Coords.Type
hotspot-label optional string
match-max required Non-negative integer
match-min optional Non-negative integer 0 (unlimited)

The qti-graphic-associate-interaction must be bound to a response variable with base-type pair and either single or multiple cardinality.

Example: Demonstrates qti-graphic-associate-interaction

<qti-assessment-item xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 
  https://www.imsglobal.org/xsd/qti/qtiv3p0/imsqti_itemv3p0_v1p0.xsd" xml:lang="eng-US" 
  identifier="example-graphic-assoc-1" time-dependent="false">
    <response-declaration identifier="RESPONSE" cardinality="multiple"
      base-type="pair"/>
    <qti-item-body>
      <p>
        Frizz, a new low cost airline, already operates a service
        connecting Manchester and Edinburgh but has recently opened two
        new routes: a service between London and Edinburgh and one
        between London and Manchester.
      </p>
      <qti-graphic-associate-interaction response-identifier="RESPONSE" max-associations="3">
        <qti-prompt>
          Mark the airline's new routes on the airport map:
        </qti-prompt>
        <object type="image/png" width="206" height="280" data="images/ukair.png"></object>
        <qti-associable-hotspot shape="circle" coords="78,102,8"  identifier="A" match-max="3"/>
        <qti-associable-hotspot shape="circle" coords="117,171,8" identifier="B" match-max="3"/>
        <qti-associable-hotspot shape="circle" coords="166,227,8" identifier="C" match-max="3"/>
        <qti-associable-hotspot shape="circle" coords="100,102,8" identifier="D"  match-max="3"/>
      </qti-graphic-associate-interaction>
    </qti-item-body>
  </assessmentItem>
Figure 79 Graphic Associate Interaction example.
2 paragraphs of text are shown above an image. The image is a line drawing of the United Kingdom. 
                      There are 4 places that have icons of airplanes placed on the drawing. 3 of the icons are connected by lines.

3.2.14 Graphic Gap Match

A GraphicGapMatchInteraction.Type (qti-graphic-gap-match-interaction) is a graphical interaction with a set of gaps that are defined as areas (hotspots) of the graphic image and an additional set of gap choices that are defined outside the image. The candidate must associate the gap choices with the gaps in the image and be able to review the image with the gaps filled in context, as indicated by their choices.

Care should be taken when designing these interactions to ensure that the gaps in the image are a suitable size to receive the required gap choices. It must be clear to the candidate which hotspot each choice has been associated with. When associated, choices must appear wholly inside the gaps if at all possible and, where overlaps are required, should not hide each other completely. If the candidate indicates the association by positioning the choice over the gap (e.g. drag and drop) the system should 'snap' it to the nearest position that satisfies these requirements.

GraphicGapMatchInteraction Attributes (element: qti-graphic-gap-match-interaction)

Name Usage Value(s) Default
max-associations optional Non-negative number 1
min-associations optional Non-negative number

The sequence of elements within the qti-graphic-gap-match-interaction is:

  • qti-prompt
  • object
  • qti-gap-text
  • qti-gap-img
  • qti-associable-hotspot

GapText Attributes (element: qti-gap-text)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier
show-hide optional Vocabulary:• show• hide show
match-group optional IdentifierList
match-max required Non-negative integer
match-min optional Non-negative integer 0 (unlimited)

GapImg Attributes (element: qti-gap-img)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier
show-hide optional Vocabulary:• show• hide show
match-group optional IdentifierList
match-max required Non-negative integer
match-min optional Non-negative integer 0 (unlimited)
object-label optional string
top optional empty
left optional empty

AssociableHotspot Attributes (element: qti-associable-hotspot)

Name Usage Value(s) Default
identifier required Identifier
template-identifier optional Identifier
show-hide optional Vocabulary:• show• hide show
match-group optional IdentifierList
shape required Vocabulary:• circle• default• ellipse• poly• rect
coords required Coords.Type
hotspot-label optional string
match-max required Non-negative integer
match-min optional Non-negative integer 0 (unlimited)

The graphic-gap-match-interaction must be bound to a response variable with base-type directedPair and multiple cardinality. The choices represent the source of the pairing and the gaps in the image (the hotspots) the targets. Unlike the simple GapMatchInteraction, each gap can have several choices associated with it if desired, furthermore, the same choice may be associated with an qti-associable-hotspot multiple times, in which case the corresponding directed pair appears multiple times in the value of the response variable.

The shared vocabulary for the Graphic Gap Match Interaction is intended to provide more precision when describing:

  1. Positioning of the Gap Choices container with respect to the image containing the hotspots.
  2. Gap Choices container width.
  3. Associable Hotspot Selections theming.
  4. Custom max|min-associations message overrides.
3.2.14.1 Gap Choices Container | Image Positioning

For explicit gap choices container positioning with respect to the passage text containing the gaps, use the class attribute as follows:

Values
qti-choices-top The gap choices container is displayed above the image.
qti-choices-bottom The gap choices container is displayed below the image.
qti-choices-left The gap choices container is displayed to the left of the image.
qti-choices-right The gap choices container is displayed to the right of the image.

The following examples demonstrate shared vocabulary describing the visual orientation of the gap choices container with respect to the image containing the hotspots.

Example: Demonstrates class="qti-choices-top"

<qti-graphic-gap-match-interaction 
  class="qti-choices-top"
   response-identifier="RESPONSE">
    <object alt="timeline" data="images/timeline-558.png" height="326" type="image/png" width="558" />
    <qti-gap-img identifier="DraggerA" match-max="1">
      <object data="images/a-cw.png" alt="a-cw" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerB" match-max="1">
      <object data="images/b-ww2.png" alt="b-ww2" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerC" match-max="1">
      <object data="images/c-vietnam.png" alt="c-vietnam" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerD" match-max="1">
      <object data="images/d-bay.png" alt="d-bay" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-associable-hotspot coords="55,256,133,319" identifier="A" match-max="1" shape="rect" />
    <qti-associable-hotspot coords="190,256,268,319" identifier="B" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="309,256,387,319" identifier="C" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="450,256,528,319" identifier="D" match-max="1" shape="rect"/>
  </qti-graphic-gap-match-interaction>
Figure 80 Expected Rendering: The gap choices are displayed above the image.
4 boxes of text are shown side-by-side in a single row. They are placed above an image 
                        showing a timeline with 5 points along the timeline labeled with dates and information. There are 4 
                        empty boxes with date labels pointing to specific points along the timeline.

Example: Demonstrates class="qti-choices-bottom"

<qti-graphic-gap-match-interaction 
  class="qti-choices-bottom"
   response-identifier="RESPONSE">
    <object alt="timeline" data="images/timeline-558.png" height="326" type="image/png" width="558" />
    <qti-gap-img identifier="DraggerA" match-max="1">
      <object data="images/a-cw.png" alt="a-cw" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerB" match-max="1">
      <object data="images/b-ww2.png" alt="b-ww2" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerC" match-max="1">
      <object data="images/c-vietnam.png" alt="c-vietnam" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerD" match-max="1">
      <object data="images/d-bay.png" alt="d-bay" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-associable-hotspot coords="55,256,133,319" identifier="A" match-max="1" shape="rect" />
    <qti-associable-hotspot coords="190,256,268,319" identifier="B" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="309,256,387,319" identifier="C" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="450,256,528,319" identifier="D" match-max="1" shape="rect"/>
  </qti-graphic-gap-match-interaction>
Figure 81 Expected Rendering: The gap choices are displayed below the image.
There is an image showing a timeline with 5 points along the timeline labeled with dates and information. 
                        There are 4 empty boxes with date labels pointing to specific points along the timeline. Below the timeline image 
                        are four boxes of text are shown side-by-side in a single row.

Example: Demonstrates class="qti-choices-left"

<qti-graphic-gap-match-interaction 
  class="qti-choices-left"
   response-identifier="RESPONSE">
    <object alt="timeline" data="images/timeline-558.png" height="326" type="image/png" width="558" />
    <qti-gap-img identifier="DraggerA" match-max="1">
      <object data="images/a-cw.png" alt="a-cw" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerB" match-max="1">
      <object data="images/b-ww2.png" alt="b-ww2" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerC" match-max="1">
      <object data="images/c-vietnam.png" alt="c-vietnam" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerD" match-max="1">
      <object data="images/d-bay.png" alt="d-bay" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-associable-hotspot coords="55,256,133,319" identifier="A" match-max="1" shape="rect" />
    <qti-associable-hotspot coords="190,256,268,319" identifier="B" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="309,256,387,319" identifier="C" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="450,256,528,319" identifier="D" match-max="1" shape="rect"/>
  </qti-graphic-gap-match-interaction>
Figure 82 Expected Rendering: The gap choices are displayed to the left of the image.
Four boxes of text are shown side-by-side in a single row. They are placed to the left of an image showing a 
                        timeline with 5 points along the timeline labeled with dates and information. 
                        There are 4 empty boxes with date labels pointing to specific points along the timeline.

Example: Demonstrates class="qti-choices-right"

<qti-graphic-gap-match-interaction 
  class="qti-choices-right"
   response-identifier="RESPONSE">
    <object alt="timeline" data="images/timeline-558.png" height="326" type="image/png" width="558" />
    <qti-gap-img identifier="DraggerA" match-max="1">
      <object data="images/a-cw.png" alt="a-cw" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerB" match-max="1">
      <object data="images/b-ww2.png" alt="b-ww2" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerC" match-max="1">
      <object data="images/c-vietnam.png" alt="c-vietnam" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerD" match-max="1">
      <object data="images/d-bay.png" alt="d-bay" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-associable-hotspot coords="55,256,133,319" identifier="A" match-max="1" shape="rect" />
    <qti-associable-hotspot coords="190,256,268,319" identifier="B" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="309,256,387,319" identifier="C" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="450,256,528,319" identifier="D" match-max="1" shape="rect"/>
  </qti-graphic-gap-match-interaction>
Figure 83 Expected Rendering: The gap choices are displayed to the right of the image.
There is an image showing a timeline with 5 points along the timeline labeled with dates and information. 
                        There are 4 empty boxes with date labels pointing to specific points along the timeline. 
                        To the right of the timeline image are four boxes of text are shown side-by-side in a single row.
3.2.14.2 Choices Container Width

A common implementation of the graphic gap match interaction is to place the gap choices in a so-called, "gap choices container".  One can achieve a visual equivalent of gap choices stacking by manipulating the gap choices container width.  

For specifying explicit gap choices container width, use a data- attribute as follows:

Values
data-choices-container-width The gap choices container width in pixels.  Example: data-choices-container-width="100"

Example: Demonstrates qti-choices-top and data-choices-container-width="188"

<qti-graphic-gap-match-interaction 
  class="qti-choices-top"data-choices-container-width="188"
   response-identifier="RESPONSE">
    <object alt="timeline" data="images/timeline-558.png" height="326" type="image/png" width="558" />
    <qti-gap-img identifier="DraggerA" match-max="1">
      <object data="images/a-cw.png" alt="a-cw" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerB" match-max="1">
      <object data="images/b-ww2.png" alt="b-ww2" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerC" match-max="1">
      <object data="images/c-vietnam.png" alt="c-vietnam" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerD" match-max="1">
      <object data="images/d-bay.png" alt="d-bay" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-associable-hotspot coords="55,256,133,319" identifier="A" match-max="1" shape="rect" />
    <qti-associable-hotspot coords="190,256,268,319" identifier="B" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="309,256,387,319" identifier="C" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="450,256,528,319" identifier="D" match-max="1" shape="rect"/>
  </qti-graphic-gap-match-interaction>
Figure 84 Expected Rendering: The gap choices container is set to width of 188px, resulting in a stacking effect.
Four boxes of text are shown side-by-side in 2 rows. They are placed above an image showing a 
                        timeline with 5 points along the timeline labeled with dates and information. 
                        There are 4 empty boxes with date labels pointing to specific points along the timeline.

Example: Demonstrates qti-choices-left and data-choices-container-width="100"

<qti-graphic-gap-match-interaction 
  class="qti-choices-left"data-choices-container-width="100"
   response-identifier="RESPONSE">
    <object alt="timeline" data="images/timeline-558.png" height="326" type="image/png" width="558" />
    <qti-gap-img identifier="DraggerA" match-max="1">
      <object data="images/a-cw.png" alt="a-cw" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerB" match-max="1">
      <object data="images/b-ww2.png" alt="b-ww2" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerC" match-max="1">
      <object data="images/c-vietnam.png" alt="c-vietnam" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerD" match-max="1">
      <object data="images/d-bay.png" alt="d-bay" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-associable-hotspot coords="55,256,133,319" identifier="A" match-max="1" shape="rect" />
    <qti-associable-hotspot coords="190,256,268,319" identifier="B" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="309,256,387,319" identifier="C" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="450,256,528,319" identifier="D" match-max="1" shape="rect"/>
  </qti-graphic-gap-match-interaction>
Figure 85 Expected Rendering: The gap choices container is set to width of 100px, resulting in a stacking effect.
Four boxes of text are shown in a single column (one box per row). They are placed to the left of an image showing a 
                        timeline with 5 points along the timeline labeled with dates and information. 
                        There are 4 empty boxes with date labels pointing to specific points along the timeline.
3.2.14.3 Graphic Gap Match Hotspot Selections Theming

For explicit associable hotspot selection theming, use the class attribute as follows:

Values
qti-selections-light Delivery platform must implement associable hotspot selections in a color that the platform believes to be of suitable color contrast and opacity against a "dark" background image.
qti-selections-dark Delivery platform must implement associable hotspot selections in a color that the platform believes to be of suitable color contrast and opacity against a "light" background image.
qti-unselected-hidden Delivery platform must implement associable hotspot selections that are visually hidden (no visual border and no fill) unless a candidate is actively attempting to match gap choices with the selections.

In the absence of such selections theming overrides, delivery systems should render platform defaults. When using qti-selections-dark and qti-selections-light classes, the intent is to increase the contrast between the selections and the background, to ensure candidates can clearly identify the selections.Use qti-selections-light to indicate that the selection lines and fills should be lighter than usual to accommodate for the background image.  Use qti-selections-dark to indicate that the selection lines and fills should be darker than usual to accommodate for the background image.

For qti-unselected-hidden, note that there is an obvious visual bias for these types of questions. In addition, the selection should only be visually-hidden. If a candidate is known to have low-vision indications in their PNP, the class should be ignored, and the selection should NOT be visually hidden. Selections should always be programmatically available (usable by keyboards and assistive technology).

Example: Demonstrates Associable Hotspot selections with class="qti-selections-light"

<qti-graphic-gap-match-interaction 
  class="qti-selections-light"
  data-choices-container-width="376" response-identifier="RESPONSE">
    <object alt="timeline" data="images/timeline-558.png" height="326" type="image/png" width="558" />
    <qti-gap-img identifier="DraggerA" match-max="1">
      <object data="images/a-cw.png" alt="a-cw" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerB" match-max="1">
      <object data="images/b-ww2.png" alt="b-ww2" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerC" match-max="1">
      <object data="images/c-vietnam.png" alt="c-vietnam" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerD" match-max="1">
      <object data="images/d-bay.png" alt="d-bay" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-associable-hotspot coords="55,256,133,319" identifier="A" match-max="1" shape="rect" />
    <qti-associable-hotspot coords="190,256,268,319" identifier="B" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="309,256,387,319" identifier="C" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="450,256,528,319" identifier="D" match-max="1" shape="rect"/>
  </qti-graphic-gap-match-interaction>
Figure 86 Expected Rendering: Associable Hotspot selections are rendered with colors and active state fills of the platform's choosing - in this case an orange fill with a dashed border.
Four boxes of text are shown side-by-side in a single row. They are placed above an image showing a 
                        timeline with 5 points along the timeline labeled with dates and information. 
                        There are 4 empty orange boxes with date labels pointing to specific points along the timeline.

Example: Demonstrates Associable Hotspot selections with class="qti-selections-dark"

<qti-graphic-gap-match-interaction 
  class="qti-selections-dark"
   data-choices-container-width="376" response-identifier="RESPONSE">
    <object alt="timeline" data="images/timeline-558.png" height="326" type="image/png" width="558" />
    <qti-gap-img identifier="DraggerA" match-max="1">
      <object data="images/a-cw.png" alt="a-cw" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerB" match-max="1">
      <object data="images/b-ww2.png" alt="b-ww2" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerC" match-max="1">
      <object data="images/c-vietnam.png" alt="c-vietnam" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-gap-img identifier="DraggerD" match-max="1">
      <object data="images/d-bay.png" alt="d-bay" height="63" type="image/png" width="78" />
    </qti-gap-img>
    <qti-associable-hotspot coords="55,256,133,319" identifier="A" match-max="1" shape="rect" />
    <qti-associable-hotspot coords="190,256,268,319" identifier="B" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="309,256,387,319" identifier="C" match-max="1" shape="rect"/>
    <qti-associable-hotspot coords="450,256,528,319" identifier="D" match-max="1" shape="rect"/>
  </qti-graphic-gap-match-interaction>
Figure 87 Expected Rendering: Associable Hotspot selections are rendered with colors and active state fills of the platform's choosing - in this case a blue fill with a dashed-border.
Four boxes of text are shown side-by-side in a single row. They are placed above an image showing a 
                        timeline with 5 points along the timeline labeled with dates and information. 
                        There are 4 empty blue boxes with date labels pointing to specific points along the timeline.
3.2.14.4 Graphic Gap Match Custom max|min-associations Messages

To specify custom max-associations or min-associations messages, use a data- attribute as follows:

Values
data-max-selections-message Custom message to be rendered by the delivery platform upon violation of the max-associations constraint.
data-min-selections-message Custom message to be rendered by the delivery platform upon violation of the min-associations constraint.

In the absence of such custom message overrides, delivery systems should render platform defaults.

3.2.15 Media

The MediaInteraction.Type (qti-media-interaction) enables measurement of the number of times the media object was experienced.  This quantity is reported in the value of the interaction's response variable.

MediaInteraction Attributes (element: qti-media-interaction)

Name Usage Value(s) Default
autostart required boolean Note: Accessibility guidelines suggest that candidates should initiate any media instead of automatically playing the media, therefore the value should be "false".
min-plays optional Non-negative integer 0 (unlimited)
max-plays optional Non-negative integer 0 (unlimited)
loop optional boolean false
coords optional Coords.Type

The sub-elements include:

  • object
  • audio
  • video

The qti-media-interaction must be bound to a response variable of base-type integer and single cardinality.

Example: Demonstrates qti-media-interaction

<qti-media-interaction autostart="false" loop="true" response-identifier="RESPONSE">
  <qti-prompt>Play this video.</qti-prompt>
  <object type="video/mp4" data="images/bubble.mp4"/>
</qti-media-interaction>
Figure 88 Media Interaction example.
A video preview (a still image) is shown. Text above the video area says 'Play this video.' 
                      There is a larger play button in the middle of the video area.

3.2.16 Position Object

The PositionObjectInteraction.Type (qti-position-object-interaction) consists of a single image which must be positioned on another graphic image (the stage) by the candidate. Like Select Point Interaction, the associated response may have a qti-area-mapping that scores the response on the basis of comparing it against predefined areas but the delivery engine must not indicate these areas of the stage. Only the actual position(s) selected by the candidate shall be indicated.

PositionObjectInteraction Attributes (element: qti-position-object-interaction)

Name Usage Value(s) Default
center-point optional IntegerList
min-choices optional Non-negative number
max-choices optional Non-negative number 1

The sub-element of the qti-position-object-interaction is the HTML "object" element.

The qti-position-object-interaction must be bound to a response variable with a base-type of point and single or multiple cardinality. The point records the coordinates, with respect to the stage, of the centre point of the image being positioned.

Position Object Interaction, has a required parent, the qti-position-object-stage, which is a graphic image (represented as an "object"), on top of which the Position Object Interaction image is to be positioned. A single qti-position-object-stage may have several Position Object Interactions as child elements, representing several objects to be positioned on the same "stage".

Example: Demonstrates qti-position-object-interaction

<qti-item-body>
    <p>When flying into the UK, you may well find yourself landing at
      Edinburgh, Manchester or London Heathrow; but where are these
      airports actually located?
    </p>
    <qti-position-object-stage>
      <object type="image/png" data="images/uk.png" width="206" height="280"></object>
      <qti-position-object-interaction response-identifier="RESPONSE" max-choices="3">
        <object type="image/png" data="images/airplane.png" width="30" height="30"></object>
      </qti-position-object-interaction>
    </qti-position-object-stage>
  </qti-item-body>
Figure 89 Position Object Interaction example.
A paragraph of text is shown above an image. The image is a line drawing of the United Kingdom. 
                      Below the line drawing is an airplane icon.

3.2.17 Select Point

The SelectPointInteraction.Type (qti-select-point-interaction) is a graphic interaction. The candidate's task is to select one or more points. The associated response may have an qti-area-mapping  that scores the response on the basis of comparing it against predefined areas but the delivery engine must not indicate these areas of the image. Only the actual point(s) selected by the candidate shall be indicated.

SelectPointInteraction Attributes (element: qti-select-point-interaction)

Name Usage Value(s) Default
min-choices optional Non-negative number 0 (unlimited)
max-choices optional Non-negative number 1

Sub-element for the qti-select-point-interaction is the HTML "object" element.

The select point interaction must be bound to a response variable with a base-type of point and single or multiple cardinality.

3.2.18 Slider

The SliderInteraction.Type (qti-slider-interaction) presents the candidate with a control for selecting a numerical value between a lower and upper bound. It must be bound to a response variable with single cardinality with a base-type of either integer or float.

Note that a slider interaction does not have a default or initial position except where specified by a default value for  the associated response variable. The currently selected value, if any, must be clearly indicated to the candidate.

Because a slider interaction does not have a default or initial position, except where specified by a default value for the associated response variable, it is difficult to distinguish between an intentional response that corresponds to the slider's initial position and a NULL response. As a workaround, slider interaction items have to either a) not count NULL responses (i.e. count all responses as intentional) or b) include a 'skip' button and count its activation combined with a response variable that is equal to the slider's initial position as a NULL response.

There are six attributes for the qti-slider-interaction where the lower-bound and upper-bound are required attributes:

Slider Interaction Attributes (element: qti-slider-interaction)

Name Usage Value(s) Default
lower-bound required NonNegativeDouble
upper-bound required NonNegativeDouble
step optional NonNegativeDouble 1.0
step-label optional boolean false
orientation optional

Vocabulary;

  • horizontal
  • vertical
reverse optional

Example: Demonstrates qti-slider-interaction

<qti-slider-interaction response-identifier="RESPONSE" lower-bound="0" upper-bound="100"
    step="10" orientation="horizontal">
    <qti-prompt>
      In total, what percentage of the UK population do you think
      were eventually classified as having no religion?
    </qti-prompt>
  </qti-slider-interaction>
Figure 90 Expected Rendering: A slider "track" with horizontal orientation, with a single handle that may be moved by dragging, or with arrow keys. Tick marks are left entirely to the delivery platform.
A question appears above a line. There are tick marks at regular intervals above the line. 
                      In the middle of the line is a grey rectangle. Below the grey rectangle is a dark rectangle that displays the number '50'.

3.2.19 Upload

The UploadInteraction.Type (qti-upload-interaction) allows the candidate to upload a pre-prepared file representing their response.

The qti-upload-interaction must be bound to a response variable with base-type  file and single cardinality.

UploadInteraction Attributes (element: qti-upload-interaction)

Name Usage Value(s) Default
class optional xs:string
response-identifier mandatory identifier

Example: Demonstrates qti-upload-interaction

0001   <qti-upload-interaction response-identifier="RESPONSE" />
Figure 91 Expected Rendering: Rendering and behaviors of the Upload Interaction are left entirely to the delivery platform.
An empty rectangle is shown to the left of another rectangular button with the words 'Select file' within the button.

3.2.20 Drawing

The DrawingInteraction.Type (qti-drawing-interaction) allows the candidate to use a set of drawing tools to modify a given graphical image (the canvas).  It must be bound to a response variable with base type file and single cardinality.

DrawingInteraction Attributes (element: qti-drawing-interaction)

Name Usage Value(s) Default
class optional xs:string
response-identifier mandatory identifier

The sub-element of the qti-drawing-interaction is the HTML "object" element.  The image that acts as the canvas on which the drawing takes place is given as an object which must be of an image type, as specified by the type attribute.

Example: Demonstrates qti-drawing-interaction

  <qti-drawing-interaction response-identifier="RESPONSE"> 
     <qti-prompt>
         <p>Use the compass provided to bisect the angle <em>PQR</em> in the figure below.</p>
      </qti-prompt> 
     <object type="image/jpg" data="images/anglePQR.jpg" width="322" height="260"></object> 
   </qti-drawing-interaction>
Figure 92 Expected Rendering: A background canvas containing the image, upon which a candidate may draw using provided delivery platform drawing tools. Such delivery platform drawing tools are left entirely to the delivery platform.
An instructional sentence of text appears above a large rectangle. 
                      Within the rectangle are two connected lines with 3 points labelled by letters. 
                      To the left of the large rectangle is a stack of buttons with icons representing drawing tools and functions.

3.2.21 End Attempt

End Attempt Interaction is a special interaction which immediately ends the current attempt on an assessment item.  It may be used, for example, to allow the candidate to request a hint or model solution, or in an adaptive item to let the candidate display feedback or to move to the next in a series of interactions in the item.

EndAttemptInteraction Attributes (element: qti-end-attempt-interaction)

Name Usage Value(s) Default
title mandatory xs:string
count-attempt optional xs:boolean

Example: Demonstrates qti-end-attempt-interaction with a Hint

    <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="identifier">
          <qti-correct-response>
              <qti-value>MGH001C</qti-value>
          </qti-correct-response>
      </qti-response-declaration>
      <qti-response-declaration identifier="HINTREQUEST" cardinality="single" base-type="boolean"/>
      <qti-outcome-declaration identifier="SCORE" cardinality="single" base-type="float"/>
      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>
      <qti-item-body>
          <qti-choice-interaction response-identifier="RESPONSE" shuffle="false" max-choices="1">
              <qti-prompt>Who is the President of Mexico?</qti-prompt>
              <qti-simple-choice identifier="MGH001A">George W Bush</qti-simple-choice>
              <qti-simple-choice identifier="MGH001B">Tony Blair</qti-simple-choice>
              <qti-simple-choice identifier="MGH001C">Vicente Fox</qti-simple-choice>
              <qti-simple-choice identifier="MGH001D">Ariel Sharon</qti-simple-choice>
          </qti-choice-interaction>
          <p>
  <qti-end-attempt-interaction response-identifier="HINTREQUEST" title="Show Hint"/>
          </p>
          <qti-feedback-block identifier="HINT" outcome-identifier="FEEDBACK" show-hide="show">
              <qti-content-body>
                  Tony lives in the United Kingdom and George lives in Washington.
              </qti-content-body>
          </qti-feedback-block>
      </qti-item-body>
      <qti-response-processing>
          <qti-set-outcome-value identifier="FEEDBACK">
              <qti-base-value base-type="identifier">NOHINT</qti-base-value>
          </qti-set-outcome-value>
          <qti-response-condition>
              <qti-response-if>
                  <qti-variable identifier="HINTREQUEST"/>
                  <qti-set-outcome-value identifier="FEEDBACK">
                      <qti-base-value base-type="identifier">HINT</qti-base-value>
                  </qti-set-outcome-value>
              </qti-response-if>
              <qti-response-else>
                  <qti-response-condition>
                      <qti-response-if>
                          <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                          </qti-match>
                          <qti-set-outcome-value identifier="SCORE">
                              <qti-base-value base-type="float">1</qti-base-value>
                          </qti-set-outcome-value>
                      </qti-response-if>
                      <qti-response-else>
                          <qti-set-outcome-value identifier="SCORE">
                              <qti-base-value base-type="float">0</qti-base-value>
                          </qti-set-outcome-value>
                      </qti-response-else>
                  </qti-response-condition>
              </qti-response-else>
          </qti-response-condition>
      </qti-response-processing>
Figure 93 Expected Rendering: the End Attempt interaction is rendered as a button. However, rendering embodiments of End Attempt interactions are left to the delivery platform.
A question is shown with 4 response options. 
                      Below the response options is a button with the words “Show Hint” within it. 
                      Below the button is a sentence of text (the hint).

3.2.22 Custom Interaction

The CustomInteraction.Type (qti-custom-interaction) provides an opportunity for delivery platform-specific extensibility of this specification to include support for interactions not currently built into the QTI specification.  This can be used, for example, to develop technology-enhanced items.

As the user interface and behavior of a qti-custom-interaction are custom, there is no predefined shared vocabulary for qti-custom-interaction.  However if a qti-custom-interaction implements a feature or behavior in a way which is consistent with how that has been defined for the pre-defined interaction types then it may use qti- prefixed class names to indicate it supports a behaviour consistent with the use of that shared vocabulary elsewhere in this specification; e.g., a qti-custom-interaction which supports text entry by the candidate may support the qti-input-width set of classes to control the visible width allocated to display of the candidate's input.

CustomInteraction Attributes (element: qti-custom-interaction)

Name Usage Value(s) Default
class optional xs:string
response-identifier mandatory identifier

Example: Demonstrates qti-custom-interaction

<qti-response-declaration cardinality="single" base-type="string" identifier="RESPONSE">
    <qti-correct-response>
      <qti-value>3/8</qti-value>
    </qti-correct-response>
  </qti-response-declaration>
  <qti-outcome-declaration cardinality="single" base-type="float" identifier="SCORE"/>
  <qti-item-body>
    <p>
      A pie is divided into quarters. Each slice is then divided in half. One half of the
      pie is eaten at lunch. One slice is eaten at snack time.
    </p>
    <p>
      Use the Fraction Tool below to shade the portion of the pie that is left. The Fraction Tool
      buttons divide the circle into fewer or more pieces. Pieces of the circle can be
      shaded by selecting them.
    </p>
    <!-- docking div for the custom interaction -->
    <div id="myfractionmodel"></div>
  <qti-custom-interaction class="tei-fractionmodel" response-identifier="RESPONSE">
      <!-- Not required to kebab-case or use qti- as this custom-option is completely
           custom element.  However, best practice in QTI 3 is to kebab-case it for
           webcomponent-friendliness.
      -->
      <custom-option><![CDATA[
        {
          dockingDivId: 'myfractionmodel',
          alignment: 'center',
          models: [{   
            active: true,
            startSegments: 2,
            minSegments: 1,
            maxSegments: 12,
  selectedSegments: [],
            text: 'The Fraction Tool',
            style: {
              radius: 150,
              fillColor: '#FF0000',
              strokeColor: '#000000',
              strokeWeight: 2
            }
          }]
        }
      ]]></custom-option>
  </qti-custom-interaction>
  </qti-item-body>
Figure 94 Expected Rendering: Because custom interactions are by definition, "custom", there are no expectations for delivery platform rendering. The example rendering below is provided as an example of how a delivery platform might render the above, so-called "Fraction Model" custom interaction.
Two paragraphs of text are presented above a rectangle with the title 'The Fraction Tool'. 
                      The rectangle contains a circle divided into 8 equal sized sectors where 3 sectors are colored red. 
                      There are 3 buttons below the circle: Fewer, More, Reset.

3.2.23 Portable Custom Interaction (PCI)

The PortableCustomInteraction.Type (qti-portable-custom-interaction) allows an item author with the support of a PCI module developer the ability to render an interaction with a custom user interface and behaviors by providing custom Javascript code supporting the interaction. This can be used, for example, to develop technology-enhanced items.

The Javascript code which implements a PCI may be included with the item in the content package or may reside elsewhere on the network. It will be loaded dynamically by the delivery engine when the item containing the PCI is presented.  These Javascript modules must be AMD (Asynchronous Module Definition) modules, and must conform to the PCI API, detailed later in this document.   The markup of a PCI may include any HTML5, MathML, and SSML elements supported elsewhere in QTI.  In addition, a PCI may contain feedback, template, and printed variable elements.  Finally, a special templateelement may be included. This may be used only in a PCI and is a container for any valid XML markup.

As the user interface and behavior of a PCI are custom, there is no predefined shared vocabulary for PCIs.  However if a PCI implements a feature or behavior in a way which is consistent with how that has been defined for the pre-defined interaction types then it MAY use qti- prefixed CSS class names to indicate it supports a behaviour consistent with the use of that shared vocabulary elsewhere in this specification; e.g. a PCI which supports text entry by the candidate may support the qti-input-width set of classes to control the visible width allocated to display of the candidate's input.

There is a detailed example of a PCI in Section 3.7.12 .  Consequently, example definitions and expected renderings are not provided here.

3.3 Composite Items

Composite items are items that contain more than one interaction. Composite items may contain multiple instances of the same type of interaction or have a mixture of interaction types.

Example: Demonstrates composite item with two Inline Choice interactions and oneText Entry interaction, Response Processing with partial scoring

<qti-assessment-item xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 
  https://www.imsglobal.org/xsd/qti/qtiv3p0/imsqti_itemv3p0_v1p0.xsd"
   xml:lang="eng-US" identifier="shakespeare_biography" time-dependent="false">
    <qti-response-declaration identifier="response_1" cardinality="single" base-type="identifier">
      <qti-correct-response>
        <qti-value>choice_1</qti-value>
      </qti-correct-response>
    </qti-response-declaration>
    <qti-response-declaration identifier="response_2" cardinality="single" base-type="identifier">
      <qti-correct-response>
        <qti-value>choice_4</qti-value>
      </qti-correct-response>
    </qti-response-declaration>
    <qti-response-declaration identifier="response_3" cardinality="single" base-type="string">
      <qti-correct-response>
        <qti-value>poet</qti-value>
      </qti-correct-response>
      <qti-mapping default-value="0">
        <qti-map-entry map-key="poet" mapped-value="1"/>
        <qti-map-entry map-key="playwright" mapped-value="1"/>
        <qti-map-entry map-key="writer" mapped-value="0.5"/>
      </qti-mapping>
    </qti-response-declaration>
    <qti-outcome-declaration identifier="SCORE" cardinality="single" base-type="float"/>
    <qti-outcome-declaration identifier="SCORE_1" cardinality="single" base-type="float"/>
    <qti-outcome-declaration identifier="SCORE_2" cardinality="single" base-type="float"/>
    <qti-outcome-declaration identifier="SCORE_3" cardinality="single" base-type="float"/>
    <qti-item-body>
      <p>
        <strong>About William Shakespeare</strong>
      </p>
      <p>
        Date of birth:
        <qti-inline-choice-interaction response-identifier="response_1">
          <qti-inline-choice identifier="choice_1">26 April 1564</qti-inline-choice>
          <qti-inline-choice identifier="choice_2">29 February 1664</qti-inline-choice>
          <qti-inline-choice identifier="choice_3">2 March 2010</qti-inline-choice>
        </qti-inline-choice-interaction>
      </p>
      <p>
        Date of death:
        <qti-inline-choice-interaction response-identifier="response_2">
          <qti-inline-choice identifier="choice_4">23 April 1616</qti-inline-choice>
          <qti-inline-choice identifier="choice_5">24 April 1616</qti-inline-choice>
          <qti-inline-choice identifier="choice_6">25 April 1616</qti-inline-choice>
        </qti-inline-choice-interaction>
      </p>
      <hr/>
      <p>
        <em>Shakespeare</em> was an English
        <qti-text-entry-interaction response-identifier="response_3" expected-length="15"/>,
        widely regarded as the greatest writer in the English language and the
        world's pre-eminent dramatist.  His surviving works, including some
        collaborations, consist of about <strong>38</strong> plays, <strong>154</strong> 
        sonnets, <strong>2</strong> long poems, and several other poems.  His plays have 
        been translated into every major living language and are performed more often than 
        those of any other playwright.
      </p>
    </qti-item-body>
    <qti-response-processing>
      <qti-response-condition>
        <qti-response-if>
          <qti-match>
            <qti-variable identifier="response_1"/>
                 <qti-correct identifier="response_1"/>
          </qti-match>
          <qti-set-outcome-value identifier="SCORE">
            <qti-sum>
              <qti-variable identifier="SCORE"/>
              <qti-base-value base-type="float">1</qti-base-value>
            </qti-sum>
          </qti-set-outcome-value>
          <qti-set-outcome-value identifier="SCORE_1">
            <qti-base-value base-type="float">1</qti-base-value>
          </qti-set-outcome-value>
        </qti-response-if>
      </qti-response-condition>
      <qti-response-condition>
        <qti-response-if>
          <qti-match>
            <qti-variable identifier="response_2"/>
            <qti-correct identifier="response_2"/>
          </qti-match>
          <qti-set-outcome-value identifier="SCORE">
            <qti-sum>
              <qti-variable identifier="SCORE"/>
              <qti-base-value base-type="float">1</qti-base-value>
            </qti-sum>
          </qti-set-outcome-value>
          <qti-set-outcome-value identifier="SCORE_2">
            <qti-base-value base-type="float">1</qti-base-value>
          </qti-set-outcome-value>
        </qti-response-if>
      </qti-response-condition>
      <qti-response-condition>
        <qti-response-if>
          <qti-not>
            <qti-is-null>
              <qti-variable identifier="response_3"/>
            </qti-is-null>
          </qti-not>
          <qti-set-outcome-value identifier="SCORE">
            <qti-sum>
              <qti-variable identifier="SCORE"/>
              <qti-map-response identifier="response_3"/>
            </qti-sum>
          </qti-set-outcome-value>
          <qti-set-outcome-value identifier="SCORE_3">
            <qti-map-response identifier="response_3"/>
          </qti-set-outcome-value>
        </qti-response-if>
      </qti-response-condition>
    </qti-response-processing>
  </qti-assessment-item>
Figure 95 PCI Example
Two drop down menus are shown, one for the date of birth of Shakespeare, one for the date of death. 
                    Below these options is a paragraph of text with an inline text entry box within the text.

3.4 Response Processing

Item response processing occurs after the candidate has completed an attempt on an item.   The purpose of response processing is to compute the value of the item's outcome variables. The most common application is to compute the candidate's score on the item, but in more advanced items, response processing may be used to show or hide feedback or interaction choices, and for other purposes.

3.4.1 Response Processing Rules

Response processing consists of a sequence of rules that are carried out, in order, by the response processor. A ResponseCondition  rule is a special type of rule which contains sub-sequences of rules divided into responseIf , responseElseIf  and responseElse  sections. The response processor evaluates the expressions in the responseIf and responseElseIf elements to determine which sub-sequence to follow. In this example, the responseIf section is followed only if the variable with identifier RESPONSE matches the correct response declared for it. The responseElseIf section is followed if RESPONSE matches the response explicitly given (which places the correct driver 1st but confuses the other two). Finally, the responseElse section is followed if neither of the previous two apply. The responseElse section has no corresponding expression of course. The qti-set-outcome-value  element is just a ResponseRule  that tells the processor to set the value of the specified outcome variable to the value of the expression it contains.

The qti-variable , qti-correct  and qti-base-value  elements are examples of simple expressions. In other words, expressions that are indivisible. In contrast, the qti-match  and qti-ordered  elements are examples of operators. Operators are expressions that combine other expressions to form new values. For example, match is used to form a boolean depending on whether or not two expressions have matching values.

3.4.2 Fixed and General Response Processing

There are two forms of response processing:

  1. Fixed Template Response Processing
  2. General Response Processing.

In  "fixed template" response processing, the processing to be done is identified by a "template name".   There are three standard template names, and a delivery engine may define additional template names.   For simple scenarios, the "match_correct" and "map_response" standard templates may be used because this maximizes interoperability.   All conformant delivery systems are required to provide response processing as defined by these two templates, while there is no assurance that a template other than these two will be supported, or that general response processing will be supported.

The three standard "fixed" response processing templates are:

Template Name Description Location
match_correct https://purl.imsglobal.org/spec/qti/v3p0/rptemplates/match_correct.xml
map_response https://purl.imsglobal.org/spec/qti/v3p0/rptemplates/map_response.xml
map_response_point https://purl.imsglobal.org/spec/qti/v3p0/rptemplates/map_response_point.xml

For "general" response processing, QTI defines an XML-based Domain Specific Language (DSL) with a large number of commands and operators for computing and setting template and outcome variables. General response processing is necessary for more complex items, such as items generated from templates, adaptive items involving feedback, and composite items.

The same Domain Specific Language is also used for Outcome Processing, Template Defaults, Constraints, and Processing, and for evaluating Preconditions and Branch Rules.

3.4.3 Partial Scoring

Please see section 3.3 Composite Items for an example of response processing that implements partial scoring.

3.4.4 Conformance

It is possible to define the effect of the standard templates using the "general" response processing DSL, but it is not required that a QTI 3 Entry-level delivery system implement the standard templates through support of the DSL. A "built-in" implementation of the standard templates is sufficient for conformance in a QTI 3 Entry-level delivery system.

At the QTI 3 Core-level of conformance, a delivery system is required to support enough of the response processing DSL to be able to load and execute at least the "match_correct" and "map_response" standard templates, as well as other templates or inline response processing blocks using the same subset of the Domain Specific Language as these two standard templates.  For convenience and performance, a QTI 3 Core-level delivery system may still also use the "built-in" approach for some of the templates which it supports, in addition to supporting the response processing language.

3.4.5 External Scoring

In some cases, response processing is undertaken by external systems or human scorers. This is typically the case for items asking candidates to write an essay. However, it might be important for external systems or human scorers to know which outcome value has to be set to derive an appropriate score.

External Scoring Example

<qti-assessment-item 
     xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 
    https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd" identifier="essay" 
     title="Write an essay" adaptive="false" time-dependent="false" xml:lang="eng-US">
  <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="string"/>
  <qti-outcome-declaration identifier="SCORE" cardinality="single" base-type="float"  external-scored="human"/>
  <qti-item-body>
     <p class="stem">
        In the classroom, we discovered Martin Luther King Jr. and his devotion.
     </p>
     <qti-extended-text-interaction response-identifier="RESPONSE">
        <qti-prompt>Write an abstract about the life of this historical figure.</qti-prompt>
     </qti-extended-text-interaction>
  </qti-item-body>
  </qti-assessment-item>

This example describes an item with a single qti-extended-text-interactionasking the candidate to write an essay. As the item does not contain qti-response-processing, the SCORE qti-outcome-declaration has its external-scored attribute value set to "human". This makes QTI compliant systems aware that the final value of SCORE has to be set by a human scorer after the Item Session has closed.

3.5 Outcomes

Outcome variables are declared by outcome declarations. Their value is set either from a default given in the declaration itself or by a responseRule during responseProcessing.

Items that declare a numeric outcome variable representing the candidate's overall performance on the item should use the "SCORE" built-in outcome variable. SCORE must have a base-type of float.

Items that declare a maximum score (in multiple response choice interactions, for example) should do so by declaring the built-in variable named "MAXSCORE".  MAXSCORE must have a base-type of float.

Items or tests that want to make the fact that the candidate scored above a predefined threshold available as a variable should use the built-in "PASSED' outcome variable. PASSED must have a base-type of boolean.

At runtime, outcome variables are instantiated as part of an item session. Their values may be initialized with a default value and/or set during response processing. If no default value is given in the declaration then the outcome variable is initialized to NULL unless the outcome is of a numeric type (integer or float) in which case it is initialized to 0.

For non-adaptive Items; i.e., items that do not use template processing to compute default values, the values of the outcome variables are reset to their default values prior to each invocation of response processing. For adaptive Items, the outcome variables retain the values that were assigned to them during the previous invocation of response processing. For more information, see section 3.4.2 Fixed and General Response Processing .

There is one built-in outcome variable, "completionStatus", that is declared implicitly and must not appear in an outcomeDeclaration. Delivery Engines must maintain the value of the built-in outcome variable completionStatus, a single identifier. It starts with the reserved value "not_attempted". At the start of the first attempt it changes to the reserved value "unknown". It remains with this value for the duration of the item session unless set to a different value by a setOutcomeValue rule in responseProcessing. There are four permitted values:

  • 'completed' - the candidate has experienced enough of the item to consider it completed;
  • 'incomplete' - the candidate has not experienced enough of the item to consider it completed;
  • 'not_attempted' - the candidate is considered to have not used the item in any significant way;
  • 'unknown' - no assertion on the state of completion can be made.

Any one of these values may be set during response processing. If an Adaptive Item sets completionStatus to completed then the session must be placed into the closed state, however an item session is not required to wait for the completed signal before terminating, it may terminate in response to a direct request from the candidate, through running out of time or through some other exceptional circumstance. Adaptive Items must maintain a suitable value and should set completionStatus to "completed" to indicate when the cycle of interaction, response processing and feedback must stop. Non-adaptive Items are not required to set a value for completionStatus, but they may do so. Delivery Engines are encouraged to use the value of completionStatus when communicating externally.

OutcomeDeclaration Attributes (element: qti-outcome-declaration)

Name Usage Value(s) Default
identifier required Identifier
base-type required

Normalized string

  • identifier
  • boolean
  • integer
  • float
  • string
  • point
  • pair
  • directedPair
  • duration
  • file
  • uri
cardinality required

Normalized string

  • single
  • multiple
  • ordered
  • record
view optional

Normalized string

  • author
  • candidate
  • proctor
  • scorer
  • testConstructor
  • tutor
The intended audience for an outcome variable can be set with the view attribute. If no view is specified the outcome is treated as relevant to all views. Complex items, such as adaptive items or complex templates, may declare outcomes that are of no interest to the candidate at all, but are merely used to hold intermediate values or other information useful during the item or test session. Such variables should be declared with a view of author (for item outcomes) or testConstructor (for test outcomes). Systems may exclude outcomes from result reports on the basis of their declared view if appropriate. Where more than one class of user should be able to view an outcome variable the view attribute should contain a comma delimited list.
interpretation optional string A human interpretation of the variable's value.
long-interpretation optional uri

An optional link to an extended interpretation of the outcome variable's value.         

Declared outcomes with numeric types should indicate their range of possible values using normal-maximum and normal-minimum, especially if this range differs from [0,1].

Declared outcomes with numeric types should indicate their range of possible values using normal-maximum and normal-minimum, especially if this range differs from [0,1].

normal-maximum optional float The normal-maximum attribute optionally defines the maximum magnitude of numeric outcome variables, it must be a positive value. If given, the outcome's value can be divided by normal-maximum and then truncated (if necessary) to obtain a normalized score in the range [-1.0,1.0]. normal-maximum has no effect on response processing or the values that the outcome variable itself can take.
normal-minimum optional float The normal-minimum attribute optionally defines the minimum value of numeric outcome variables, it may be negative.
mastery-value optional float The mastery-value attribute optionally defines a value for numeric outcome variables above which the aspect being measured is considered to have been mastered by the candidate.

3.6 Stylesheets

QTI 3 introduces an extensive shared vocabulary for improving item interaction rendering interoperability (see Section 3.2.1 ).  To further improve item rendering interoperability, QTI 3 also introduces a limited number of shared CSS style names and conventions for use by authoring and delivery systems.  

By implementing these shared styles and conventions, QTI 3 authoring and delivery platforms can safely import/export – or render – items while preserving certain presentation characteristics without using custom stylesheet injection. Note that all of the shared styles are prefaced by the "qti-" string so as to avoid collisions with a delivery platform's existing CSS.

The following two sections provide an overview of the semantics of the shared CSS classes.  Reference implementations of each CSS class – and further examples – can be found in the IMS GitHub QTI 3 repository.  Over time, it is expected that additional shared CSS style names and definitions will be added to this repository.   Section 3.6.3  provides a description of how to use custom stylesheets in the event that the QTI shared CSS styles are insufficient.

3.6.1 General-Purpose Shared CSS Classes - Definitions and Examples

3.6.1.1 qti-underline
Semantics Example CSS Definition
Underline an element
.qti-underline { 
     text-decoration: underline;
  }
  
<p>Look at the <span class="qti-underline" >text</span> in the picture.</p>
   Look at the text in the picture
3.6.1.2 qti-italic
Semantics Example CSS Definition
Italicize an element
.qti-italic { 
     font-style: italic;
  }
  
<p>Look at the <span class="qti-italic" >text</span> in the picture.</p>
   Look at the text in the picture
3.6.1.3 qti-align-left | -center | -right
Semantics Example CSS Definition
Horizontal alignment, left, center, and right.
.qti-align-left { 
     text-align: left;
  }
  .qti-align-center { 
     text-align: center;
  }
  .qti-align-right { 
     text-align: right;
  }
  
<!-- Please see definitions of qti-fullwidth and qti-bordered classes later in Section 3.6 -->
  <table class=
  "
  qti-fullwidth qti-bordered
  "
  >
    <tbody>
      <tr>
        <td 
  class="qti-align-left"
  >I am left-aligned</td>
      </tr>
      <tr>
        <td 
  class="qti-align-center"
  >I am center-aligned</td>
      </tr>
      <tr>
        <td 
  class="qti-align-right"
  >I am right-aligned</td>
      </tr>
    </tbody>
  </table>
  
Figure 96 Note: Table border added for effect.
3 short sentences are shown on 3 different lines. The first line has the text starting at the far left. 
                        The second line is in the middle of the line (centered). The third line has the text ending at the far left.
3.6.1.4 qti-valign-top | -middle | -baseline | -bottom
Semantics Example CSS Definition
Vertical alignment, top, middle, baseline, and bottom.
.qti-valign-top {
     vertical-align: top;
  }
  .qti-valign-middle {
     vertical-align: middle;
  }
  .qti-valign-baseline {
     vertical-align: baseline;
  }
  .qti-valign-bottom {
     vertical-align: bottom;
  }
  
<!-- Please see definition of qti-bordered class later in Section 2 -->
  <p class="qti-bordered">
    <img 
  class="qti-valign-top"
   src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAcCAYAAABGdB6IAAAAFUlEQVR42mNkYPhfz4AEGEcF
    hosAAM7zKeUTvPB1AAAAAElFTkSuQmCC" hspace="4" vspace="0" width="4" height="28"/>
    I am top-valigned.
  </p>
  <p class="qti-bordered">
    <img 
  class="qti-valign-middle"
   src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAcCAYAAABGdB6IAAAAFUlEQVR42mNkYPhfz4AEGEcF
    hosAAM7zKeUTvPB1AAAAAElFTkSuQmCC" hspace="4" vspace="0" width="4" height="28"/>
    I am middle-valigned.
  </p>
  <p class="qti-bordered">
    <img 
  class="qti-valign-baseline"
   src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAcCAYAAABGdB6IAAAAFUlEQVR42mNkYPhfz4AEGEcF
    hosAAM7zKeUTvPB1AAAAAElFTkSuQmCC" hspace="4" vspace="0" width="4" height="28"/>
    I am baseline-valigned.
  </p>
  <p class="qti-bordered">
    <img 
  class="qti-valign-bottom"
   src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAcCAYAAABGdB6IAAAAFUlEQVR42mNkYPhfz4AEGEcF
    hosAAM7zKeUTvPB1AAAAAElFTkSuQmCC" hspace="4" vspace="0" width="4" height="28"/>
    I am bottom-valigned.
  </p>
  
Figure 97 Note: Paragraph borders and 28px images added for effect.
4 short sentences are shown within boxes. The first sentence shows the text at the top of the box. 
                        The second sentence shows the text middle of the box. 
                        The third sentence shows the text at the bottom, with the descenders of the letters dropping below. 
                        The fourth sentence shows the text at the bottom of the box, with the descenders within the box.
3.6.1.5 qti-fullwidth
Semantics Example CSS Definition
Set the width of the element to 100% of the width of the element's container.
.qti-fullwidth { 
     width: 100%;
  }
  
<table 
  class="qti-fullwidth
   qti-bordered
  "
  >
    <tbody>
      <tr>
        <td class="qti-align-left">I am left-aligned</td>
      </tr>
      <tr>
        <td class="qti-align-center">I am center-aligned</td>
      </tr>
      <tr>
        <td class="qti-align-right">I am right-aligned</td>
      </tr>
    </tbody>
  </table>
  
Note: Table border added for effect.  Table expands to 100% width of its container.
3.6.1.6 qti-hidden
3.6.1.7 qti-visually-hidden
Semantics Example CSS Definition

Completely hide, or visually-hide, an element.

A completely hidden element is neither visually-perceptible nor "visible" to assistive technology.

A common use-case for qti-hidden is to have dormant content loaded in the delivery system's DOM, but imperceptible to sighted and non-sighted candidates.

A visually hidden element is not visually perceptible.  However,  it is "visible" to assistive technology.

A common use-case for qti-visually-hidden is to use this class in conjunction with another adjacent DOM element that is aria-hidden.  The visually-hidden element is visible to assistive technology, but invisible to sighted candidates.  The aria-hidden element is hidden from assistive technology but visible to sighted candidates.

.qti-hidden {
     display: none;
  }
  .qti-visually-hidden {
     position:fixed !important;
     overflow: hidden;
     clip: rect(1px 1px 1px 1px);
     height: 1px;
     width: 1px;
     border: 0;
     margin: -1px;
  }
  

Example: qti-hidden

<p 
  class="qti-hidden"
  >
     I am content that is completely hidden from sighted and non-sighted users.
  </p>
  

Example: span's that are qti-visually-hidden and aria-hidden together

<p>
     Jane paid <span 
  class="qti-visually-hidden"
  >25 dollars</span><span 
  aria-hidden="true"
  >$25.00</span> for the taxi fare.
  </p>
  
3.6.1.8 qti-bordered
3.6.1.9 qti-well
Semantics Example CSS Definition

qti-bordered adds a visual border to an element.

qti-well adds a "well" to an element.  A "well" is a UI convention of adding visual importance to an element.  Increased visual importance is usually achieved by adding both a border and background + foreground colors to the element.  The background color should be chosen by the delivery platform so as not violate WCAG AA guidelines for foreground color textual contrast.

.qti-bordered { 
     border: 1px solid #888888;
  padding
  : 2px;
  }
  .qti-well {
     min-height:20px;
     padding:19px;
     margin-bottom:20px;
     background-color:#f5f5f5;
     border:1px solid #e3e3e3;
     border-radius:4px;
     box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);
  }
  
<div>
     <p>
        Ho hum.  I am a non-bordered paragraph.
     </p>
     <p 
  class="qti-bordered"
  >
        Look at me! I am a bordered paragraph.
     </p>
     <p>
       I am yet another non-bordered paragraph.
     </p>
  </div>
  <div>
     <p>
        Ho hum.  I am a non-bordered paragraph.
     </p>
     <p 
  class="qti-well"
  >
        Look at me! I am in a well!
     </p>
     <p>
       I am yet another non-bordered paragraph.
     </p>
  </div>