Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| taoItems_models_classes_exporter_DefaultItemExporter | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 1 |
| export | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
12 | |||
| 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) 2008-2010 (original work) Deutsche Institut für Internationale Pädagogische Forschung |
| 19 | * (under the project TAO-TRANSFER); |
| 20 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor |
| 21 | * (under the project TAO-SUSTAIN & TAO-DEV); |
| 22 | * 2012-2016 (update and modification) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 23 | */ |
| 24 | |
| 25 | class taoItems_models_classes_exporter_DefaultItemExporter extends taoItems_models_classes_ItemExporter |
| 26 | { |
| 27 | public function export($options = []) |
| 28 | { |
| 29 | $location = $this->getItemDirectory()->readStream('qti.xml'); |
| 30 | |
| 31 | $zipToRoot = isset($options['zipToRoot']) ? (bool)$options['zipToRoot'] : false; |
| 32 | if ($zipToRoot) { |
| 33 | $this->addFile($location, ''); |
| 34 | } else { |
| 35 | $this->addFile($location, basename($location)); |
| 36 | } |
| 37 | } |
| 38 | } |