This project aims to develop a simple methodology for making use of QTI files within PHP applications. The approach starts from the standpoint that it should be:
1) Useable on the vast majority of PHP-enabled servers (i.e. requiring no unusual modules or setups)
This means that we need to write some kind of function library to deal with QTI files. This leads us to the second standpoint, that it should be:
2) A lightweight skin on top of PHP's built-in event-based XML parser (called Expat)
An event-based parser scans through the input data as it receives it, and reacts to individual elements that it finds. This is better than a tree-based parser for our purposes since it doesn't need to build a full representation of the file in memory, meaning it can, for example, parse even very large files.
Once we've implemented a few functions on top of the event-based parser, there's actually very little to do except decide what we want to do with the data. Therefore the project provides templates for doing the following:
Others in the university system are developing an alternative strategy to using QTI within PHP, by writing a PHP QTI "module" which can be installed on a PHP server. This is a better approach in cases where you have access to the server and can install new modules, since performance can be optimised much better - so I'll certainly post links to it here when that is released. However, the method presented here is preferable in cases where you want to be "agnostic" about the server, and run on any old PHP server.
Dan Stowell, July 2004