19declare(strict_types=1);
107 $this->
tabs->activateTab($tab_id);
113 switch ($sub_tab_id) {
134 $this->
tabs->activateSubTab($sub_tab_id);
140 $this->
tabs->clearTargets();
141 $this->
tabs->setBackTarget($this->
lng->txt(
'back'), $back_link_target);
179 return $this->
access->checkAccess(
'read',
'', $this->test_object->getRefId());
184 return $this->
access->checkAccess(
'write',
'', $this->test_object->getRefId());
189 return $this->test_object->getTestLogger()->isLoggingEnabled()
190 && $this->
access->checkAccess(
'tst_history_read',
'', $this->test_object->getRefId());
195 return $this->
access->checkAccess(
'edit_permission',
'', $this->test_object->getRefId());
200 if (!$this->test_access->getAccess()->checkAccess(
'read',
'', $this->test_object->getRefId())) {
204 return \ilLearningProgressAccess::checkAccess($this->test_object->getRefId());
209 if ($this->test_access->checkManageParticipantsAccess()
210 || $this->test_access->checkParticipantsResultsAccess()) {
219 return $this->test_access->checkScoreParticipantsAccess()
220 || $this->test_access->checkScoreParticipantsAccessAnon();
232 if (preg_match(
'/^ass(.*?)gui$/i', $this->
ctrl->getNextClass($this))) {
236 if ($this->
ctrl->getNextClass($this) ==
'ilassquestionpagegui') {
240 if ($this->
ctrl->getCmdClass() ==
'iltestoutputgui') {
244 if ($this->
ctrl->getCmdClass() ==
'iltestevaluationgui') {
245 return in_array($this->
ctrl->getCmd(), [
246 '',
'outUserResultsPassOverview',
'outUserListOfAnswerPasses',
'singleResults'
259 $class_path = $this->
ctrl->getCurrentClassPath();
261 switch (array_pop($class_path)) {
262 case MarkSchemaGUI::class:
263 case SettingsMainGUI::class:
264 case SettingsScoringGUI::class:
273 switch ($this->
ctrl->getCmd()) {
278 case 'directfeedback':
280 case 'outCorrectSolution':
281 case 'showAnswersOfUser':
282 case 'backFromSummary':
286 case 'confirmFinish':
287 case 'outTestSummary':
288 case 'outQuestionSummary':
290 case 'selectImagemapRegion':
291 case 'confirmSubmitAnswers':
292 case 'finalSubmission':
294 case 'outUserPassDetails':
295 case 'checkPassword':
296 case 'exportCertificate':
297 case 'finishListOfAnswers':
298 case 'backConfirmFinish':
299 case 'showFinalStatement':
301 case 'browseForQuestions':
304 case 'resetTextFilter':
305 case 'insertQuestions':
307 'iltestdashboardgui',
309 'illearningprogressgui'
311 if (!in_array($this->
ctrl->getNextClass($this), $classes)) {
317 case 'certificateservice':
318 case 'certificateImport':
319 case 'certificateUpload':
320 case 'certificateEditor':
321 case 'certificateDelete':
322 case 'certificateSave':
323 case 'showTemplates':
324 case 'createTemplate':
325 case 'inviteParticipants':
326 case 'searchParticipants':
327 if ($this->
isWriteAccessGranted() && in_array(strtolower($this->
ctrl->getCmdClass()), [
'ilobjtestgui',
'ilcertificategui'])) {
340 $this->
lng->txt(
'test'),
341 $this->ctrl->getLinkTargetByClass(
343 \ilObjTestGUI::class, TestScreenGUI::class],
351 && !$this->test_object->getMainSettings()->getAdditionalSettings()->getHideInfoTab()) {
352 $this->
tabs->addTarget(
354 $this->
ctrl->getLinkTargetByClass(
356 \ilRepositoryGUI::class,
357 \ilObjTestGUI::class,
358 \ilInfoScreenGUI::class
361 [
'',
'outIntroductionPage',
'setAnonymousId',
'redirectToInfoScreen']
367 $settingsCommands = [
368 'marks',
'showMarkSchema',
'addMarkStep',
'deleteMarkSteps',
369 'resetToSimpleMarkSchema',
'saveMarks',
'certificate',
370 'certificateEditor',
'certificateSave',
371 'certificatePreview',
'certificateDelete',
'certificateUpload',
'certificateImport',
372 'scoring',
'showTemplates',
'createTemplate',
373 'inviteParticipants',
'saveFixedParticipantsStatus',
'searchParticipants',
'addParticipants'
376 $reflection = new \ReflectionClass(SettingsMainGUI::class);
377 foreach ($reflection->getConstants() as $name => $value) {
378 if (substr($name, 0, 4) ===
'CMD_') {
379 $settingsCommands[] = $value;
383 $reflection = new \ReflectionClass(SettingsScoringGUI::class);
384 foreach ($reflection->getConstants() as $name => $value) {
385 if (substr($name, 0, 4) ===
'CMD_') {
386 $settingsCommands[] = $value;
390 $settingsCommands[] =
'';
392 $this->
tabs->addTarget(
394 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, SettingsMainGUI::class]),
398 'ilobjtestsettingsmaingui',
399 'ilobjtestsettingsscoringresultsgui',
406 if ($this->test_object->isFixedTest()) {
407 $target = $this->
ctrl->getLinkTargetByClass(
408 \ilObjTestGUI::class,
413 if ($this->test_object->isRandomTest()) {
414 $target = $this->
ctrl->getLinkTargetByClass(\ilTestRandomQuestionSetConfigGUI::class);
418 $this->
tabs->addTarget(
422 'showQuestions',
'browseForQuestions',
'questionBrowser',
'createQuestion',
423 'filter',
'resetFilter',
'insertQuestions',
'back',
424 'executeCreateQuestion',
'cancelCreateQuestion',
425 'addQuestionpool',
'saveRandomQuestions',
'saveQuestionSelectionMode',
'print',
426 'addsource',
'removesource',
'randomQuestions'
433 self::TAB_ID_PARTICIPANTS,
434 $this->
lng->txt(
'participants'),
435 $this->getParticipantsTabTarget()
441 self::TAB_ID_YOUR_RESULTS,
442 $this->
lng->txt(
'your_results'),
443 $this->getYourResultsTabTarget()
448 if ($this->test_object->getGlobalSettings()->isManualScoringEnabled()) {
450 $this->
tabs->addTarget(
451 self::TAB_ID_MANUAL_SCORING,
452 $this->
ctrl->getLinkTargetByClass(
453 [\ilObjTestGUI::class, ConsecutiveScoringGUI::class],
457 [ConsecutiveScoringGUI::class]
463 $this->
tabs->addTarget(
464 self::TAB_ID_HISTORY,
465 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'history'),
472 $this->
tabs->addTarget(
473 self::TAB_ID_LEARNING_PROGRESS,
474 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilLearningProgressGUI::class],
''),
477 'illplistofobjectsgui',
478 'illplistofsettingsgui',
479 'illearningprogressgui',
480 'illplistofprogressgui'
486 $mdgui = new \ilObjectMetaDataGUI($this->test_object);
487 $mdtab = $mdgui->getTab(\ilObjTestGUI::class);
489 $this->
tabs->addTarget(
490 self::TAB_ID_META_DATA,
497 $this->
tabs->addTarget(
499 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestExportGUI::class],
''),
506 $this->
tabs->addTarget(
507 self::TAB_ID_PERMISSIONS,
508 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilPermissionGUI::class],
'perm'),
509 [
'perm',
'info',
'owner'],
518 $this->
ctrl->saveParameterByClass($this->
ctrl->getCmdClass(),
'q_id');
520 $this->
tabs->setBackTarget(
521 $this->
lng->txt(
'backtocallingtest'),
524 $this->
tabs->addTarget(
525 'tst_browse_for_questions',
526 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'browseForQuestions'),
527 [
'browseForQuestions',
'filter',
'resetFilter',
'resetTextFilter',
'insertQuestions'],
539 $this->
tabs->setBackTarget(
540 $this->
lng->txt(
'backtocallingtest'),
543 $this->
tabs->addTarget(
545 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'randomQuestions'),
559 $this->
tabs->activateTab(self::TAB_ID_QUESTIONS);
561 if ($this->test_object->isRandomTest()) {
562 $this->
tabs->addSubTabTarget(
563 self::QUESTIONS_SUBTAB_ID_RANDOM_SETTINGS,
564 $this->
ctrl->getLinkTargetByClass(
565 \ilTestRandomQuestionSetConfigGUI::class,
568 [
'',
'showGeneralConfigForm',
'saveGeneralConfigForm']
571 $this->
tabs->addSubTabTarget(
572 self::QUESTIONS_SUBTAB_ID_RANDOM_POOLS,
573 $this->
ctrl->getLinkTargetByClass(
574 \ilTestRandomQuestionSetConfigGUI::class,
577 [
'showSourcePoolDefinitionList']
581 $this->
tabs->addSubTab(
582 self::SUBTAB_ID_QST_LIST_VIEW,
583 $this->
lng->txt(
'edit_test_questions'),
587 if ($this->test_object->isSkillServiceToBeConsidered()) {
588 $this->
tabs->addSubTabTarget(
589 self::SETTINGS_SUBTAB_ID_ASSIGN_SKILLS_TO_QUESTIONS,
590 $this->
ctrl->getLinkTargetByClass(
592 \ilTestSkillAdministrationGUI::class,
593 \ilAssQuestionSkillAssignmentsGUI::class
607 $this->
tabs->addSubTabTarget(
608 self::SETTINGS_SUBTAB_ID_GENERAL,
609 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, SettingsMainGUI::class]),
611 [SettingsMainGUI::class]
614 $this->
tabs->addSubTabTarget(
615 self::SETTINGS_SUBTAB_ID_MARK_SCHEMA,
616 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, MarkSchemaGUI::class],
'showMarkSchema'),
618 [MarkSchemaGUI::class]
621 $this->
tabs->addSubTabTarget(
622 self::SETTINGS_SUBTAB_ID_SCORING,
623 $this->
ctrl->getLinkTargetByClass(
624 [\ilObjTestGUI::class, SettingsScoringGUI::class],
628 [SettingsScoringGUI::class]
631 $this->
ctrl->setParameterByClass(\ilTestPageGUI::class,
'page_type',
'introductionpage');
632 $this->
tabs->addSubTabTarget(
633 self::SETTINGS_SUBTAB_ID_EDIT_INTRODUCTION_PAGE,
634 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestPageGUI::class],
'preview'),
638 $this->
ctrl->setParameterByClass(\ilTestPageGUI::class,
'page_type',
'concludingremarkspage');
639 $this->
tabs->addSubTabTarget(
640 self::SETTINGS_SUBTAB_ID_EDIT_CONCLUSION_PAGE,
641 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestPageGUI::class],
'preview'),
644 $this->
ctrl->clearParameterByClass(\ilTestPageGUI::class,
'page_type');
646 $validator = new \ilCertificateActiveValidator();
647 if ($validator->validate() ===
true) {
648 $this->
tabs->addSubTabTarget(
649 self::SETTINGS_SUBTAB_ID_CERTIFICATE,
650 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'certificate'),
651 [
'certificate',
'certificateEditor',
'certificateRemoveBackground',
'certificateSave',
652 'certificatePreview',
'certificateDelete',
'certificateUpload',
'certificateImport'],
653 [
'',
'ilobjtestgui',
'ilcertificategui']
657 if ($this->test_object->isSkillServiceToBeConsidered()) {
658 $this->
tabs->addSubTabTarget(
659 self::SETTINGS_SUBTAB_ID_ASSIGN_SKILL_TRESHOLDS,
660 $this->
ctrl->getLinkTargetByClass(
662 \ilTestSkillAdministrationGUI::class,
663 \ilTestSkillLevelThresholdsGUI::class
671 $this->
tabs->addSubTabTarget(
672 self::SETTINGS_SUBTAB_ID_PERSONAL_DEFAULT_SETTINGS,
673 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'showTemplates'),
674 [
'showTemplates',
'createTemplate'],
675 [
'',
'ilobjtestgui',
'ilcertificategui']
678 $lti_settings = new \ilLTIProviderObjectSettingGUI($this->test_object->getRefId());
679 if ($lti_settings->hasSettingsAccess()) {
680 $this->
tabs->addSubTabTarget(
682 $this->
ctrl->getLinkTargetByClass(\ilLTIProviderObjectSettingGUI::class),
684 [\ilLTIProviderObjectSettingGUI::class]
700 if (!($this->test_object->getProcessingTimeInSeconds() > 0)) {
704 if ($this->test_object->getNrOfTries() != 1) {
713 return $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestParticipantsGUI::class]);
718 return $this->test_session->reportableResultsAvailable($this->test_object)
720 $this->test_session->getActiveId() !== 0
721 && $this->test_object->canShowSolutionPrintview($this->test_session->getUserId())
728 return $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestResultsGUI::class, \ilTestEvalObjectiveOrientedGUI::class]);
732 return $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilMyTestSolutionsGUI::class, \ilTestEvaluationGUI::class]);
735 return $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilMyTestResultsGUI::class, \ilTestEvaluationGUI::class]);
740 return $this->test_object->isScoreReportingEnabled();
745 if (!$this->test_object->isScoreReportingEnabled()) {
749 return $this->objective_parent->isObjectiveOrientedPresentationRequired();
754 if (!$this->test_object->isScoreReportingEnabled()) {
758 return $this->test_object->getHighscoreEnabled();
763 if (!$this->test_object->isScoreReportingEnabled()) {
767 return $this->test_object->isSkillServiceToBeConsidered();
772 return $this->test_object->canShowSolutionPrintview($this->test_session->getUserId());
778 $this->
tabs->addSubTab(
779 self::SUBTAB_ID_LO_RESULTS,
780 $this->
lng->txt(
'tst_tab_results_objective_oriented'),
781 $this->ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilTestEvalObjectiveOrientedGUI::class])
786 $myResultsLabel = $this->
lng->txt(
'tst_show_results');
789 $myResultsLabel = $this->
lng->txt(
'tst_tab_results_pass_oriented');
792 $this->
tabs->addSubTab(
793 self::SUBTAB_ID_MY_RESULTS,
795 $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilMyTestResultsGUI::class, \ilTestEvaluationGUI::class])
800 $this->
tabs->addSubTab(
801 self::SUBTAB_ID_SKILL_RESULTS,
802 $this->
lng->txt(
'tst_show_comp_results'),
803 $this->ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilTestSkillEvaluationGUI::class])
808 $this->
tabs->addSubTab(
809 self::SUBTAB_ID_HIGHSCORE,
810 $this->
lng->txt(
'tst_show_toplist'),
811 $this->ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilTestToplistGUI::class],
'outResultsToplist')
816 $this->
tabs->addSubTab(
817 self::SUBTAB_ID_MY_SOLUTIONS,
818 $this->
lng->txt(
'tst_list_of_answers_show'),
819 $this->ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilMyTestSolutionsGUI::class, \ilTestEvaluationGUI::class])
__construct(private readonly \ilTabsGUI $tabs, private readonly \ilLanguage $lng, private readonly \ilCtrlInterface $ctrl, private readonly \ilAccess $access, private readonly \ilTestAccess $test_access, private readonly \ilObjTest $test_object, private readonly \ilTestObjectiveOrientedContainer $objective_parent, private readonly \ilTestSession $test_session)
checkScoreParticipantsTabAccess()
const SUBTAB_ID_LO_RESULTS
activateTab(string $tab_id)
const SETTINGS_SUBTAB_ID_SCORING
string $parent_back_label
const QUESTIONS_SUBTAB_ID_RANDOM_POOLS
const SETTINGS_SUBTAB_ID_GENERAL
const SUBTAB_ID_SKILL_RESULTS
activateSubTab(string $sub_tab_id)
const SETTINGS_SUBTAB_ID_PERSONAL_DEFAULT_SETTINGS
const SETTINGS_SUBTAB_ID_ASSIGN_SKILLS_TO_QUESTIONS
const SUBTAB_ID_GENERAL_SETTINGS
const SETTINGS_SUBTAB_ID_EDIT_INTRODUCTION_PAGE
resetTabsAndAddBacklink(string $back_link_target)
checkParticipantsTabAccess()
isPermissionsAccessGranted()
const SUBTAB_ID_MY_RESULTS
const SETTINGS_SUBTAB_ID_ASSIGN_SKILL_TRESHOLDS
const TAB_ID_LEARNING_PROGRESS
const SUBTAB_ID_HIGHSCORE
const TAB_ID_PARTICIPANTS
const SUBTAB_ID_QST_PAGE_VIEW
getBrowseForQuestionsTab()
const QUESTIONS_SUBTAB_ID_RANDOM_SETTINGS
needsTimeExtensionSubTab()
const SUBTAB_ID_MY_SOLUTIONS
const SETTINGS_SUBTAB_ID_MARK_SCHEMA
const SETTINGS_SUBTAB_ID_CERTIFICATE
setParentBackLabel(?string $parent_back_label)
const TAB_ID_QUESTIONS
(Sub-)Tab ID constants
isTabsConfigSetupRequired()
getYourResultsTabTarget()
setParentBackHref(?string $parent_back_href)
needsSkillResultsSubTab()
getParticipantsTabTarget()
const TAB_ID_MANUAL_SCORING
needsYourSolutionsSubTab()
const SETTINGS_SUBTAB_ID_EDIT_CONCLUSION_PAGE
const SUBTAB_ID_QST_LIST_VIEW
const TAB_ID_YOUR_RESULTS
@ilCtrl_Calls ILIAS\Test\Settings\MainSettings\SettingsMainGUI: ilPropertyFormGUI @ilCtrl_Calls ILIAS...
const CMD_SHOW_FORM
command constants
Class ilAccessHandler Checks access for ILIAS objects.
const CMD_SHOW_SKILL_QUEST_ASSIGN_PROPERTIES_FORM
const CMD_SHOW_SKILL_QUEST_ASSIGNS
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const CMD_SHOW_SRC_POOL_DEF_LIST
const CMD_SHOW_GENERAL_CONFIG_FORM
const CMD_SHOW_SKILL_THRESHOLDS
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...