Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
50.00% |
3 / 6 |
|
25.00% |
1 / 4 |
CRAP | |
0.00% |
0 / 1 |
| DeliveryExecutionReactivated | |
50.00% |
3 / 6 |
|
25.00% |
1 / 4 |
6.00 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getDeliveryExecution | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getUser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 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) 2018 (original work) Open Assessment Technologies SA; |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | namespace oat\taoDelivery\models\classes\execution\event; |
| 23 | |
| 24 | use oat\oatbox\event\Event; |
| 25 | use oat\oatbox\user\User; |
| 26 | use oat\taoDelivery\model\execution\DeliveryExecutionInterface; |
| 27 | |
| 28 | class DeliveryExecutionReactivated implements Event, DeliveryExecutionAwareInterface |
| 29 | { |
| 30 | public const LOG_KEY = 'TEST_REACTIVATED'; |
| 31 | |
| 32 | private $deliveryExecution; |
| 33 | private $user; |
| 34 | private $reason; |
| 35 | |
| 36 | |
| 37 | /** |
| 38 | * QtiMoveEvent constructor. |
| 39 | * @param DeliveryExecutionInterface $deliveryExecution |
| 40 | * @param User $user |
| 41 | * @param null $reason |
| 42 | */ |
| 43 | public function __construct(DeliveryExecutionInterface $deliveryExecution, User $user, $reason = null) |
| 44 | { |
| 45 | $this->deliveryExecution = $deliveryExecution; |
| 46 | $this->user = $user; |
| 47 | $this->reason = $reason; |
| 48 | } |
| 49 | |
| 50 | |
| 51 | /** |
| 52 | * @return string |
| 53 | */ |
| 54 | public function getName() |
| 55 | { |
| 56 | return __CLASS__; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * @return \oat\taoDelivery\model\execution\DeliveryExecution|DeliveryExecutionInterface |
| 61 | */ |
| 62 | public function getDeliveryExecution() |
| 63 | { |
| 64 | return $this->deliveryExecution; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * @return User |
| 69 | */ |
| 70 | public function getUser() |
| 71 | { |
| 72 | return $this->user; |
| 73 | } |
| 74 | } |