19 declare(strict_types=1);
94 case self::TAB_ID_PARTICIPANTS:
95 case self::TAB_ID_YOUR_RESULTS:
96 case self::TAB_ID_SETTINGS:
97 case self::TAB_ID_TEST:
98 $this->
tabs->activateTab($tab_id);
104 switch ($sub_tab_id) {
105 case self::SUBTAB_ID_MY_RESULTS:
106 case self::SUBTAB_ID_LO_RESULTS:
107 case self::SUBTAB_ID_HIGHSCORE:
108 case self::SUBTAB_ID_SKILL_RESULTS:
109 case self::SUBTAB_ID_MY_SOLUTIONS:
111 case self::SUBTAB_ID_QST_LIST_VIEW:
112 case self::SUBTAB_ID_QST_PAGE_VIEW:
114 case self::SETTINGS_SUBTAB_ID_GENERAL:
115 case self::SETTINGS_SUBTAB_ID_MARK_SCHEMA:
116 case self::SETTINGS_SUBTAB_ID_SCORING:
117 case self::SETTINGS_SUBTAB_ID_EDIT_INTRODUCTION_PAGE:
118 case self::SETTINGS_SUBTAB_ID_EDIT_CONCLUSION_PAGE:
119 case self::SETTINGS_SUBTAB_ID_CERTIFICATE:
120 case self::SETTINGS_SUBTAB_ID_PERSONAL_DEFAULT_SETTINGS:
121 $this->
tabs->activateSubTab($sub_tab_id);
127 $this->
tabs->clearTargets();
128 $this->
tabs->setBackTarget($this->
lng->txt(
'back'), $back_link_target);
166 return $this->
access->checkAccess(
'read',
'', $this->test_object->getRefId());
171 return $this->
access->checkAccess(
'write',
'', $this->test_object->getRefId());
176 return $this->test_object->getTestLogger()->isLoggingEnabled()
177 && $this->
access->checkAccess(
'tst_history_read',
'', $this->test_object->getRefId());
182 return $this->
access->checkAccess(
'edit_permission',
'', $this->test_object->getRefId());
187 return \ilLearningProgressAccess::checkAccess($this->test_object->getRefId());
192 if ($this->test_access->checkManageParticipantsAccess()
193 || $this->test_access->checkParticipantsResultsAccess()) {
202 return $this->test_access->checkScoreParticipantsAccess();
214 if (preg_match(
'/^ass(.*?)gui$/i', $this->
ctrl->getNextClass($this))) {
218 if ($this->
ctrl->getNextClass($this) ==
'ilassquestionpagegui') {
222 if ($this->
ctrl->getCmdClass() ==
'iltestoutputgui') {
226 if ($this->
ctrl->getCmdClass() ==
'iltestevaluationgui') {
227 return in_array($this->
ctrl->getCmd(), [
228 '',
'outUserResultsPassOverview',
'outUserListOfAnswerPasses',
'singleResults' 241 $class_path = $this->
ctrl->getCurrentClassPath();
243 switch (array_pop($class_path)) {
244 case MarkSchemaGUI::class:
245 case SettingsMainGUI::class:
246 case SettingsScoringGUI::class:
255 switch ($this->
ctrl->getCmd()) {
260 case 'directfeedback':
262 case 'outCorrectSolution':
263 case 'showAnswersOfUser':
264 case 'backFromSummary':
268 case 'confirmFinish':
269 case 'outTestSummary':
270 case 'outQuestionSummary':
272 case 'selectImagemapRegion':
273 case 'confirmSubmitAnswers':
274 case 'finalSubmission':
276 case 'outUserPassDetails':
277 case 'checkPassword':
278 case 'exportCertificate':
279 case 'finishListOfAnswers':
280 case 'backConfirmFinish':
281 case 'showFinalStatement':
283 case 'browseForQuestions':
286 case 'resetTextFilter':
287 case 'insertQuestions':
289 'iltestdashboardgui',
291 'illearningprogressgui' 293 if (!in_array($this->
ctrl->getNextClass($this), $classes)) {
299 case 'certificateservice':
300 case 'certificateImport':
301 case 'certificateUpload':
302 case 'certificateEditor':
303 case 'certificateDelete':
304 case 'certificateSave':
306 case 'deleteDefaults':
308 case 'applyDefaults':
309 case 'inviteParticipants':
310 case 'searchParticipants':
311 if ($this->
isWriteAccessGranted() && in_array(strtolower($this->
ctrl->getCmdClass()), [
'ilobjtestgui',
'ilcertificategui'])) {
324 $this->
lng->txt(
'test'),
325 $this->
ctrl->getLinkTargetByClass(
327 \ilObjTestGUI::class, TestScreenGUI::class],
335 && !$this->test_object->getMainSettings()->getAdditionalSettings()->getHideInfoTab()) {
336 $this->
tabs->addTarget(
338 $this->
ctrl->getLinkTargetByClass(
340 \ilRepositoryGUI::class,
341 \ilObjTestGUI::class,
342 \ilInfoScreenGUI::class
345 [
'',
'outIntroductionPage',
'setAnonymousId',
'redirectToInfoScreen']
351 $settingsCommands = [
352 'marks',
'showMarkSchema',
'addMarkStep',
'deleteMarkSteps',
353 'resetToSimpleMarkSchema',
'saveMarks',
'certificate',
354 'certificateEditor',
'certificateSave',
355 'certificatePreview',
'certificateDelete',
'certificateUpload',
'certificateImport',
356 'scoring',
'defaults',
'addDefaults',
'deleteDefaults',
'applyDefaults',
357 'inviteParticipants',
'saveFixedParticipantsStatus',
'searchParticipants',
'addParticipants' 360 $reflection = new \ReflectionClass(SettingsMainGUI::class);
361 foreach ($reflection->getConstants() as $name => $value) {
362 if (substr($name, 0, 4) ===
'CMD_') {
363 $settingsCommands[] = $value;
367 $reflection = new \ReflectionClass(SettingsScoringGUI::class);
368 foreach ($reflection->getConstants() as $name => $value) {
369 if (substr($name, 0, 4) ===
'CMD_') {
370 $settingsCommands[] = $value;
374 $settingsCommands[] =
'';
376 $this->
tabs->addTarget(
378 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, SettingsMainGUI::class]),
382 'ilobjtestsettingsmaingui',
383 'ilobjtestsettingsscoringresultsgui',
390 if ($this->test_object->isFixedTest()) {
391 $target = $this->
ctrl->getLinkTargetByClass(
392 \ilObjTestGUI::class,
397 if ($this->test_object->isRandomTest()) {
398 $target = $this->
ctrl->getLinkTargetByClass(\ilTestRandomQuestionSetConfigGUI::class);
402 $this->
tabs->addTarget(
406 'showQuestions',
'browseForQuestions',
'questionBrowser',
'createQuestion',
407 'filter',
'resetFilter',
'insertQuestions',
'back',
408 'executeCreateQuestion',
'cancelCreateQuestion',
409 'addQuestionpool',
'saveRandomQuestions',
'saveQuestionSelectionMode',
'print',
410 'addsource',
'removesource',
'randomQuestions' 417 self::TAB_ID_PARTICIPANTS,
418 $this->
lng->txt(
'participants'),
425 self::TAB_ID_YOUR_RESULTS,
426 $this->
lng->txt(
'your_results'),
432 if ($this->test_object->getGlobalSettings()->isManualScoringEnabled()) {
434 $this->
tabs->addTarget(
435 self::TAB_ID_MANUAL_SCORING,
436 $this->
ctrl->getLinkTargetByClass(
437 [\ilObjTestGUI::class, TestScoringByQuestionGUI::class],
438 'showManScoringByQuestionParticipantsTable' 441 'showManScoringParticipantsTable',
442 'applyManScoringParticipantsFilter',
443 'resetManScoringParticipantsFilter',
444 'showManScoringParticipantScreen',
445 'showManScoringByQuestionParticipantsTable',
446 'applyManScoringByQuestionFilter',
447 'resetManScoringByQuestionFilter',
448 'saveManScoringByQuestion' 456 $this->
tabs->addTarget(
457 self::TAB_ID_HISTORY,
458 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'history'),
465 $this->
tabs->addTarget(
466 self::TAB_ID_LEARNING_PROGRESS,
467 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilLearningProgressGUI::class],
''),
470 'illplistofobjectsgui',
471 'illplistofsettingsgui',
472 'illearningprogressgui',
473 'illplistofprogressgui' 479 $mdgui = new \ilObjectMetaDataGUI($this->test_object);
480 $mdtab = $mdgui->getTab(\ilObjTestGUI::class);
482 $this->
tabs->addTarget(
483 self::TAB_ID_META_DATA,
490 $this->
tabs->addTarget(
492 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestExportGUI::class],
''),
499 $this->
tabs->addTarget(
500 self::TAB_ID_PERMISSIONS,
501 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilPermissionGUI::class],
'perm'),
502 [
'perm',
'info',
'owner'],
511 $this->
ctrl->saveParameterByClass($this->
ctrl->getCmdClass(),
'q_id');
513 $this->
tabs->setBackTarget(
514 $this->
lng->txt(
'backtocallingtest'),
517 $this->
tabs->addTarget(
518 'tst_browse_for_questions',
519 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'browseForQuestions'),
520 [
'browseForQuestions',
'filter',
'resetFilter',
'resetTextFilter',
'insertQuestions'],
532 $this->
tabs->setBackTarget(
533 $this->
lng->txt(
'backtocallingtest'),
536 $this->
tabs->addTarget(
538 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'randomQuestions'),
552 $this->
tabs->activateTab(self::TAB_ID_QUESTIONS);
554 if ($this->test_object->isRandomTest()) {
555 $this->
tabs->addSubTabTarget(
556 self::QUESTIONS_SUBTAB_ID_RANDOM_SETTINGS,
557 $this->
ctrl->getLinkTargetByClass(
558 \ilTestRandomQuestionSetConfigGUI::class,
561 [
'',
'showGeneralConfigForm',
'saveGeneralConfigForm']
564 $this->
tabs->addSubTabTarget(
565 self::QUESTIONS_SUBTAB_ID_RANDOM_POOLS,
566 $this->
ctrl->getLinkTargetByClass(
567 \ilTestRandomQuestionSetConfigGUI::class,
570 [
'showSourcePoolDefinitionList']
574 $this->
tabs->addSubTab(
575 self::SUBTAB_ID_QST_LIST_VIEW,
576 $this->
lng->txt(
'edit_test_questions'),
580 if ($this->test_object->isSkillServiceToBeConsidered()) {
581 $this->
tabs->addSubTabTarget(
582 self::SETTINGS_SUBTAB_ID_ASSIGN_SKILLS_TO_QUESTIONS,
583 $this->
ctrl->getLinkTargetByClass(
585 \ilTestSkillAdministrationGUI::class,
586 \ilAssQuestionSkillAssignmentsGUI::class
600 $this->
tabs->addSubTabTarget(
601 self::SETTINGS_SUBTAB_ID_GENERAL,
602 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, SettingsMainGUI::class]),
604 [SettingsMainGUI::class]
607 $this->
tabs->addSubTabTarget(
608 self::SETTINGS_SUBTAB_ID_MARK_SCHEMA,
609 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, MarkSchemaGUI::class],
'showMarkSchema'),
611 [MarkSchemaGUI::class]
614 $this->
tabs->addSubTabTarget(
615 self::SETTINGS_SUBTAB_ID_SCORING,
616 $this->
ctrl->getLinkTargetByClass(
617 [\ilObjTestGUI::class, SettingsScoringGUI::class],
621 [SettingsScoringGUI::class]
624 $this->
ctrl->setParameterByClass(\ilTestPageGUI::class,
'page_type',
'introductionpage');
625 $this->
tabs->addSubTabTarget(
626 self::SETTINGS_SUBTAB_ID_EDIT_INTRODUCTION_PAGE,
627 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestPageGUI::class],
'preview'),
631 $this->
ctrl->setParameterByClass(\ilTestPageGUI::class,
'page_type',
'concludingremarkspage');
632 $this->
tabs->addSubTabTarget(
633 self::SETTINGS_SUBTAB_ID_EDIT_CONCLUSION_PAGE,
634 $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestPageGUI::class],
'preview'),
637 $this->
ctrl->clearParameterByClass(\ilTestPageGUI::class,
'page_type');
639 $validator = new \ilCertificateActiveValidator();
640 if ($validator->validate() ===
true) {
641 $this->
tabs->addSubTabTarget(
642 self::SETTINGS_SUBTAB_ID_CERTIFICATE,
643 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'certificate'),
644 [
'certificate',
'certificateEditor',
'certificateRemoveBackground',
'ceateSave',
645 'certificatePreview',
'certificateDelete',
'certificateUpload',
'certificateImport'],
646 [
'',
'ilobjtestgui',
'ilcertificategui']
650 if ($this->test_object->isSkillServiceToBeConsidered()) {
651 $this->
tabs->addSubTabTarget(
652 self::SETTINGS_SUBTAB_ID_ASSIGN_SKILL_TRESHOLDS,
653 $this->
ctrl->getLinkTargetByClass(
655 \ilTestSkillAdministrationGUI::class,
656 \ilTestSkillLevelThresholdsGUI::class
664 $this->
tabs->addSubTabTarget(
665 self::SETTINGS_SUBTAB_ID_PERSONAL_DEFAULT_SETTINGS,
666 $this->
ctrl->getLinkTargetByClass(\ilObjTestGUI::class,
'defaults'),
667 [
'defaults',
'deleteDefaults',
'addDefaults',
'applyDefaults'],
668 [
'',
'ilobjtestgui',
'ilcertificategui']
671 $lti_settings = new \ilLTIProviderObjectSettingGUI($this->test_object->getRefId());
672 if ($lti_settings->hasSettingsAccess()) {
673 $this->
tabs->addSubTabTarget(
675 $this->
ctrl->getLinkTargetByClass(\ilLTIProviderObjectSettingGUI::class),
677 [\ilLTIProviderObjectSettingGUI::class]
693 if (!($this->test_object->getProcessingTimeInSeconds() > 0)) {
697 if ($this->test_object->getNrOfTries() != 1) {
706 return $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestParticipantsGUI::class]);
711 return $this->test_session->reportableResultsAvailable($this->test_object)
712 || $this->test_session->getActiveId() !== 0
713 && $this->test_object->canShowSolutionPrintview($this->test_session->getUserId());
719 return $this->
ctrl->getLinkTargetByClass([\ilObjTestGUI::class, \ilTestResultsGUI::class, \ilTestEvalObjectiveOrientedGUI::class]);
723 return $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilMyTestSolutionsGUI::class, \ilTestEvaluationGUI::class]);
726 return $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilMyTestResultsGUI::class, \ilTestEvaluationGUI::class]);
731 return $this->test_object->isScoreReportingEnabled();
736 if (!$this->test_object->isScoreReportingEnabled()) {
740 return $this->objective_parent->isObjectiveOrientedPresentationRequired();
745 if (!$this->test_object->isScoreReportingEnabled()) {
749 return $this->test_object->getHighscoreEnabled();
754 if (!$this->test_object->isScoreReportingEnabled()) {
758 return $this->test_object->isSkillServiceToBeConsidered();
763 return $this->test_object->canShowSolutionPrintview($this->test_session->getUserId());
769 $this->
tabs->addSubTab(
770 self::SUBTAB_ID_LO_RESULTS,
771 $this->
lng->txt(
'tst_tab_results_objective_oriented'),
772 $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilTestEvalObjectiveOrientedGUI::class])
777 $myResultsLabel = $this->
lng->txt(
'tst_show_results');
780 $myResultsLabel = $this->
lng->txt(
'tst_tab_results_pass_oriented');
783 $this->
tabs->addSubTab(
784 self::SUBTAB_ID_MY_RESULTS,
786 $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilMyTestResultsGUI::class, \ilTestEvaluationGUI::class])
791 $this->
tabs->addSubTab(
792 self::SUBTAB_ID_SKILL_RESULTS,
793 $this->
lng->txt(
'tst_show_comp_results'),
794 $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilTestSkillEvaluationGUI::class])
799 $this->
tabs->addSubTab(
800 self::SUBTAB_ID_HIGHSCORE,
801 $this->
lng->txt(
'tst_show_toplist'),
802 $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilTestToplistGUI::class],
'outResultsToplist')
807 $this->
tabs->addSubTab(
808 self::SUBTAB_ID_MY_SOLUTIONS,
809 $this->
lng->txt(
'tst_list_of_answers_show'),
810 $this->
ctrl->getLinkTargetByClass([\ilTestResultsGUI::class, \ilMyTestSolutionsGUI::class, \ilTestEvaluationGUI::class])
activateTab(string $tab_id)
const TAB_ID_PARTICIPANTS
isTabsConfigSetupRequired()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setParentBackLabel(?string $parent_back_label)
const CMD_SHOW_FORM
command constants
const SETTINGS_SUBTAB_ID_EDIT_INTRODUCTION_PAGE
const TAB_ID_YOUR_RESULTS
__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)
string $parent_back_label
const SUBTAB_ID_MY_RESULTS
const SETTINGS_SUBTAB_ID_ASSIGN_SKILL_TRESHOLDS
checkParticipantsTabAccess()
resetTabsAndAddBacklink(string $back_link_target)
activateSubTab(string $sub_tab_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const CMD_SHOW_SRC_POOL_DEF_LIST
needsSkillResultsSubTab()
const SUBTAB_ID_QST_PAGE_VIEW
const SETTINGS_SUBTAB_ID_CERTIFICATE
const SUBTAB_ID_HIGHSCORE
const SUBTAB_ID_GENERAL_SETTINGS
const TAB_ID_LEARNING_PROGRESS
const QUESTIONS_SUBTAB_ID_RANDOM_SETTINGS
const SETTINGS_SUBTAB_ID_EDIT_CONCLUSION_PAGE
getYourResultsTabTarget()
const CMD_SHOW_SKILL_THRESHOLDS
const SUBTAB_ID_QST_LIST_VIEW
const SUBTAB_ID_SKILL_RESULTS
const TAB_ID_QUESTIONS
(Sub-)Tab ID constants
needsYourSolutionsSubTab()
const SETTINGS_SUBTAB_ID_MARK_SCHEMA
needsTimeExtensionSubTab()
const TAB_ID_MANUAL_SCORING
checkScoreParticipantsTabAccess()
const CMD_SHOW_GENERAL_CONFIG_FORM
getBrowseForQuestionsTab()
const SETTINGS_SUBTAB_ID_ASSIGN_SKILLS_TO_QUESTIONS
getParticipantsTabTarget()
const SETTINGS_SUBTAB_ID_SCORING
const SUBTAB_ID_LO_RESULTS
isPermissionsAccessGranted()
const SUBTAB_ID_MY_SOLUTIONS
const SETTINGS_SUBTAB_ID_PERSONAL_DEFAULT_SETTINGS
setParentBackHref(?string $parent_back_href)
const SETTINGS_SUBTAB_ID_GENERAL
const CMD_SHOW_SKILL_QUEST_ASSIGNS
const CMD_SHOW_SKILL_QUEST_ASSIGN_PROPERTIES_FORM
const QUESTIONS_SUBTAB_ID_RANDOM_POOLS