| Code Coverage | ||||||||||
| Lines | Functions and Methods | Classes and Traits | ||||||||
| Total |  | 0.00% | 0 / 5 |  | 0.00% | 0 / 4 | CRAP |  | 0.00% | 0 / 1 | 
| Handler |  | 0.00% | 0 / 5 |  | 0.00% | 0 / 4 | 20 |  | 0.00% | 0 / 1 | 
| getLabel |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| createExporter |  | 0.00% | 0 / 2 |  | 0.00% | 0 / 1 | 2 | |||
| getExportForm |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| getExporterFactory |  | 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) 2024 (original work) Open Assessment Technologies SA; | 
| 19 | */ | 
| 20 | |
| 21 | declare(strict_types=1); | 
| 22 | |
| 23 | namespace oat\taoQtiItem\model\Export\Qti3Package; | 
| 24 | |
| 25 | use core_kernel_classes_Resource; | 
| 26 | use DOMDocument; | 
| 27 | use oat\taoQtiItem\model\Export\QtiPackageExportHandler; | 
| 28 | use tao_helpers_form_Form; | 
| 29 | use ZipArchive; | 
| 30 | |
| 31 | class Handler extends QtiPackageExportHandler | 
| 32 | { | 
| 33 | public function getLabel(): string | 
| 34 | { | 
| 35 | return __('QTI Package 3.0'); | 
| 36 | } | 
| 37 | |
| 38 | |
| 39 | protected function createExporter($item, ZipArchive $zipArchive, DOMDocument $manifest = null): Exporter | 
| 40 | { | 
| 41 | $factory = $this->getExporterFactory(); | 
| 42 | return $factory->create($item, $zipArchive, $manifest); | 
| 43 | } | 
| 44 | |
| 45 | public function getExportForm(core_kernel_classes_Resource $resource): tao_helpers_form_Form | 
| 46 | { | 
| 47 | return (new Form($this->getFormData($resource)))->getForm(); | 
| 48 | } | 
| 49 | |
| 50 | private function getExporterFactory(): ExporterFactory | 
| 51 | { | 
| 52 | return $this->getServiceManager()->getContainer()->get(ExporterFactory::class); | 
| 53 | } | 
| 54 | } |