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 | use oat\taoTests\models\pack\Packable; |
26 | |
27 | /** |
28 | * Interface to implement by test models |
29 | * |
30 | * @access public |
31 | * @author Joel Bout, <joel@taotesting.com> |
32 | * @package taoItems |
33 | |
34 | */ |
35 | interface taoTests_models_classes_TestModel |
36 | { |
37 | /** |
38 | * Prepare the content of the test, |
39 | * using the provided items if possible |
40 | * |
41 | * @param core_kernel_classes_Resource $test |
42 | * @param array $items an array of item resources |
43 | */ |
44 | public function prepareContent(core_kernel_classes_Resource $test, $items = []); |
45 | |
46 | /** |
47 | * Delete the content of the test |
48 | * |
49 | * @param Resource $test |
50 | */ |
51 | public function deleteContent(core_kernel_classes_Resource $test); |
52 | |
53 | /** |
54 | * Returns all the items potenially used within the test |
55 | * |
56 | * @param Resource $test |
57 | * @return array an array of item resources |
58 | */ |
59 | public function getItems(core_kernel_classes_Resource $test); |
60 | |
61 | /** |
62 | * returns the test authoring url |
63 | * |
64 | * @param core_kernel_classes_Resource $test the test instance |
65 | * @return string the authoring url |
66 | */ |
67 | public function getAuthoringUrl(core_kernel_classes_Resource $test); |
68 | |
69 | /** |
70 | * Clones the content of one test to another test, |
71 | * assumes that other test has already been cleaned (using deleteContent()) |
72 | * |
73 | * @access public |
74 | * @author Joel Bout, <joel@taotesting.com> |
75 | * @param core_kernel_classes_Resource $source |
76 | * @param core_kernel_classes_Resource $destination |
77 | */ |
78 | public function cloneContent(core_kernel_classes_Resource $source, core_kernel_classes_Resource $destination); |
79 | |
80 | /** |
81 | * Returns the compiler class of the test |
82 | * |
83 | * @return string |
84 | */ |
85 | public function getCompilerClass(); |
86 | |
87 | /** |
88 | * Return the Packable implementation for the given test model. |
89 | * Packing is an alternative to Compilation. A Packer generates the |
90 | * data needed to run a test where the compiler creates a stand alone |
91 | * test. |
92 | * |
93 | * @return Packable the packer class to instantiate |
94 | */ |
95 | public function getPackerClass(); |
96 | } |