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) 2014 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
19 *
20 */
21
22namespace oat\taoResultServer\models\classes;
23
24use oat\taoDelivery\model\execution\Delete\DeliveryExecutionDelete;
25
26interface ResultManagement extends \taoResultServer_models_classes_ReadableResultStorage, DeliveryExecutionDelete
27{
28    /**
29     * Get only one property from a variable
30     * @param string $variableId on which we want the property
31     * @param string $property to retrieve
32     * @return int|string the property retrieved
33     */
34    public function getVariableProperty($variableId, $property);
35
36    /**
37     * Get all the ids of the callItem for a specific delivery execution
38     * @param string $deliveryResultIdentifier The identifier of the delivery execution
39     * @return array the list of call item ids (across all results)
40     */
41    public function getRelatedItemCallIds($deliveryResultIdentifier);
42
43    /**
44     * Get all the ids of the callTest for a specific delivery execution
45     * @param string $deliveryResultIdentifier The identifier of the delivery execution
46     * @return array the list of call test ids (across all results)
47     */
48    public function getRelatedTestCallIds($deliveryResultIdentifier);
49
50    /**
51     * Get the result information (test taker, delivery, delivery execution) from filters
52     * @param array $delivery list of delivery to search : array('test','myValue')
53     * @param array $options params to restrict results array(
54     * "order"=> "deliveryResultIdentifier" || "testTakerIdentifier" || "deliveryIdentifier",
55     * "orderdir"=>"ASC" || "DESC",
56     * "offset"=> an int,
57     * "limit"=> an int
58     * )
59     * @return array of results that match the filter : array(array('deliveryResultIdentifier' => '123',
60     *               'testTakerIdentifier' => '456', 'deliveryIdentifier' => '789'))
61     */
62    public function getResultByDelivery($delivery, $options = []);
63
64    /**
65     * Count the number of result that match the filter
66     * @param array $delivery list of delivery to search : array('test','myValue')
67     * @return int the number of results that match filter
68     */
69    public function countResultByDelivery($delivery);
70
71    /**
72     * Remove the result and all the related variables
73     * @param string $deliveryResultIdentifier The identifier of the delivery execution
74     * @return boolean if the deletion was successful or not
75     */
76    public function deleteResult($deliveryResultIdentifier);
77
78    /**
79     * Get the complete variables list stored for delivery execution
80     * @param array|string $deliveryResultIdentifier
81     * @return mixed
82     */
83    public function getDeliveryVariables($deliveryResultIdentifier);
84}