ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTestEvalObjectiveOrientedGUI Class Reference
+ Inheritance diagram for ilTestEvalObjectiveOrientedGUI:
+ Collaboration diagram for ilTestEvalObjectiveOrientedGUI:

Public Member Functions

 executeCommand ()
 execute command More...
 
 showVirtualPassSetTableFilterCmd ()
 
 showVirtualPassResetTableFilterCmd ()
 
- Public Member Functions inherited from ilTestServiceGUI
 isContextResultPresentation ()
 
 setContextResultPresentation (bool $contextResultPresentation)
 
 setParticipantData (ilTestParticipantData $participantData)
 
 getParticipantData ()
 
 getPassOverviewTableData (ilTestSession $test_session, array $passes, bool $with_results)
 
 setObjectiveOrientedContainer (ilTestObjectiveOrientedContainer $objective_oriented_container)
 
 getObjectiveOrientedContainer ()
 
 executeCommand ()
 execute command More...
 
 buildPassOverviewTableGUI (ilTestEvaluationGUI $target_gui)
 
 getPassListOfAnswers (&$result_array, $active_id, $pass, $show_solutions=false, $only_answered_questions=false, $show_question_only=false, $show_reached_points=false, $anchorNav=false, ?ilTestQuestionRelatedObjectivesList $objectives_list=null, ?ResultsTitlesBuilder $testResultHeaderLabelBuilder=null)
 Returns the list of answers of a users test pass. More...
 
 getResultsSignature ()
 Returns HTML code for a signature field. More...
 
 getAdditionalUsrDataHtmlAndPopulateWindowTitle ($testSession, $active_id, $overwrite_anonymity=false)
 Returns the user data for a test results output. More...
 
 getCorrectSolutionOutput ($question_id, $active_id, $pass, ?ilTestQuestionRelatedObjectivesList $objectives_list=null)
 Returns an output of the solution to an answer compared to the correct solution. More...
 
 getObject ()
 

Private Member Functions

 showVirtualPassCmd ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilTestServiceGUI
 getPassDetailsOverviewTableGUI (array $result_array, int $active_id, int $pass, ilTestServiceGUI $target_gui, string $target_cmd, ?ilTestQuestionRelatedObjectivesList $objectives_list=null, bool $multiple_objectives_involved=true)
 
 buildPassDetailsOverviewTableGUI (ilTestServiceGUI $target_gui, string $target_cmd)
 
 isGradingMessageRequired ()
 
 getGradingMessageBuilder (int $active_id)
 
 buildQuestionRelatedObjectivesList (ilLOTestQuestionAdapter $objectives_adapter, ilTestQuestionSequence $test_sequence)
 
 populateContent (string $content)
 
 outCorrectSolutionCmd ()
 
 outCorrectSolution ()
 
 populatePassFinishDate (ilTemplate $tpl, ?int $pass_finish_date)
 
 populateExamId (ilTemplate $tpl, int $active_id, int $pass)
 
- Protected Attributes inherited from ilTestServiceGUI
readonly RequestDataCollector $testrequest
 
readonly GeneralQuestionPropertiesRepository $questionrepository
 
readonly TestQuestionsRepository $testquestionsrepository
 
ilTestService $service = null
 
readonly ilDBInterface $db
 
readonly ilLanguage $lng
 
readonly TestLogger $logger
 
readonly ilHelpGUI $help
 
readonly ilRbacSystem $rbac_system
 
ilGlobalTemplateInterface ilTemplate $tpl
 sk 2023-08-01: We need this union type, even if it is wrong! To change this More...
 
readonly ContentStyle $content_style
 
readonly ilErrorHandling $error
 
ilAccess $access
 
readonly HTTPServices $http
 
readonly ilCtrlInterface $ctrl
 
readonly ilToolbarGUI $toolbar
 
readonly ilTabsGUI $tabs
 
readonly ilObjectDataCache $obj_cache
 
readonly ilComponentRepository $component_repository
 
readonly ilObjUser $user
 
readonly ArrayBasedRequestWrapper $post_wrapper
 
readonly ilNavigationHistory $navigation_history
 
readonly Refinery $refinery
 
readonly UIFactory $ui_factory
 
readonly UIRenderer $ui_renderer
 
readonly SkillService $skills_service
 
readonly ilTestShuffler $shuffler
 
readonly ResultsDataFactory $results_data_factory
 
readonly ResultsPresentationFactory $results_presentation_factory
 
readonly ILIAS $ilias
 
readonly ilSetting $settings
 
readonly GlobalScreenServices $global_screen
 
readonly ilTree $tree
 
int $ref_id
 
ilTestSessionFactory $test_session_factory = null
 
ilTestSequenceFactory $test_sequence_factory = null
 
ilTestParticipantData $participantData = null
 
TestResultRepository $test_result_repository
 
ilTestParticipantAccessFilterFactory $participant_access_filter
 

Detailed Description

Definition at line 31 of file class.ilTestEvalObjectiveOrientedGUI.php.

Member Function Documentation

◆ executeCommand()

ilTestEvalObjectiveOrientedGUI::executeCommand ( )

execute command

Reimplemented from ilTestServiceGUI.

Definition at line 33 of file class.ilTestEvalObjectiveOrientedGUI.php.

34 {
35 $this->ctrl->saveParameter($this, "active_id");
36
37 switch ($this->ctrl->getNextClass($this)) {
38 case 'ilassquestionpagegui':
39 $forwarder = new ilAssQuestionPageCommandForwarder(
40 $this->object,
41 $this->lng,
42 $this->ctrl,
43 $this->tpl,
44 $this->questionrepository,
45 $this->testrequest
46 );
47 $forwarder->forward();
48 break;
49
50 default:
51 $cmd = $this->ctrl->getCmd('showVirtualPass') . 'Cmd';
52 $this->$cmd();
53 }
54 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ showVirtualPassCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassCmd ( )
private

Definition at line 72 of file class.ilTestEvalObjectiveOrientedGUI.php.

73 {
74 $test_session = $this->test_session_factory->getSession();
75
76 if (!$this->object->getShowPassDetails()) {
77 $executable = $this->object->isExecutable($test_session, $test_session->getUserId());
78
79 if ($executable['executable']) {
80 $this->ctrl->redirectByClass([ilRepositoryGUI::class, ilObjTestGUI::class, ilInfoScreenGUI::class]);
81 }
82 }
83
84 $this->toolbar->addComponent(
85 $this->ui_factory->button()->standard($this->lng->txt('print'), '')
86 ->withOnLoadCode(fn($id) => "$('#$id').on('click', ()=>{window.print();})")
87 );
88
89 $virtual_sequence = $this->service->buildVirtualSequence($test_session);
90 $user_results = $this->service->getVirtualSequenceUserResults($virtual_sequence);
91
92 $objectives_adapter = ilLOTestQuestionAdapter::getInstance($test_session);
93
94 $objectives_list = $this->buildQuestionRelatedObjectivesList($objectives_adapter, $virtual_sequence);
95 $objectives_list->loadObjectivesTitles();
96
97 $test_result_header_label_builder = new ResultsTitlesBuilder($this->lng, $this->obj_cache);
98
99 $test_result_header_label_builder->setObjectiveOrientedContainerId($test_session->getObjectiveOrientedContainerId());
100 $test_result_header_label_builder->setUserId($test_session->getUserId());
101 $test_result_header_label_builder->setTestObjId($this->object->getId());
102 $test_result_header_label_builder->setTestRefId($this->object->getRefId());
103 $test_result_header_label_builder->initObjectiveOrientedMode();
104
105 $tpl = new ilTemplate('tpl.il_as_tst_virtual_pass_details.html', false, false, 'components/ILIAS/Test');
106
107 foreach (array_keys($objectives_list->getObjectives()) as $lo_id) {
108 $user_results_for_lo = $objectives_list->filterResultsByObjective($user_results, $lo_id);
109
110 $overview_table_gui = $this->getPassDetailsOverviewTableGUI(
111 $user_results_for_lo,
112 $test_session->getActiveId(),
113 $test_session->getPass(),
114 $this,
115 "showVirtualPass",
116 $objectives_list,
117 false
118 );
119 $overview_table_gui->setTitle(
120 $test_result_header_label_builder->getVirtualPassDetailsHeaderLabel(
121 $objectives_list->getObjectiveTitleById($lo_id)
122 )
123 );
124
125 $lo_status = new ilTestLearningObjectivesStatusGUI(
126 $this->lng,
127 $this->ctrl,
128 $this->ui_factory,
129 $this->ui_renderer,
130 $this->testrequest
131 );
132 $lo_status->setCrsObjId($this->getObjectiveOrientedContainer()->getObjId());
133 $lo_status->setUsrId($test_session->getUserId());
134 $lo_status_html = $lo_status->getHTML($lo_id);
135
136 $tpl->setCurrentBlock('pass_details');
137 $tpl->setVariable("PASS_DETAILS", $overview_table_gui->getHTML());
138 $tpl->setVariable("LO_STATUS", $lo_status_html);
140 }
141
142 $this->populateContent($tpl->get());
143 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getInstance(ilTestSession $a_test_session)
special template class to simplify handling of ITX/PEAR
populateContent(string $content)
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectives_adapter, ilTestQuestionSequence $test_sequence)
ilGlobalTemplateInterface ilTemplate $tpl
sk 2023-08-01: We need this union type, even if it is wrong! To change this
getPassDetailsOverviewTableGUI(array $result_array, int $active_id, int $pass, ilTestServiceGUI $target_gui, string $target_cmd, ?ilTestQuestionRelatedObjectivesList $objectives_list=null, bool $multiple_objectives_involved=true)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.

References $id, ilTestServiceGUI\$tpl, ilTestServiceGUI\buildQuestionRelatedObjectivesList(), ILIAS\Repository\ctrl(), ILIAS\UICore\GlobalTemplate\get(), ilLOTestQuestionAdapter\getInstance(), ilTestServiceGUI\getObjectiveOrientedContainer(), ilTestServiceGUI\getPassDetailsOverviewTableGUI(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ilTestServiceGUI\populateContent(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ILIAS\UICore\GlobalTemplate\setVariable(), and ILIAS\Repository\toolbar().

Referenced by showVirtualPassResetTableFilterCmd(), and showVirtualPassSetTableFilterCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showVirtualPassResetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassResetTableFilterCmd ( )

Definition at line 64 of file class.ilTestEvalObjectiveOrientedGUI.php.

65 {
66 $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
67 $tableGUI->resetOffset();
68 $tableGUI->resetFilter();
69 $this->showVirtualPassCmd();
70 }
buildPassDetailsOverviewTableGUI(ilTestServiceGUI $target_gui, string $target_cmd)

References ilTestServiceGUI\buildPassDetailsOverviewTableGUI(), and showVirtualPassCmd().

+ Here is the call graph for this function:

◆ showVirtualPassSetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassSetTableFilterCmd ( )

Definition at line 56 of file class.ilTestEvalObjectiveOrientedGUI.php.

57 {
58 $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
59 $tableGUI->resetOffset();
60 $tableGUI->writeFilterToSession();
61 $this->showVirtualPassCmd();
62 }

References ilTestServiceGUI\buildPassDetailsOverviewTableGUI(), and showVirtualPassCmd().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: