Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| ProctorServiceDelegator | |
0.00% |
0 / 11 |
|
0.00% |
0 / 3 |
30 | |
0.00% |
0 / 1 |
| getProctorableDeliveries | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getProctorableDeliveryExecutions | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
6 | |||
| countProctorableDeliveryExecutions | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
6 | |||
| 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 | |
| 23 | namespace oat\taoProctoring\model; |
| 24 | |
| 25 | use oat\oatbox\service\ConfigurableService; |
| 26 | use oat\oatbox\user\User; |
| 27 | |
| 28 | /** |
| 29 | * Service which allows to use many proctorServices according to condition |
| 30 | * Class ProctorServiceDelegator |
| 31 | * @package oat\taoProctoring\model |
| 32 | */ |
| 33 | class ProctorServiceDelegator extends ServiceDelegator |
| 34 | { |
| 35 | /** @deprecated need to be used SERVICE_HANDLERS */ |
| 36 | public const PROCTOR_SERVICE_HANDLERS = self::SERVICE_HANDLERS; |
| 37 | |
| 38 | /** |
| 39 | * (non-PHPdoc) |
| 40 | * @see \oat\taoProctoring\model\ProctorServiceInterface::getProctorableDeliveries() |
| 41 | */ |
| 42 | public function getProctorableDeliveries(User $proctor, $context = null) |
| 43 | { |
| 44 | return $this->getResponsibleService($proctor)->getProctorableDeliveries($proctor, $context); |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * (non-PHPdoc) |
| 49 | * @see \oat\taoProctoring\model\ProctorServiceInterface::getProctorableDeliveryExecutions() |
| 50 | */ |
| 51 | public function getProctorableDeliveryExecutions(User $proctor, $delivery = null, $context = null, $options = []) |
| 52 | { |
| 53 | $deliveryId = $delivery ? $delivery->getUri() : null; |
| 54 | |
| 55 | return $this |
| 56 | ->getResponsibleService($proctor, $deliveryId) |
| 57 | ->getProctorableDeliveryExecutions($proctor, $delivery, $context, $options); |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * (non-PHPdoc) |
| 62 | * @see \oat\taoProctoring\model\ProctorServiceInterface::countProctorableDeliveryExecutions() |
| 63 | */ |
| 64 | public function countProctorableDeliveryExecutions(User $proctor, $delivery = null, $context = null, $options = []) |
| 65 | { |
| 66 | $deliveryId = $delivery ? $delivery->getUri() : null; |
| 67 | |
| 68 | return $this |
| 69 | ->getResponsibleService($proctor, $deliveryId) |
| 70 | ->countProctorableDeliveryExecutions($proctor, $delivery, $context, $options); |
| 71 | } |
| 72 | } |