ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestEvalObjectiveOrientedGUI Class Reference
+ Inheritance diagram for ilTestEvalObjectiveOrientedGUI:
+ Collaboration diagram for ilTestEvalObjectiveOrientedGUI:

Public Member Functions

 executeCommand ()
 
 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_pass_result_repository
 
ilTestParticipantAccessFilterFactory $participant_access_filter
 

Detailed Description

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

Member Function Documentation

◆ executeCommand()

ilTestEvalObjectiveOrientedGUI::executeCommand ( )

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

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

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  }
+ Here is the call graph for this function:

◆ showVirtualPassCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassCmd ( )
private

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

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(), ILIAS\Repository\toolbar(), and ILIAS\UI\Implementation\Component\withOnLoadCode().

Referenced by showVirtualPassResetTableFilterCmd(), and showVirtualPassSetTableFilterCmd().

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  }
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
ilGlobalTemplateInterface ilTemplate $tpl
sk 2023-08-01: We need this union type, even if it is wrong! To change this
setVariable(string $variable, $value='')
Sets the given variable to the given value.
getPassDetailsOverviewTableGUI(array $result_array, int $active_id, int $pass, ilTestServiceGUI $target_gui, string $target_cmd, ?ilTestQuestionRelatedObjectivesList $objectives_list=null, bool $multiple_objectives_involved=true)
static getInstance(ilTestSession $a_test_session)
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectives_adapter, ilTestQuestionSequence $test_sequence)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
populateContent(string $content)
+ 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.

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

65  {
66  $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
67  $tableGUI->resetOffset();
68  $tableGUI->resetFilter();
69  $this->showVirtualPassCmd();
70  }
buildPassDetailsOverviewTableGUI(ilTestServiceGUI $target_gui, string $target_cmd)
+ Here is the call graph for this function:

◆ showVirtualPassSetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassSetTableFilterCmd ( )

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

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

57  {
58  $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
59  $tableGUI->resetOffset();
60  $tableGUI->writeFilterToSession();
61  $this->showVirtualPassCmd();
62  }
buildPassDetailsOverviewTableGUI(ilTestServiceGUI $target_gui, string $target_cmd)
+ Here is the call graph for this function:

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