ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestSubmissionReviewGUI Class Reference

Class ilTestSubmissionReviewGUI. More...

+ Inheritance diagram for ilTestSubmissionReviewGUI:
+ Collaboration diagram for ilTestSubmissionReviewGUI:

Public Member Functions

 __construct (protected ilTestPlayerAbstractGUI $test_player_gui, ilObjTest $testOBJ, protected ilTestSession $testSession)
 
 executeCommand ()
 
- 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 ()
 

Protected Member Functions

 dispatchCommand ()
 
 buildToolbar ($toolbarId)
 
 buildUserReviewOutput ()
 
 show ()
 
- 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)
 

Private Member Functions

 getContentBlockName ()
 Returns the name of the current content block (depends on the kiosk mode setting) More...
 

Private Attributes

InterruptiveModal $finish_test_modal = null
 

Additional Inherited Members

- 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

Constructor & Destructor Documentation

◆ __construct()

ilTestSubmissionReviewGUI::__construct ( protected ilTestPlayerAbstractGUI  $test_player_gui,
ilObjTest  $testOBJ,
protected ilTestSession  $testSession 
)

Definition at line 36 of file class.ilTestSubmissionReviewGUI.php.

References ILIAS\GlobalScreen\Provider\__construct().

40  {
41  parent::__construct($testOBJ);
42  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildToolbar()

ilTestSubmissionReviewGUI::buildToolbar (   $toolbarId)
protected
Returns
ilToolbarGUI

Definition at line 90 of file class.ilTestSubmissionReviewGUI.php.

References ilTestServiceGUI\$toolbar, ilToolbarGUI\addComponent(), ilTestPlayerCommands\BACK_FROM_FINISHING, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), null, ILIAS\Repository\object(), ilTestPlayerCommands\QUESTION_SUMMARY, and ilToolbarGUI\setId().

Referenced by show().

90  : ilToolbarGUI
91  {
92  $toolbar = new ilToolbarGUI();
93  $toolbar->setId($toolbarId);
94 
95  $back_url = $this->ctrl->getLinkTarget(
96  $this->test_player_gui,
97  $this->object->getListOfQuestionsEnd() ?
99  );
100 
102  $this->ui_factory->button()->standard($this->lng->txt('tst_resume_test'), $back_url)
103  );
104 
105  if ($this->finish_test_modal === null) {
106  $class = get_class($this->test_player_gui);
107  $this->ctrl->setParameterByClass($class, 'reviewed', 1);
108  $this->finish_test_modal = $this->test_player_gui->buildFinishTestModal();
109  $this->ctrl->setParameterByClass($class, 'reviewed', 0);
110  }
111 
113  $this->ui_factory->button()->primary($this->lng->txt('finish_test'), $this->finish_test_modal->getShowSignal())
114  );
115 
116  return $toolbar;
117  }
addComponent(\ILIAS\UI\Component\Component $a_comp)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setId(string $a_val)
readonly ilToolbarGUI $toolbar
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildUserReviewOutput()

ilTestSubmissionReviewGUI::buildUserReviewOutput ( )
protected

Definition at line 119 of file class.ilTestSubmissionReviewGUI.php.

References $results, ilTestServiceGUI\buildQuestionRelatedObjectivesList(), ilLOTestQuestionAdapter\getInstance(), ilTestServiceGUI\getObjectiveOrientedContainer(), ILIAS\Repository\lng(), null, and ILIAS\Repository\object().

Referenced by show().

119  : string
120  {
121  $testResultHeaderLabelBuilder = new ResultsTitlesBuilder($this->lng, $this->obj_cache);
122 
123  $objectivesList = null;
124 
125  if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
126  $testSequence = $this->test_sequence_factory->getSequenceByActiveIdAndPass($this->testSession->getActiveId(), $this->testSession->getPass());
127  $testSequence->loadFromDb();
128  $testSequence->loadQuestions();
129 
130  $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($this->testSession);
131 
132  $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence);
133  $objectivesList->loadObjectivesTitles();
134 
135  $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($this->testSession->getObjectiveOrientedContainerId());
136  $testResultHeaderLabelBuilder->setUserId($this->testSession->getUserId());
137  $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
138  $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
139  $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
140  }
141 
142  $results = $this->object->getTestResult(
143  $this->testSession->getActiveId(),
144  $this->testSession->getPass(),
145  false,
146  !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()
147  );
148 
149  $testevaluationgui = new ilTestEvaluationGUI($this->object);
150  $testevaluationgui->setContextResultPresentation(false);
151 
152  $results_output = $testevaluationgui->getPassListOfAnswers(
153  $results,
154  $this->testSession->getActiveId(),
155  $this->testSession->getPass(),
156  false,
157  false,
158  false,
159  false,
160  false,
161  $objectivesList,
162  $testResultHeaderLabelBuilder
163  );
164 
165  return $results_output;
166  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getInstance(ilTestSession $a_test_session)
Output class for assessment test evaluation.
$results
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectives_adapter, ilTestQuestionSequence $test_sequence)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dispatchCommand()

ilTestSubmissionReviewGUI::dispatchCommand ( )
protected

Definition at line 59 of file class.ilTestSubmissionReviewGUI.php.

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

Referenced by executeCommand().

60  {
61  switch ($this->ctrl->getCmd()) {
62  case 'show':
63  default:
64 
65  $this->show();
66  }
67  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilTestSubmissionReviewGUI::executeCommand ( )

Definition at line 44 of file class.ilTestSubmissionReviewGUI.php.

References ILIAS\Repository\ctrl(), dispatchCommand(), and ILIAS\Repository\object().

44  : string
45  {
46  if (!$this->object->getEnableExamview()) {
47  return '';
48  }
49 
50  switch ($this->ctrl->getNextClass($this)) {
51  default:
52  $this->dispatchCommand();
53  break;
54  }
55 
56  return '';
57  }
+ Here is the call graph for this function:

◆ getContentBlockName()

ilTestSubmissionReviewGUI::getContentBlockName ( )
private

Returns the name of the current content block (depends on the kiosk mode setting)

Returns
string The name of the content block public

Definition at line 75 of file class.ilTestSubmissionReviewGUI.php.

References ILIAS\Repository\object().

Referenced by show().

75  : string
76  {
77  if ($this->object->getKioskMode()) {
78  // See: https://mantis.ilias.de/view.php?id=27784
79  //$this->tpl->setBodyClass("kiosk");
80  $this->tpl->hideFooter();
81  return "CONTENT";
82  } else {
83  return "ADM_CONTENT";
84  }
85  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ show()

ilTestSubmissionReviewGUI::show ( )
protected

Definition at line 168 of file class.ilTestSubmissionReviewGUI.php.

References buildToolbar(), buildUserReviewOutput(), getContentBlockName(), ILIAS\Repository\lng(), ilObjTest\lookupExamId(), ILIAS\Repository\object(), and ilTestPlayerLayoutProvider\TEST_PLAYER_VIEW_TITLE.

Referenced by dispatchCommand().

169  {
170  $this->global_screen->tool()->context()->current()->getAdditionalData()->replace(
172  $this->object->getTitle() . ' - ' . $this->lng->txt('tst_results_overview')
173  );
174 
175  $html = $this->buildToolbar('review_nav_top')->getHTML();
176  $html .= $this->buildUserReviewOutput() . '<br />';
177  $html .= $this->buildToolbar('review_nav_bottom')->getHTML();
178 
179  if ($this->object->isShowExamIdInTestPassEnabled() && !$this->object->getKioskMode()) {
180  $examIdTpl = new ilTemplate("tpl.exam_id_block.html", true, true, 'components/ILIAS/Test');
181  $examIdTpl->setVariable('EXAM_ID_VAL', ilObjTest::lookupExamId(
182  $this->testSession->getActiveId(),
183  $this->testSession->getPass(),
184  $this->object->getId()
185  ));
186  $examIdTpl->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
187  $html .= $examIdTpl->get();
188  }
189 
190  $html .= $this->ui_renderer->render($this->finish_test_modal);
191 
192  $this->tpl->setVariable(
193  $this->getContentBlockName(),
194  $html
195  );
196  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
static lookupExamId($active_id, $pass)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $finish_test_modal

InterruptiveModal ilTestSubmissionReviewGUI::$finish_test_modal = null
private

Definition at line 34 of file class.ilTestSubmissionReviewGUI.php.


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