19declare(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 = $test_obj->
isFixedTest() ? ExportFixedQuestionSet::class : ExportRandomQuestionSet::class;
90 $export =
new $export_class(
96 $this->component_repository,
97 $this->questionrepository,
104 return $export->withResultExportingEnabled($export_type === Types::XML_WITH_RESULTS);
107 if ($plugin_type ===
null) {
108 throw new \Exception(
'No Plugin Type given!');
110 foreach ($this->component_factory->getActivePluginsInSlot(
'texp') as
$plugin) {
111 if (
$plugin->getFormat() === $plugin_type) {
getExporter(\ilObjTest $test_obj, Types $export_type, ?string $plugin_type=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)
isFixedTest()
Returns the fact wether this test is a fixed question set test or not.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
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...