19 declare(strict_types=1);
47 $this->
lng = $DIC[
'lng'];
48 $local_dic = TestDIC::dic();
49 $this->export_factory = $local_dic[
'exportimport.factory'];
50 $this->
logger = $local_dic[
'logging.logger'];
51 $this->questionrepository = $local_dic[
'question.general_properties.repository'];
52 $this->tree = $DIC[
'tree'];
53 $this->
ctrl = $DIC[
'ilCtrl'];
54 $this->component_repository = $DIC[
'component.repository'];
62 public function init(): void
68 $parameters = $this->
ctrl->getParameterArrayByClass(ilTestExportGUI::class);
69 $export_type = ExportImportTypes::XML;
70 if (!empty($parameters[
'export_results'])) {
71 $export_type = ExportImportTypes::XML_WITH_RESULTS;
72 $this->
ctrl->clearParameterByClass(ilTestExportGUI::class,
'export_results');
76 $zip = $this->export_factory->getExporter($tst, $export_type)
80 $this->
logger->info(__METHOD__ .
': Created zip file ' . $zip);
86 if ($entity ===
'tst') {
89 foreach ($ids as
$id) {
93 $intro_page_id = $tst->getMainSettings()->getIntroductionSettings()->getIntroductionPageId();
94 if ($intro_page_id !==
null) {
96 $files = array_merge($files, ilObjFile::_getFilesOfObject(
'tst:pg', $intro_page_id));
99 $concluding_remarks_page_id = $tst->getMainSettings()->getFinishingSettings()->getConcludingRemarksPageId();
100 if ($concluding_remarks_page_id !==
null) {
102 $files = array_merge($files, ilObjFile::_getFilesOfObject(
'tst:pg', $concluding_remarks_page_id));
108 'component' =>
'components/ILIAS/MediaObjects',
113 'component' =>
'components/ILIAS/File',
120 return parent::getXmlExportTailDependencies($entity, $target_release, $ids);
129 if ($a_entity ==
'tst') {
134 if (count($tax_ids)) {
136 'component' =>
'components/ILIAS/Taxonomy',
143 'component' =>
'components/ILIAS/ILIASObject',
144 'entity' =>
'common',
150 foreach ($a_ids as
$id) {
151 $md_ids[] = $id .
':0:tst';
153 if ($md_ids !== []) {
155 'component' =>
'components/ILIAS/MetaData',
164 return parent::getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids);
175 foreach ($test_obj_ids as $test_obj_id) {
177 $tax_ids[$tax_id] = $tax_id;
195 'namespace' =>
'http://www.ilias.de/Modules/Test/htlm/4_1',
196 'xsd_file' =>
'ilias_tst_4_1.xsd',
197 'uses_dataset' =>
false,
Readable part of repository interface to ilComponentDataDB.
getDependingTaxonomyIds(array $test_obj_ids)
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
readonly GeneralQuestionPropertiesRepository $questionrepository
getXmlRepresentation(string $a_entity, string $a_schema_version, string $id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Used for container export with tests.
readonly ExportImportFactory $export_factory
getAbsoluteExportDirectory()
getXmlExportHeadDependencies(string $entity, string $target_release, array $ids)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)
readonly ilComponentRepository $component_repository
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.
readonly TestLogger $logger