Page under construction

How to add a new items type


First you need to add in the ontology your own items type, some example are available in taoItems/models/ontology such as the Surveyitems.

    Electronic version of paper based Question's

Here a second sample from paperbased.rdf

    Paper-based Items model
    Paper-based Item


If you look in the quoted samples below the RDF description will gather all additional content we may need to edit,preview and run the new type of Items.

Here some details about some specific property :

  • ItemModelStatus describe the maturity of the Items Type, we currently handle Stable, Experimental, Deprecated
  • ModelTarget will be use to handle different behavior for OnlineTarget or OfflineTarget mainly for Paperbased items.
  • ItemRuntime was used with legacy items to describe item’s runtime link
  • ItemAuthoring is used to describe item’s authoring link

Then to add your rdf file in TAO just used the following script

php tao/scripts/taoRDFImport.php -u taoManagerLogin -p taoManagerPassword -i taoItems/models/ontology/surveyItem.rdf

You may also add your file in the extension manifest to add this new Items type directly during TAO Installation, edit manifest.php, in install, rdf, you may add your own rdf file that will add your Item type during installation.

    'description' => 'the TAO Items extension provides the item creation, authoring and management',
    'additional' => array(
    'version' => '2.3',
    'author' => 'CRP Henri Tudor',
    'extends' => 'tao',
    'dependences' => array('tao'),
    'models' => array(
    'install' => array(
        'rdf' => array(
            dirname(__FILE__). '/models/ontology/taoitem.rdf'
    'classLoaderPackages' => array(


TAO 2.3 or earlier

Once your type is added into TAO you may customize the deploy method of taoItems/class.ItemsService.php to add your specific behavior for your new type. For now this service handle those type of Items.

$deployableItems = array(

In most of the case, the ItemsService just call a specific renderer to retrieve the content of the items to display. For instance the ItemsSurvey just rely on those line in the deploy method

else if($this->hasItemModel($item, array(TAO_ITEM_MODEL_SURVEY))) {
    $output = taoItems_models_classes_Survey_Item::renderItem($item);

TAO 2.4

Create a new class for your item type that implements the interface taoItems_models_classes_itemModel. Optionally it can also implement the interface taoItems_models_classes_evaluatableItemModel

Add the following property to the block of the item type.