## 1.6. Resource IMS QTI

Resources of type IMS QTI accept IMS QTI v1.2.1 compliant tests and surveys. The package (with the QTI XML source and media files) comes as a simple ZIP file. The QTI XML has to be in the root of the ZIP an named as `qti.xml`. This type of resource can either be launched directly from the repository as a self-test where no results get persisted or included in a course via test and survey building blocks.

### 1.6.1. Editor

OLAT includes an editor for QTI files. The editor offers single and multiple choice, fill in blank and free text as type of questions (the latter only in surveys). Since QTI does not define different types of questions, the editor relies on a nameing scheme to identifie the type of question. This is done via an encoded imte id in the form `QTIEDITOR:SCQ:123` where QTIEDITOR denotes that this item was created with the OLAT editor, SCQ denotes the type of question (other types are MCQ, FIB and KPRIM) and finally the number is a file unique ID. See `QTIEditorHelper` for details.

It is important to note, that the editor does not allow to work with arbitrary QTI files created by other editors or manually. It can only edit questions which originate from the editor itself. If you do any manual changes to the generated qti.xml file, your changes may get lost when loaded again in the editor or the item may not be editable anymore. The qti.xml is parsed and converted into an internal structure within the editor. Upon saving the file, the qti.xml is generated from scratch based on the internal structure.

### 1.6.2. Runtime

The QTI runtime implemented within OLAT can handle almost all features of QTI 1.2.1, much more than the editor can actually handle. So you may not be able to edit files generated manually or by external editors but your files are most probably fine for the runtime.

The runtime allows tests to be resumed in case the user's browser crashes. For this, a dump of the whole runtime information is written to the filesystem after every response. These files are stored in `PATH_TO_OLATDATA/qtiser/USERNAME/QTI_RUN_ID/qti.ser` . If the user starts the test again, the workflow will resume based on the information stored in this file and the user should start again from where she left last time.

### 1.6.3. Results

The results of a test run are stored in XML files based on the IMS QTI Results Reporting standard. The source of the questions is added to the results reporting for further reference. The files are stored in `PATH_TO_OLATDATA/resreporting/USERNAME/QTI_RUN_ID.xml` . The results reporting XML is transformed with a stylesheet to present the results in HTML to the user. You'll find the stylesheets in the package `org.olat.ims.resource.xsl`. The stylesheets come in different languages where the language specific strings are defined in the prologue. This is the last bit of XSLT within OLAT.

### 1.6.4. Disabling of collaboration tools

In a real world test situation, people may not want students to be able to exchange information with each other during the actual test. For this reason, if in a test (this does not aply for self-tests of surveys), all collaboration tools will be disabled. These include the instant messaging system and the buddy groups for the specific user. All collaboration tools will be re-enabled, when the user successfully finishes her test.