19 declare(strict_types=1);
52 private \ILIAS\DI\UIServices
$ui;
82 $this->test_tabs->activateTab(TabsManager::TAB_ID_YOUR_RESULTS);
83 $this->test_tabs->getYourResultsSubTabs();
85 switch ($this->
ctrl->getNextClass()) {
86 case 'ilmytestresultsgui':
87 if (!$this->test_tabs->needsYourResultsTab()) {
88 ilObjTestGUI::accessViolationRedirect();
91 $this->test_tabs->activateSubTab(TabsManager::SUBTAB_ID_MY_RESULTS);
96 $this->objective_parent,
101 $this->questionrepository,
104 $this->
ctrl->forwardCommand($gui);
107 case 'iltestevalobjectiveorientedgui':
108 if (!$this->test_tabs->needsLoResultsSubTab()) {
109 ilObjTestGUI::accessViolationRedirect();
112 $this->test_tabs->activateSubTab(TabsManager::SUBTAB_ID_LO_RESULTS);
115 $gui->setObjectiveOrientedContainer($this->objective_parent);
116 $this->
ctrl->forwardCommand($gui);
119 case 'ilmytestsolutionsgui':
120 if (!$this->test_tabs->needsYourSolutionsSubTab()) {
121 ilObjTestGUI::accessViolationRedirect();
124 $this->test_tabs->activateSubTab(TabsManager::SUBTAB_ID_MY_SOLUTIONS);
129 $this->objective_parent,
133 $this->questionrepository,
136 $this->
ctrl->forwardCommand($gui);
139 case 'iltesttoplistgui':
140 if (!$this->test_tabs->needsHighSoreSubTab()) {
141 ilObjTestGUI::accessViolationRedirect();
144 $this->test_tabs->activateSubTab(TabsManager::SUBTAB_ID_HIGHSCORE);
148 $this->toplist_repository,
158 $this->
ctrl->forwardCommand($gui);
161 case 'iltestskillevaluationgui':
162 $this->test_tabs->activateSubTab(TabsManager::SUBTAB_ID_SKILL_RESULTS);
165 $question_list->setParentObjId($this->test_object->getId());
166 $question_list->setQuestionInstanceTypeFilter(
null);
167 $question_list->load();
176 $this->skills_service,
179 $gui->setQuestionList($question_list);
180 $gui->setTestSession(
187 $gui->setObjectiveOrientedContainer($this->objective_parent);
189 $this->
ctrl->forwardCommand($gui);
192 case strtolower(__CLASS__):
194 $command = $this->
ctrl->getCmd(self::DEFAULT_CMD) .
'Cmd';
201 if ($this->test_object->canShowTestResults($this->test_session)) {
202 if ($this->objective_parent->isObjectiveOrientedPresentationRequired()) {
203 $this->
ctrl->redirectByClass(
'ilTestEvalObjectiveOrientedGUI');
206 $this->
ctrl->redirectByClass([
'ilMyTestResultsGUI',
'ilTestEvaluationGUI']);
210 if ($validator->isCertificateDownloadable($this->user->getId(), $this->test_object->getId())) {
211 $button = $this->
ui->factory()->button()->standard(
'certficiate', $this->
ctrl->getFormActionByClass(ilTestEvaluationGUI::class,
'outCertificate'));
212 $this->
toolbar->addComponent($button);
220 $message = $this->
lng->txt(
'tst_res_tab_msg_res_after_taking_test');
222 switch ($this->test_object->getScoreReporting()) {
223 case ScoreReportingTypes::SCORE_REPORTING_FINISHED:
224 if ($this->test_object->hasAnyTestResult($this->test_session)) {
225 $message = $this->
lng->txt(
'tst_res_tab_msg_res_after_finish_test');
230 case ScoreReportingTypes::SCORE_REPORTING_DATE:
231 $date = $this->test_object->getScoreSettings()->getResultSummarySettings()->getReportingDate()
234 if (!$this->test_object->hasAnyTestResult($this->test_session)) {
236 $this->
lng->txt(
'tst_res_tab_msg_res_after_date_no_res'),
237 $date->format($this->
user->getDateTimeFormat()->toString())
243 $this->
lng->txt(
'tst_res_tab_msg_res_after_date'),
244 $date->format($this->
user->getDateTimeFormat()->toString())
248 case ScoreReportingTypes::SCORE_REPORTING_AFTER_PASSED:
249 $message = $this->
lng->txt(
'tst_res_tab_msg_res_after_test_passed');
253 $this->main_tpl->setOnScreenMessage(
'info',
$message);
Readable part of repository interface to ilComponentDataDB.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__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)
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Validates if an active certificate is stored in the database and can be downloaded by the user...
showNoResultsReportingMessage()