Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| QtiPackage22ExportHandler | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| getLabel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| createExporter | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getExportForm | |
0.00% |
0 / 2 |
|
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) 2016 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 19 | * |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | namespace oat\taoQtiItem\model\Export; |
| 24 | |
| 25 | use tao_helpers_form_Form; |
| 26 | use ZipArchive; |
| 27 | use DomDocument; |
| 28 | use core_kernel_classes_Resource; |
| 29 | |
| 30 | class QtiPackage22ExportHandler extends QtiPackageExportHandler |
| 31 | { |
| 32 | /** |
| 33 | * @return string |
| 34 | */ |
| 35 | public function getLabel(): string |
| 36 | { |
| 37 | return __('QTI Package 2.2'); |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * @param $item |
| 42 | * @param ZipArchive $zipArchive |
| 43 | * @param DomDocument|null $manifest |
| 44 | * @return QTIPackedItem22Exporter|QTIPackedItemExporter |
| 45 | */ |
| 46 | protected function createExporter($item, ZipArchive $zipArchive, DOMDocument $manifest = null) |
| 47 | { |
| 48 | return new QTIPackedItem22Exporter($item, $zipArchive, $manifest); |
| 49 | } |
| 50 | |
| 51 | public function getExportForm(core_kernel_classes_Resource $resource): tao_helpers_form_Form |
| 52 | { |
| 53 | $formData = $this->getFormData($resource); |
| 54 | |
| 55 | return (new Qti22ExportForm($formData))->getForm(); |
| 56 | } |
| 57 | } |