Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
25.00% |
1 / 4 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| TestPackageExport | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| getLabel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getFormTitle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getTestExporter | |
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) 2022 (original work) Open Assessment Technologies SA; |
| 19 | */ |
| 20 | |
| 21 | declare(strict_types=1); |
| 22 | |
| 23 | namespace oat\taoQtiTest\models\export\Formats\Package2p2; |
| 24 | |
| 25 | use core_kernel_classes_Resource as Resource; |
| 26 | use oat\taoQtiTest\models\export\AbstractTestExport; |
| 27 | use oat\taoQtiTest\models\export\QtiTestExporterInterface; |
| 28 | use taoQtiTest_models_classes_QtiTestServiceException as QtiTestServiceException; |
| 29 | |
| 30 | class TestPackageExport extends AbstractTestExport |
| 31 | { |
| 32 | protected const VERSION = '2.2'; |
| 33 | |
| 34 | public function getLabel(): string |
| 35 | { |
| 36 | return __('QTI Test Package %s', self::VERSION); |
| 37 | } |
| 38 | |
| 39 | protected function getFormTitle(): string |
| 40 | { |
| 41 | return __('Export QTI %s Test Package', self::VERSION); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * @throws QtiTestServiceException |
| 46 | */ |
| 47 | protected function getTestExporter(Resource $test): QtiTestExporterInterface |
| 48 | { |
| 49 | return new QtiTestExporter($test, $this->getZip(), $this->getEmptyManifest()); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | // for backward compatibility |
| 54 | // phpcs:disable PSR1.Files.SideEffects |
| 55 | class_alias(TestPackageExport::class, 'taoQtiTest_models_classes_export_TestExport22'); |
| 56 | // phpcs:enable PSR1.Files.SideEffects |