19 declare(strict_types=1);
49 private \ILIAS\DI\UIServices
$ui;
101 return $this->testObj;
109 $this->testObj = $testObj;
114 return $this->question_set_config;
119 $this->question_set_config = $question_set_config;
157 switch ($this->
ctrl->getNextClass()) {
158 case 'ilparticipantstestresultsgui':
159 if (!$this->
getTestAccess()->checkParticipantsResultsAccess()) {
160 ilObjTestGUI::accessViolationRedirect();
184 $this->
ctrl->forwardCommand($gui);
187 case 'ilmytestresultsgui':
188 if (!$this->
getTestTabs()->needsMyResultsSubTab()) {
189 ilObjTestGUI::accessViolationRedirect();
199 $this->
ctrl->forwardCommand($gui);
202 case 'iltestevalobjectiveorientedgui':
203 if (!$this->
getTestTabs()->needsLoResultsSubTab()) {
204 ilObjTestGUI::accessViolationRedirect();
211 $this->
ctrl->forwardCommand($gui);
214 case 'ilmytestsolutionsgui':
215 if (!$this->
getTestTabs()->needsMySolutionsSubTab()) {
216 ilObjTestGUI::accessViolationRedirect();
225 $this->
ctrl->forwardCommand($gui);
228 case 'iltesttoplistgui':
229 if (!$this->
getTestTabs()->needsHighSoreSubTab()) {
230 ilObjTestGUI::accessViolationRedirect();
245 $this->
ctrl->forwardCommand($gui);
248 case 'iltestskillevaluationgui':
254 $questionList->load();
257 $testSession = $testSessionFactory->getSession();
265 $this->logging_services,
266 $this->skills_service,
269 $gui->setQuestionList($questionList);
270 $gui->setTestSession($testSession);
273 $this->
ctrl->forwardCommand($gui);
276 case strtolower(__CLASS__):
278 $command = $this->
ctrl->getCmd(self::DEFAULT_CMD) .
'Cmd';
285 if ($this->testObj->canShowTestResults($this->getTestSession())) {
286 if ($this->objectiveParent->isObjectiveOrientedPresentationRequired()) {
287 $this->
ctrl->redirectByClass(
'ilTestEvalObjectiveOrientedGUI');
290 $this->
ctrl->redirectByClass([
'ilMyTestResultsGUI',
'ilTestEvaluationGUI']);
294 if ($validator->isCertificateDownloadable($this->user->getId(), $this->
getTestObj()->getId())) {
295 $button = $this->
ui->factory()->button()->standard(
'certficiate', $this->
ctrl->getFormActionByClass(ilTestEvaluationGUI::class,
'outCertificate'));
296 $this->
toolbar->addComponent($button);
304 $message = $this->
lng->txt(
'tst_res_tab_msg_res_after_taking_test');
306 switch ($this->testObj->getScoreReporting()) {
308 if ($this->testObj->hasAnyTestResult($this->getTestSession())) {
309 $message = $this->
lng->txt(
'tst_res_tab_msg_res_after_finish_test');
315 $date = $this->
getTestObj()->getScoreSettings()->getResultSummarySettings()->getReportingDate()
317 $date_format = $this->
user->getDateFormat();
319 $format = (
new DataFactory())->dateFormat()->withTime12($date_format)->toString();
321 $format = (
new DataFactory())->dateFormat()->withTime24($date_format)->toString();
324 if (!$this->testObj->hasAnyTestResult($this->getTestSession())) {
326 $this->
lng->txt(
'tst_res_tab_msg_res_after_date_no_res'),
327 $date->format($format)
333 $this->
lng->txt(
'tst_res_tab_msg_res_after_date'),
334 $date->format($format)
339 $message = $this->
lng->txt(
'tst_res_tab_msg_res_after_test_passed');
343 $this->main_tpl->setOnScreenMessage(
'info',
$message);
Interface GlobalHttpState.
setTestSession(ilTestSession $testSession)
setTestAccess(ilTestAccess $testAccess)
Readable part of repository interface to ilComponentDataDB.
ilParticipantsTestResultsGUI: ilTestEvaluationGUI ilParticipantsTestResultsGUI: ilAssQuestionPageGUI...
setObjectiveParent($objectiveParent)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const SCORE_REPORTING_AFTER_PASSED
ilTestObjectiveOrientedContainer $objectiveParent
Provides fluid interface to LoggingServices.
const QUESTION_INSTANCE_TYPE_DUPLICATES
setQuestionSetConfig(ilTestQuestionSetConfig $question_set_config)
const SUBTAB_ID_PARTICIPANTS_RESULTS
const SCORE_REPORTING_FINISHED
ilTestTabsManager $testTabs
static http()
Fetches the global http state from ILIAS.
Validates if an active certificate is stored in the database and can be downloaded by the user...
const SCORE_REPORTING_DATE
const SUBTAB_ID_MY_RESULTS
showNoResultsReportingMessage()
ilTestSession $testSession
const SUBTAB_ID_HIGHSCORE
setTestTabs(ilTestTabsManager $testTabs)
const SUBTAB_ID_SKILL_RESULTS
const SUBTAB_ID_MY_SOLUTIONS
const SUBTAB_ID_LO_RESULTS
__construct(private ilObjTest $testObj, private ilTestQuestionSetConfig $question_set_config, private ilCtrl $ctrl, private ilAccess $access, private ilDBInterface $db, private Refinery $refinery, private ilObjUser $user, private ilLanguage $lng, private LoggingServices $logging_services, private ilComponentRepository $component_repository, private ilTabsGUI $tabs, private ilToolbarGUI $toolbar, private ilGlobalTemplateInterface $main_tpl, private UIFactory $ui_factory, private UIRenderer $ui_renderer, private SkillService $skills_service, private InternalRequestService $testrequest, private QuestionInfoService $questioninfo, private GlobalHttpState $http)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Refinery Factory $refinery