Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
8 / 8 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
1 / 1 |
| GenerateReturnUrlCommand | |
100.00% |
8 / 8 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
| isCustomFeedback | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getQueryStringData | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getLaunchData | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getDeliveryExecution | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 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) 2023 (original work) Open Assessment Technologies SA. |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | declare(strict_types=1); |
| 23 | |
| 24 | namespace oat\ltiDeliveryProvider\model\navigation\Command; |
| 25 | |
| 26 | use oat\taoLti\models\classes\LtiLaunchData; |
| 27 | use oat\taoDelivery\model\execution\DeliveryExecutionInterface; |
| 28 | |
| 29 | class GenerateReturnUrlCommand |
| 30 | { |
| 31 | private LtiLaunchData $launchData; |
| 32 | private DeliveryExecutionInterface $deliveryExecution; |
| 33 | private bool $isCustomFeedback; |
| 34 | private array $queryStringData; |
| 35 | |
| 36 | public function __construct( |
| 37 | LtiLaunchData $launchData, |
| 38 | DeliveryExecutionInterface $deliveryExecution, |
| 39 | bool $isCustomFeedback = false, |
| 40 | array $queryStringData = [] |
| 41 | ) { |
| 42 | $this->launchData = $launchData; |
| 43 | $this->deliveryExecution = $deliveryExecution; |
| 44 | $this->isCustomFeedback = $isCustomFeedback; |
| 45 | $this->queryStringData = $queryStringData; |
| 46 | } |
| 47 | |
| 48 | public function isCustomFeedback(): bool |
| 49 | { |
| 50 | return $this->isCustomFeedback; |
| 51 | } |
| 52 | |
| 53 | public function getQueryStringData(): array |
| 54 | { |
| 55 | return $this->queryStringData; |
| 56 | } |
| 57 | |
| 58 | public function getLaunchData(): LtiLaunchData |
| 59 | { |
| 60 | return $this->launchData; |
| 61 | } |
| 62 | |
| 63 | public function getDeliveryExecution(): DeliveryExecutionInterface |
| 64 | { |
| 65 | return $this->deliveryExecution; |
| 66 | } |
| 67 | } |