/
DeliveryMonitoringService.php
130 lines (111 loc) · 4.23 KB
/
DeliveryMonitoringService.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
/**
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; under version 2
* of the License (non-upgradable).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2015 (original work) Open Assessment Technologies SA;
*
*
*/
namespace oat\taoProctoring\model\monitorCache;
use oat\taoDelivery\model\execution\DeliveryExecutionInterface;
use oat\taoDelivery\model\execution\Delete\DeliveryExecutionDelete;
/**
* Interface DeliveryMonitoringService
*
* @package oat\taoProctoring\model
* @author Aleh Hutnikau <hutnikau@1pt.com>
*/
interface DeliveryMonitoringService extends DeliveryExecutionDelete
{
/**
* @deprecated
*/
public const CONFIG_ID = 'taoProctoring/DeliveryMonitoring';
/**
* Service Id of the main Monitoring Cache Service
* @var string
*/
public const SERVICE_ID = 'taoProctoring/DeliveryMonitoring';
public const ID = 'id';
public const DELIVERY_EXECUTION_ID = 'delivery_execution_id';
public const STATUS = 'status';
public const CURRENT_ASSESSMENT_ITEM = 'current_assessment_item';
public const TEST_TAKER = 'test_taker';
public const AUTHORIZED_BY = 'authorized_by';
public const START_TIME = 'start_time';
public const END_TIME = 'end_time';
public const REMAINING_TIME = 'remaining_time';
public const EXTRA_TIME = 'extra_time';
public const EXTENDED_TIME = 'extended_time';
public const CONSUMED_EXTRA_TIME = 'consumed_extra_time';
public const ALLOW_EXTRA_TIME = 'allow_extra_time';
public const LAST_TEST_TAKER_ACTIVITY = 'last_test_taker_activity';
public const LAST_TEST_STATE_CHANGE = 'last_test_state_change';
public const LAST_PAUSE_TIMESTAMP = 'last_pause_timestamp';
public const DIFF_TIMESTAMP = 'diff_timestamp';
public const ITEM_DURATION = 'item_duration';
public const STORED_ITEM_DURATION = 'stored_item_duration';
public const TEST_TAKER_FIRST_NAME = 'test_taker_first_name';
public const TEST_TAKER_LAST_NAME = 'test_taker_last_name';
public const DELIVERY_ID = 'delivery_id';
public const DELIVERY_NAME = 'delivery_name';
public const CONNECTIVITY = 'last_connect';
public const REACTIVATE_AUTHORIZED_BY = 'reactivate_authorized_by';
/**
* @param DeliveryExecutionInterface $deliveryExecution
* @param $data
* @return DeliveryMonitoringData
*/
public function createMonitoringData(DeliveryExecutionInterface $deliveryExecution, $data);
/**
* Retrieve the currently cached delivery data
*
* @param DeliveryExecutionInterface $deliveryExecution
* @return DeliveryMonitoringData
*/
public function getData(DeliveryExecutionInterface $deliveryExecution);
/**
* @return DeliveryMonitoringData[]
*/
public function find();
/**
* @param DeliveryMonitoringData $deliveryMonitoring
* @return mixed
*/
public function save(DeliveryMonitoringData $deliveryMonitoring);
/**
* @param DeliveryMonitoringData $deliveryMonitoring
* @return mixed
*/
public function partialSave(DeliveryMonitoringData $deliveryMonitoring);
/**
* @param DeliveryMonitoringData $deliveryMonitoring
* @return mixed
*/
public function delete(DeliveryMonitoringData $deliveryMonitoring);
/**
* @return integer
*/
public function count();
/**
* Get statistic by statuses grouped by deliveries.
* Result is an array of deliveries with amount of delivery executions in each status
*/
public function getStatusesStatistic($limit = 0, $offset = 0, $orderby = 'delivery_name', $orderdir = 'asc');
/**
* Count statistic by statuses grouped by deliveries.
*/
public function getCountOfStatistics();
}