Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2008-2010 (original work) Deutsche Institut für Internationale Pädagogische Forschung |
| 19 | * (under the project TAO-TRANSFER); |
| 20 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor |
| 21 | * (under the project TAO-SUSTAIN & TAO-DEV); |
| 22 | * 2013 (update and modification) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 23 | */ |
| 24 | |
| 25 | /** |
| 26 | * Interface to implement by item models |
| 27 | * |
| 28 | * @access public |
| 29 | * @author Joel Bout, <joel@taotesting.com> |
| 30 | * @package taoItems |
| 31 | |
| 32 | */ |
| 33 | interface taoItems_models_classes_itemModel |
| 34 | { |
| 35 | public const CLASS_URI_MODELS = 'http://www.tao.lu/Ontologies/TAOItem.rdf#ItemModels'; |
| 36 | public const CLASS_URI_RUNTIME = 'http://www.tao.lu/Ontologies/TAOItem.rdf#ItemRuntime'; |
| 37 | public const CLASS_URI_QTI = 'http://www.tao.lu/Ontologies/TAOItem.rdf#QTI'; |
| 38 | |
| 39 | /** |
| 40 | * constructor called by itemService |
| 41 | * |
| 42 | * @access public |
| 43 | * @author Joel Bout, <joel@taotesting.com> |
| 44 | * @return mixed |
| 45 | */ |
| 46 | public function __construct(); |
| 47 | |
| 48 | /** |
| 49 | * render used for deploy and preview |
| 50 | * |
| 51 | * @access public |
| 52 | * @author Joel Bout, <joel@taotesting.com> |
| 53 | * @param Resource item |
| 54 | * @param string languageCode the langauge code the item should be rendered in |
| 55 | * @return string the html representation of the item |
| 56 | * @throws taoItems_models_classes_ItemModelException |
| 57 | */ |
| 58 | public function render(core_kernel_classes_Resource $item, $languageCode); |
| 59 | |
| 60 | /** |
| 61 | * |
| 62 | * @param core_kernel_classes_Resource $item |
| 63 | * @param unknown $languageCode |
| 64 | */ |
| 65 | public function getPreviewUrl(core_kernel_classes_Resource $item, $languageCode); |
| 66 | |
| 67 | /** |
| 68 | * Get the full url of the implementation authoring |
| 69 | * @param core_kernel_classes_Resource $item |
| 70 | * @return string the authoring URL |
| 71 | */ |
| 72 | public function getAuthoringUrl(core_kernel_classes_Resource $item); |
| 73 | |
| 74 | /** |
| 75 | * Returns a compiler class for the item |
| 76 | * |
| 77 | * @return tao_models_classes_Compiler |
| 78 | */ |
| 79 | public function getCompilerClass(); |
| 80 | |
| 81 | /** |
| 82 | * Return the Packable implementation for the given item model. |
| 83 | * Packing is an alternative to Compilation. A Packer generates the |
| 84 | * data needed to run an item where the compiler creates a stand alone |
| 85 | * item. |
| 86 | * |
| 87 | * @return oat\taoItems\model\pack\ItemPacker the packer class to instantiate |
| 88 | */ |
| 89 | public function getPackerClass(); |
| 90 | } |