PHPackages                             qtism/qtism - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. qtism/qtism

ActiveLibrary[Templating &amp; Views](/categories/templating)

qtism/qtism
===========

OAT QTI-SDK

v19.7.1(5mo ago)86193.8k↑15.5%31[6 PRs](https://github.com/oat-sa/qti-sdk/pulls)5GPL-2.0-onlyPHPPHP &gt;=7.4CI failing

Since Oct 2Pushed 5mo ago44 watchersCompare

[ Source](https://github.com/oat-sa/qti-sdk)[ Packagist](https://packagist.org/packages/qtism/qtism)[ Docs](http://www.taotesting.com)[ RSS](/packages/qtism-qtism/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (314)Used By (5)

[![QTI-SDK](https://cloud.githubusercontent.com/assets/4217431/6734391/3b3ef4e8-ce58-11e4-83a1-d6e39a91400f.png)](https://cloud.githubusercontent.com/assets/4217431/6734391/3b3ef4e8-ce58-11e4-83a1-d6e39a91400f.png)

[![Latest Version](https://camo.githubusercontent.com/540f96a8609e0617c59271ec3aee1ac77dbbcb0c6adb34f4fd1416b8918c93c3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6f61742d73612f7174692d73646b2e7376673f7374796c653d666c6174266c6162656c3d72656c65617365)](https://github.com/oat-sa/qti-sdk/tags)[![Coverage Status](https://camo.githubusercontent.com/dddea3dbcfa0928c043c21ba16c161a23340485a7953d8eb094e24d46cfa2820/68747470733a2f2f636f6465636f762e696f2f67682f6f61742d73612f7174692d73646b2f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d5a3032494e364e536d70)](https://codecov.io/gh/oat-sa/qti-sdk)[![License GPL2](https://camo.githubusercontent.com/90da7202938d9360028ca7e8c0ac9cb498a2e3e3f32fc31ad19fac128277396c/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e63652d67706c322d626c75652e737667)](http://www.gnu.org/licenses/gpl-2.0.html)[![Packagist Downloads](https://camo.githubusercontent.com/33391aa688ff2b9a13837897fbbbe8a7618c4dff3a1812b913bd07ace40abe03/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f717469736d2f717469736d2e737667)](https://packagist.org/packages/qtism/qtism)

QTI Software Development Kit for PHP
====================================

[](#qti-software-development-kit-for-php)

A 1EdTech QTI (Question &amp; Test Interoperability) Software Development Kit for PHP 7.4 and higher supporting a wide range of features described by the [1EdTech QTI specification family](https://www.1edtech.org/standards/qti/index).

**This implementation of QTI is under constant enhancement. The API of the master branch might change at any time.**

Features
--------

[](#features)

- Targets QTI 2.0, 2.1 and partially 2.2
- Complete QTI Information Model
- Complete QTI Rule Engine Support
- Custom Operator Hooks through PSR-0/PSR-4
- [Wilbert Kraan's](http://blogs.cetis.ac.uk/wilbert/2013/11/06/using-standards-to-make-assessment-in-e-textbooks-scalable-engaging-but-robust) / [Steve Lay's](http://swl10.blogspot.co.uk/2013/09/transforming-qti-v2-into-xhtml-5.html) Goldilocks Rendering
- CSS Parser for direct QTI Information Model mapping at rendering time
- Item and Test Sessions (with lightning fast binary persistence)
- Nice and Clean API for QTI Document manipulation/traversal
- PreConditions &amp; Branching
- Selection and Ordering
- Response, Outcome and Template Processing
- aria-\* attributes
- Unit test driven

Installation (developers)
-------------------------

[](#installation-developers)

1. Clone the repository.
2. Make sure you know how [Composer](https://getcomposer.org/download/) works and it is installed on your system.
3. php composer.phar install
4. You are ready!

Unit Tests (developers)
-----------------------

[](#unit-tests-developers)

Run Unit Tests by invoking the following shell command:

```
cp phpunit.xml.dist phpunit.xml
./vendor/bin/phpunit test
```

Contribute
----------

[](#contribute)

We are always looking for people to feed the project with:

- Bug reports
- Unit tests
- New features

[Please make yourself known](https://github.com/bugalot)!

QTI Item Session Management
---------------------------

[](#qti-item-session-management)

### Introduction Example

[](#introduction-example)

The following example demonstrates how to instantiate an item session for a given QTI XML item document. The item in use in this example is the [*"Composition of Water"*](http://www.imsglobal.org/question/qtiv2p1/examples/items/choice_multiple.xml) item, from the [QTI 2.1 Implementation Guide](http://www.imsglobal.org/question/qtiv2p1/imsqti_implv2p1.html).

```
