19 declare(strict_types=1);
36 private readonly \
ilTree $tree,
40 private readonly \
ilObjUser $current_user,
49 ?
string $plugin_type =
null 51 switch ($export_type) {
52 case Types::SCORED_ATTEMPT:
57 $this->questionrepository,
58 "{$test_obj->getTitle()}_{$this->lng->txt('scored_pass')}_{$this->lng->txt('results')}",
60 ))->withAggregatedResultsPage()
64 case Types::ALL_ATTEMPTS:
69 $this->questionrepository,
70 "{$test_obj->getTitle()}_{$this->lng->txt('all')}_{$this->lng->txt('results')}",
72 ))->withAggregatedResultsPage()
76 case Types::CERTIFICATE_ARCHIVE:
87 case Types::XML_WITH_RESULTS:
88 $export_class = ExportFixedQuestionSet::class;
90 $export_class = ExportRandomQuestionSet::class;
93 $export =
new $export_class(
99 $this->component_repository,
100 $this->questionrepository,
101 $this->file_delivery,
106 if ($export_type === Types::XML_WITH_RESULTS) {
107 return $export->withResultExportingEnabled(
true);
112 if ($plugin_type ===
null) {
113 throw new \Exception(
'No Plugin Type given!');
115 foreach ($this->component_factory->getActivePluginsInSlot(
'texp') as
$plugin) {
116 if (
$plugin->getFormat() === $plugin_type) {
Readable part of repository interface to ilComponentDataDB.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isFixedTest()
Returns the fact wether this test is a fixed question set test or not.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(private readonly \ilLanguage $lng, private readonly \ilDBInterface $db, private readonly \ilBenchmark $bench, private \ilGlobalTemplateInterface $tpl, private readonly TestLogger $logger, private readonly \ilTree $tree, private readonly \ilComponentRepository $component_repository, private readonly \ilComponentFactory $component_factory, private readonly FileDeliveryServices $file_delivery, private readonly \ilObjUser $current_user, private readonly GeneralQuestionPropertiesRepository $questionrepository, private readonly ResourceStorage $irss)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getExporter(\ilObjTest $test_obj, Types $export_type, ?string $plugin_type=null)