ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 $testSession, $passes, $withResults)
 This method uses the data of a given test pass to create an evaluation for displaying into a table used in the ilTestEvaluationGUI. More...
 
 setObjectiveOrientedContainer (ilTestObjectiveOrientedContainer $objective_oriented_container)
 
 getObjectiveOrientedContainer ()
 
 executeCommand ()
 execute command More...
 
 getCommand ($cmd)
 Retrieves the ilCtrl 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, ilTestResultHeaderLabelBuilder $testResultHeaderLabelBuilder=null)
 Returns the list of answers of a users test pass. More...
 
 getPassListOfAnswersWithScoring (&$result_array, $active_id, $pass, $show_solutions=false)
 Returns the list of answers of a users test pass and offers a scoring option. 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...
 
 getResultsOfUserOutput (ilTestSession $testSession, int $active_id, int $pass, ilParticipantsTestResultsGUI $target_gui, bool $show_pass_details=true, bool $show_answers=true, bool $show_question_only=false, bool $show_reached_points=false)
 Output of the pass overview for a test called by a test participant. More...
 
 getResultsHeadUserAndPass ($active_id, $pass)
 Returns the user and pass data for a test results output. More...
 
 getQuestionResultForTestUsers (int $question_id, int $test_id)
 
 getObject ()
 

Private Member Functions

 showVirtualPassCmd ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilTestServiceGUI
 getPassDetailsOverviewTableGUI (array $result_array, int $active_id, int $pass, ilTestServiceGUI|ilParticipantsTestResultsGUI $target_gui, string $target_cmd, ilTestQuestionRelatedObjectivesList $objectives_list=null, bool $multiple_objectives_involved=true)
 
 buildPassDetailsOverviewTableGUI (ilTestServiceGUI|ilParticipantsTestResultsGUI $target_gui, string $target_cmd)
 
 isGradingMessageRequired ()
 
 getGradingMessageBuilder (int $active_id)
 
 buildQuestionRelatedObjectivesList (ilLOTestQuestionAdapter $objectives_adapter, ilTestQuestionSequence $test_sequence)
 
 getFilteredTestResult (int $active_id, int $pass, bool $considerHiddenQuestions, bool $considerOptionalQuestions)
 
 populateContent ($content)
 
 buildUserTestResultsToolbarGUI ()
 
 outCorrectSolutionCmd ()
 
 outCorrectSolution ()
 Creates an output of the solution of an answer compared to the correct solution. More...
 
 populatePassFinishDate (ilTemplate $tpl, ?int $pass_finish_date)
 
 populateExamId (ilTemplate $tpl, int $active_id, int $pass)
 
- Protected Attributes inherited from ilTestServiceGUI
InternalRequestService $testrequest
 
ILIAS TestQuestionPool QuestionInfoService $questioninfo
 
ilTestService $service = null
 
ilDBInterface $db
 
ilLanguage $lng
 
LoggingServices $logging_services
 
ilHelpGUI $help
 
ilRbacSystem $rbac_system
 
ilGlobalTemplateInterface ilTemplate $tpl
 sk 2023-08-01: We need this union type, even if it is wrong! To change this More...
 
ContentStyle $content_style
 
ilErrorHandling $error
 
ilAccess $access
 
HTTPServices $http
 
ilCtrl $ctrl
 
ilToolbarGUI $toolbar
 
ilTabsGUI $tabs
 
ilObjectDataCache $obj_cache
 
ilComponentRepository $component_repository
 
ilObjUser $user
 
ArrayBasedRequestWrapper $post_wrapper
 
ilNavigationHistory $navigation_history
 
Refinery $refinery
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
SkillService $skills_service
 
ilTestShuffler $shuffler
 
ilTestResultsFactory $results_factory
 
ilTestResultsPresentationFactory $results_presentation_factory
 
ILIAS $ilias
 
ilSetting $settings
 
GlobalScreenServices $global_screen
 
ilTree $tree
 
int $ref_id
 
ilTestSessionFactory $testSessionFactory = null
 
ilTestSequenceFactory $testSequenceFactory = null
 
ilTestParticipantData $participantData = null
 
ilTestParticipantAccessFilterFactory $participant_access_filter
 

Detailed Description

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

Member Function Documentation

◆ executeCommand()

ilTestEvalObjectiveOrientedGUI::executeCommand ( )

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

References ILIAS\Repository\ctrl().

33  {
34  $this->ctrl->saveParameter($this, "active_id");
35 
36  switch ($this->ctrl->getNextClass($this)) {
37  case 'ilassquestionpagegui':
38  $forwarder = new ilAssQuestionPageCommandForwarder();
39  $forwarder->setTestObj($this->object);
40  $forwarder->forward();
41  break;
42 
43  default:
44  $cmd = $this->ctrl->getCmd('showVirtualPass') . 'Cmd';
45  $this->$cmd();
46  }
47  }
+ Here is the call graph for this function:

◆ showVirtualPassCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassCmd ( )
private

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

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

Referenced by showVirtualPassResetTableFilterCmd(), and showVirtualPassSetTableFilterCmd().

66  {
67  $test_session = $this->testSessionFactory->getSession();
68 
69  if (!$this->object->getShowPassDetails()) {
70  $executable = $this->object->isExecutable($test_session, $test_session->getUserId());
71 
72  if ($executable["executable"]) {
73  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
74  }
75  }
76 
78  $toolbar->build();
79 
80  $virtual_sequence = $this->service->buildVirtualSequence($test_session);
81  $user_results = $this->service->getVirtualSequenceUserResults($virtual_sequence);
82 
83  $objectives_adapter = ilLOTestQuestionAdapter::getInstance($test_session);
84 
85  $objectives_list = $this->buildQuestionRelatedObjectivesList($objectives_adapter, $virtual_sequence);
86  $objectives_list->loadObjectivesTitles();
87 
88  $test_result_header_label_builder = new ilTestResultHeaderLabelBuilder($this->lng, $this->obj_cache);
89 
90  $test_result_header_label_builder->setObjectiveOrientedContainerId($test_session->getObjectiveOrientedContainerId());
91  $test_result_header_label_builder->setUserId($test_session->getUserId());
92  $test_result_header_label_builder->setTestObjId($this->object->getId());
93  $test_result_header_label_builder->setTestRefId($this->object->getRefId());
94  $test_result_header_label_builder->initObjectiveOrientedMode();
95 
96  $tpl = new ilTemplate('tpl.il_as_tst_virtual_pass_details.html', false, false, 'Modules/Test');
97 
98  foreach (array_keys($objectives_list->getObjectives()) as $lo_id) {
99  $user_results_for_lo = $objectives_list->filterResultsByObjective($user_results, $lo_id);
100 
101  $overview_table_gui = $this->getPassDetailsOverviewTableGUI(
102  $user_results_for_lo,
103  $test_session->getActiveId(),
104  $test_session->getPass(),
105  $this,
106  "showVirtualPass",
107  $objectives_list,
108  false
109  );
110  $overview_table_gui->setTitle(
111  $test_result_header_label_builder->getVirtualPassDetailsHeaderLabel(
112  $objectives_list->getObjectiveTitleById($lo_id)
113  )
114  );
115 
116  $lo_status = new ilTestLearningObjectivesStatusGUI(
117  $this->lng,
118  $this->ctrl,
119  $this->ui_factory,
120  $this->ui_renderer,
121  $this->testrequest
122  );
123  $lo_status->setCrsObjId($this->getObjectiveOrientedContainer()->getObjId());
124  $lo_status->setUsrId($test_session->getUserId());
125  $lo_status_html = $lo_status->getHTML($lo_id);
126 
127  $tpl->setCurrentBlock('pass_details');
128  $tpl->setVariable("PASS_DETAILS", $overview_table_gui->getHTML());
129  $tpl->setVariable("LO_STATUS", $lo_status_html);
131  }
132 
133  $this->populateContent($this->ctrl->getHTML($toolbar) . $tpl->get());
134  }
ilGlobalTemplateInterface ilTemplate $tpl
sk 2023-08-01: We need this union type, even if it is wrong! To change this
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static getInstance(ilTestSession $a_test_session)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
getPassDetailsOverviewTableGUI(array $result_array, int $active_id, int $pass, ilTestServiceGUI|ilParticipantsTestResultsGUI $target_gui, string $target_cmd, ilTestQuestionRelatedObjectivesList $objectives_list=null, bool $multiple_objectives_involved=true)
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectives_adapter, ilTestQuestionSequence $test_sequence)
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showVirtualPassResetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassResetTableFilterCmd ( )

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

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

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

◆ showVirtualPassSetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassSetTableFilterCmd ( )

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

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

50  {
51  $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
52  $tableGUI->resetOffset();
53  $tableGUI->writeFilterToSession();
54  $this->showVirtualPassCmd();
55  }
buildPassDetailsOverviewTableGUI(ilTestServiceGUI|ilParticipantsTestResultsGUI $target_gui, string $target_cmd)
+ Here is the call graph for this function:

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