19 declare(strict_types=1);
42 $this->
lng = $DIC[
'lng'];
43 $this->log = $DIC[
'ilLog'];
44 $this->tree = $DIC[
'tree'];
45 $this->
ctrl = $DIC[
'ilCtrl'];
46 $this->component_repository = $DIC[
'component.repository'];
47 $this->questioninfo = $DIC->testQuestionPool()->questionInfo();
55 public function init(): void
68 $this->component_repository,
71 $test_export = $test_export_factory->getExporter(
'xml');
73 $parameters = $this->
ctrl->getParameterArrayByClass(ilTestExportGUI::class);
74 if (!empty($parameters[
'export_results'])) {
75 $test_export->setResultExportingEnabledForTestExport(
true);
76 $this->
ctrl->clearParameterByClass(ilTestExportGUI::class,
'export_results');
78 $zip = $test_export->buildExportFile();
80 $this->log->write(__METHOD__ .
': Created zip file ' . $zip);
86 if ($entity ===
'tst') {
89 foreach ($ids as
$id) {
92 $intro_page_id = $tst->getMainSettings()->getIntroductionSettings()->getIntroductionPageId();
93 if ($intro_page_id !== null) {
95 $files = array_merge($files, ilObjFile::_getFilesOfObject(
'tst:pg', $intro_page_id));
98 $concluding_remarks_page_id = $tst->getMainSettings()->getFinishingSettings()->getConcludingRemarksPageId();
99 if ($concluding_remarks_page_id !== null) {
101 $files = array_merge($files, ilObjFile::_getFilesOfObject(
'tst:pg', $concluding_remarks_page_id));
107 'component' =>
'Services/MediaObjects',
112 'component' =>
'Modules/File',
119 return parent::getXmlExportTailDependencies($entity, $target_release, $ids);
128 if ($a_entity ==
'tst') {
133 if (count($tax_ids)) {
135 'component' =>
'Services/Taxonomy',
142 'component' =>
'Services/Object',
143 'entity' =>
'common',
150 return parent::getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids);
161 foreach ($test_obj_ids as $test_obj_id) {
163 $tax_ids[$tax_id] = $tax_id;
181 'namespace' =>
'http://www.ilias.de/Modules/Test/htlm/4_1',
182 'xsd_file' =>
'ilias_tst_4_1.xsd',
183 'uses_dataset' =>
false,
Readable part of repository interface to ilComponentDataDB.
getDependingTaxonomyIds(array $test_obj_ids)
ilComponentRepository $component_repository
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getXmlRepresentation(string $a_entity, string $a_schema_version, string $id)
Used for container export with tests.
getXmlExportHeadDependencies(string $entity, string $target_release, array $ids)
QuestionInfoService $questioninfo
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.