19declare(strict_types=1);
24use Psr\Http\Message\ServerRequestInterface;
42 private readonly UIFactory $ui_factory,
43 private readonly UIRenderer $ui_renderer,
44 private readonly IRSS $irss,
45 private readonly ServerRequestInterface $request,
50 $this->participantData =
null;
65 foreach ($passesByActives as $activeId => $passes) {
66 foreach ($passes as $pass) {
75 $user = $participant_data->getUserDataByActiveId($active_id);
78 'tpl.il_as_tst_archive_page.html',
81 'components/ILIAS/Test'
87 $this->
lng->txt(
'tst_result_user_name'),
88 $this->test_obj->buildName(
96 if (!empty($user[
'matriculation']) && $this->test_obj->getAnonymity() ===
false) {
97 $tpl->setCurrentBlock(
'matriculation');
99 'MATRICULATION_LABEL',
100 $this->
lng->txt(
'matriculation')
104 $user[
'matriculation']
106 $tpl->parseCurrentBlock();
110 'PASS_FINISH_DATE_LABEL',
111 $this->
lng->txt(
'tst_pass_finished_on')
114 $finish_date = ilObjTest::lookupLastTestPassAccess($active_id, $pass);
117 $finish_date ===
null
119 : (
new DateTimeImmutable(
121 new DateTimeZone($this->
user->getTimeZone())
123 $this->user->getDateTimeFormat()->toString()
133 $this->html_generator->generateHTML($tpl->get(),
$filename);
143 $this->participant_access_filter_factory,
144 $this->test_obj->getTestLogViewer(),
145 $this->test_obj->getId()
148 $archiver->handInTestResult($active_id, $pass,
$filename);
149 $archiver->handInParticipantUploadedResults($active_id, $pass, $this->test_obj);
160 $results = $this->test_obj->getTestResult(
167 $testResultHeaderLabelBuilder =
new ResultsTitlesBuilder($this->
lng, $this->obj_cache);
169 return $gui->getPassListOfAnswers(
179 $testResultHeaderLabelBuilder
191 return dirname($tmpFileName) .
'/scores-' . $this->test_obj->getId() .
'-' . $activeId .
'-' . $pass .
'.html';
Builds a Color from either hex- or rgb values.
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
special template class to simplify handling of ITX/PEAR
archiveActivesPass(int $active_id, int $pass)
archivePassesByActives($passesByActives)
renderOverviewContent($activeId, $pass)
ilTestParticipantData $participantData
buildOverviewFilename($activeId, $pass)
__construct(private readonly ilObjTest $test_obj, private readonly ilLanguage $lng, private readonly ilDBInterface $db, private readonly ilObjUser $user, private readonly UIFactory $ui_factory, private readonly UIRenderer $ui_renderer, private readonly IRSS $irss, private readonly ServerRequestInterface $request, private readonly ilObjectDataCache $obj_cache, private readonly ilTestParticipantAccessFilterFactory $participant_access_filter_factory, private readonly ilTestHTMLGenerator $html_generator)
setParticipantData(ilTestParticipantData $participantData)
Class that handles PDF generation for test and assessment.
Service GUI class for tests.
An entity that renders components to a string output.