19 declare(strict_types=1);
35 private readonly \
ilTree $tree,
39 private readonly \
ilObjUser $current_user,
47 ?
string $plugin_type =
null 49 switch ($export_type) {
50 case Types::SCORED_ATTEMPT:
55 $this->questionrepository,
56 "{$test_obj->getTitle()}_{$this->lng->txt('scored_pass')}_{$this->lng->txt('results')}",
58 ))->withAggregatedResultsPage()
62 case Types::ALL_ATTEMPTS:
67 $this->questionrepository,
68 "{$test_obj->getTitle()}_{$this->lng->txt('all')}_{$this->lng->txt('results')}",
70 ))->withAggregatedResultsPage()
74 case Types::CERTIFICATE_ARCHIVE:
85 case Types::XML_WITH_RESULTS:
86 $export_class = ExportFixedQuestionSet::class;
88 $export_class = ExportRandomQuestionSet::class;
91 $export =
new $export_class(
97 $this->component_repository,
98 $this->questionrepository,
103 if ($export_type === Types::XML_WITH_RESULTS) {
104 return $export->withResultExportingEnabled(
true);
109 if ($plugin_type ===
null) {
110 throw new \Exception(
'No Plugin Type given!');
112 foreach ($this->component_factory->getActivePluginsInSlot(
'texp') as
$plugin) {
113 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)
getExporter(\ilObjTest $test_obj, Types $export_type, ?string $plugin_type=null)