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) 2017  (original work) Open Assessment Technologies SA;
19 *
20 * @author Alexander Zagovorichev <zagovorichev@1pt.com>
21 */
22
23namespace oat\taoProctoring\model;
24
25use oat\oatbox\user\User;
26use oat\taoProctoring\model\monitorCache\DeliveryMonitoringData;
27
28/**
29 * Interface for services that manage proctor access rights
30 */
31interface ProctorServiceInterface
32{
33    public const SERVICE_ID = 'taoProctoring/ProctorAccess';
34
35    /**
36     * Gets all deliveries available for a proctor
37     * @param User $proctor
38     * @param string $context
39     * @return \core_kernel_classes_Resource[] deliveries
40     */
41    public function getProctorableDeliveries(User $proctor, $context = null);
42
43    /**
44     * Returns the data of the delivery executions the proctor is allowed to see and manager
45     *
46     * @param User $proctor
47     * @param \core_kernel_classes_Resource $delivery
48     * @param string $context
49     * @param array $options
50     * @return DeliveryMonitoringData[]
51     */
52    public function getProctorableDeliveryExecutions(User $proctor, $delivery = null, $context = null, $options = []);
53
54    /**
55     * Returns the ammount of delivery ececutions a proctor is allowed to administer.
56     * Uses the same filtering options as getProctorableDeliveryExecutions
57     *
58     * @param User $proctor
59     * @param \core_kernel_classes_Resource $delivery
60     * @param string $context
61     * @param array $options
62     * @return integer
63     */
64    public function countProctorableDeliveryExecutions(User $proctor, $delivery = null, $context = null, $options = []);
65}