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) 2021 (original work) Open Assessment Technologies SA; |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | declare(strict_types=1); |
| 23 | |
| 24 | namespace oat\taoProctoring\model\listener; |
| 25 | |
| 26 | use common_exception_Error; |
| 27 | use common_exception_NotFound; |
| 28 | use Exception; |
| 29 | use oat\tao\model\event\MetadataModified; |
| 30 | use oat\taoDelivery\models\classes\execution\event\DeliveryExecutionCreated; |
| 31 | use oat\taoDelivery\models\classes\execution\event\DeliveryExecutionReactivated; |
| 32 | use oat\taoDelivery\models\classes\execution\event\DeliveryExecutionState; |
| 33 | use oat\taoProctoring\model\authorization\AuthorizationGranted; |
| 34 | use oat\taoQtiTest\models\event\QtiTestStateChangeEvent; |
| 35 | use oat\taoTests\models\event\TestChangedEvent; |
| 36 | |
| 37 | interface MonitoringListenerInterface |
| 38 | { |
| 39 | public const SERVICE_ID = 'taoProctoring/MonitoringListener'; |
| 40 | |
| 41 | /** |
| 42 | * @throws common_exception_NotFound |
| 43 | */ |
| 44 | public function executionCreated(DeliveryExecutionCreated $event): void; |
| 45 | |
| 46 | /** |
| 47 | * @throws common_exception_Error|common_exception_NotFound|Exception |
| 48 | */ |
| 49 | public function executionStateChanged(DeliveryExecutionState $event): void; |
| 50 | /** |
| 51 | * Something changed in the state of the test execution (for example: the current item in the test) |
| 52 | * |
| 53 | * @throws common_exception_NotFound|common_exception_Error |
| 54 | */ |
| 55 | public function testStateChanged(TestChangedEvent $event): void; |
| 56 | |
| 57 | /** |
| 58 | * The status of the test execution has change (for example: from running to paused) |
| 59 | * |
| 60 | * @throws common_exception_NotFound |
| 61 | */ |
| 62 | public function qtiTestStatusChanged(QtiTestStateChangeEvent $event): void; |
| 63 | |
| 64 | /** |
| 65 | * Update the label of the delivery across the entry cache |
| 66 | * |
| 67 | * @param MetadataModified $event |
| 68 | */ |
| 69 | public function deliveryLabelChanged(MetadataModified $event): void; |
| 70 | |
| 71 | /** |
| 72 | * Set the proctor who authorized this delivery execution |
| 73 | * |
| 74 | * @throws common_exception_NotFound |
| 75 | */ |
| 76 | public function deliveryAuthorized(AuthorizationGranted $event): void; |
| 77 | |
| 78 | /** |
| 79 | * @throws common_exception_NotFound |
| 80 | */ |
| 81 | public function catchTestReactivatedEvent(DeliveryExecutionReactivated $event): void; |
| 82 | } |