19declare(strict_types=1);
52 private \ILIAS\DI\UIServices
$ui;
67 private readonly UIFactory $ui_factory,
68 private readonly UIRenderer $ui_renderer,
74 private readonly DataFactory $data_factory,
83 $this->test_tabs->activateTab(TabsManager::TAB_ID_YOUR_RESULTS);
84 $this->test_tabs->getYourResultsSubTabs();
86 switch ($this->
ctrl->getNextClass()) {
87 case 'ilmytestresultsgui':
88 if (!$this->test_tabs->needsYourResultsTab()) {
89 ilObjTestGUI::accessViolationRedirect();
92 $this->test_tabs->activateSubTab(
93 $this->
ctrl->getCmd() ===
'outUserListOfAnswerPasses'
94 ? TabsManager::SUBTAB_ID_MY_SOLUTIONS
95 : TabsManager::SUBTAB_ID_MY_RESULTS
101 $this->objective_parent,
105 $this->questionrepository,
108 $this->
ctrl->forwardCommand($gui);
111 case 'iltestevalobjectiveorientedgui':
112 if (!$this->test_tabs->needsLoResultsSubTab()) {
113 ilObjTestGUI::accessViolationRedirect();
116 $this->test_tabs->activateSubTab(TabsManager::SUBTAB_ID_LO_RESULTS);
119 $gui->setObjectiveOrientedContainer($this->objective_parent);
120 $this->
ctrl->forwardCommand($gui);
123 case 'iltesttoplistgui':
124 if (!$this->test_tabs->needsHighSoreSubTab()) {
125 ilObjTestGUI::accessViolationRedirect();
128 $this->test_tabs->activateSubTab(TabsManager::SUBTAB_ID_HIGHSCORE);
132 $this->toplist_repository,
141 $this->participant_repository
143 $this->
ctrl->forwardCommand($gui);
146 case 'iltestskillevaluationgui':
147 $this->test_tabs->activateSubTab(TabsManager::SUBTAB_ID_SKILL_RESULTS);
150 $question_list->setParentObjId($this->test_object->getId());
151 $question_list->setQuestionInstanceTypeFilter(
null);
152 $question_list->load();
161 $this->skills_service,
164 $gui->setQuestionList($question_list);
165 $gui->setTestSession(
172 $gui->setObjectiveOrientedContainer($this->objective_parent);
174 $this->
ctrl->forwardCommand($gui);
177 case strtolower(__CLASS__):
179 $command = $this->
ctrl->getCmd(self::DEFAULT_CMD) .
'Cmd';
186 if ($this->test_object->canShowTestResults($this->test_session)) {
187 if ($this->objective_parent->isObjectiveOrientedPresentationRequired()) {
188 $this->
ctrl->redirectByClass(
'ilTestEvalObjectiveOrientedGUI');
191 $this->
ctrl->redirectByClass([
'ilMyTestResultsGUI',
'ilTestEvaluationGUI']);
195 if ($validator->isCertificateDownloadable($this->user->getId(), $this->test_object->getId())) {
196 $button = $this->
ui->factory()->button()->standard(
'certficiate', $this->
ctrl->getFormActionByClass(ilTestEvaluationGUI::class,
'outCertificate'));
197 $this->
toolbar->addComponent($button);
205 $message = $this->
lng->txt(
'tst_res_tab_msg_res_after_taking_test');
207 switch ($this->test_object->getScoreReporting()) {
208 case ScoreReportingTypes::SCORE_REPORTING_FINISHED:
209 if ($this->test_object->hasAnyTestResult($this->test_session)) {
210 $message = $this->
lng->txt(
'tst_res_tab_msg_res_after_finish_test');
215 case ScoreReportingTypes::SCORE_REPORTING_DATE:
216 $date = $this->test_object->getScoreSettings()->getResultSummarySettings()->getReportingDate()
217 ->setTimezone(
new \DateTimeZone($this->
user->getTimeZone()));
219 if (!$this->test_object->hasAnyTestResult($this->test_session)) {
221 $this->
lng->txt(
'tst_res_tab_msg_res_after_date_no_res'),
222 $date->format($this->user->getDateTimeFormat()->toString())
228 $this->
lng->txt(
'tst_res_tab_msg_res_after_date'),
229 $date->format($this->user->getDateTimeFormat()->toString())
233 case ScoreReportingTypes::SCORE_REPORTING_AFTER_PASSED:
234 $message = $this->
lng->txt(
'tst_res_tab_msg_res_after_test_passed');
238 $this->main_tpl->setOnScreenMessage(
'info', $message);
Builds a Color from either hex- or rgb values.
Validates if an active certificate is stored in the database and can be downloaded by the user.
showNoResultsReportingMessage()
__construct(private ilObjTest $test_object, private readonly ilCtrlInterface $ctrl, private readonly ilTestAccess $test_access, private readonly ilDBInterface $db, private readonly Refinery $refinery, private readonly ilObjUser $user, private readonly ilLanguage $lng, private readonly TestLogger $logger, private readonly ilComponentRepository $component_repository, private TabsManager $test_tabs, private readonly ilToolbarGUI $toolbar, private readonly ilGlobalTemplateInterface $main_tpl, private readonly UIFactory $ui_factory, private readonly UIRenderer $ui_renderer, private readonly SkillService $skills_service, private readonly GeneralQuestionPropertiesRepository $questionrepository, private readonly TestTopListRepository $toplist_repository, private readonly RequestDataCollector $testrequest, private readonly GlobalHttpState $http, private readonly DataFactory $data_factory, private readonly ilTestSession $test_session, private readonly ilTestObjectiveOrientedContainer $objective_parent, private readonly ParticipantRepository $participant_repository)
Interface GlobalHttpState.
An entity that renders components to a string output.
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...
static http()
Fetches the global http state from ILIAS.