ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables 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 ($contextResultPresentation)
 
 __construct (ilObjTest $a_object)
 The constructor takes the test object reference as parameter. More...
 
 setParticipantData ($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 $objectiveOrientedContainer)
 
 getObjectiveOrientedContainer ()
 
 executeCommand ()
 execute command More...
 
 getCommand ($cmd)
 Retrieves the ilCtrl command. More...
 
 buildPassOverviewTableGUI ($targetGUI)
 
 getPassListOfAnswers (&$result_array, $active_id, $pass, $show_solutions=false, $only_answered_questions=false, $show_question_only=false, $show_reached_points=false, $anchorNav=false, ilTestQuestionRelatedObjectivesList $objectivesList=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 $objectivesList=null)
 Returns an output of the solution to an answer compared to the correct solution. More...
 
 getResultsOfUserOutput ($testSession, $active_id, $pass, $targetGUI, $show_pass_details=true, $show_answers=true, $show_question_only=false, $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 ($question_id, $test_id)
 Creates a HTML representation for the results of a given question in a test. More...
 
 populatePassFinishDate ($tpl, $passFinishDate)
 
 populateExamId (ilTemplate $tpl, int $activeId, int $pass)
 
 getObject ()
 

Private Member Functions

 showVirtualPassCmd ()
 

Additional Inherited Members

- Data Fields inherited from ilTestServiceGUI
 $object = null
 
 $service = null
 
 $lng
 
 $tpl
 
 $ctrl
 
 $ilias
 
 $tree
 
 $ref_id
 
- Protected Member Functions inherited from ilTestServiceGUI
 isPdfDeliveryRequest ()
 
 buildQuestionAnswerShuffler (int $question_id, int $active_id, int $pass_id)
 
 buildFixedShufflerSeed (int $question_id, int $pass_id, int $active_id)
 
 getPassDetailsOverviewTableGUI ( $result_array, $active_id, $pass, $targetGUI, $targetCMD, $questionDetailsCMD, $questionAnchorNav, ilTestQuestionRelatedObjectivesList $objectivesList=null, $multipleObjectivesInvolved=true)
 
 buildPassDetailsOverviewTableGUI ($targetGUI, $targetCMD)
 
 isGradingMessageRequired ()
 
 getGradingMessageBuilder ($activeId)
 
 buildQuestionRelatedObjectivesList (ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
 
 getFilteredTestResult ($active_id, $pass, $considerHiddenQuestions, $considerOptionalQuestions)
 
 populateContent ($content)
 
 buildUserTestResultsToolbarGUI ()
 
 outCorrectSolutionCmd ()
 
 outCorrectSolution ()
 Creates an output of the solution of an answer compared to the correct solution. More...
 
- Protected Attributes inherited from ilTestServiceGUI
ILIAS Test InternalRequestService $testrequest
 
 $db
 
Refinery $refinery
 
 $tabs
 
 $objCache
 
 $testSessionFactory = null
 
 $testSequenceFactory = null
 
 $participantData
 

Detailed Description

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

Member Function Documentation

◆ executeCommand()

ilTestEvalObjectiveOrientedGUI::executeCommand ( )

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

References ILIAS\Repository\ctrl().

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

◆ showVirtualPassCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassCmd ( )
private

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

References ilTestServiceGUI\$tpl, ilTestServiceGUI\buildQuestionRelatedObjectivesList(), ilTestServiceGUI\buildUserTestResultsToolbarGUI(), ILIAS\Repository\ctrl(), ilLOTestQuestionAdapter\getInstance(), ilTestServiceGUI\getObjectiveOrientedContainer(), ilTestServiceGUI\getPassDetailsOverviewTableGUI(), ilTestServiceGUI\getPassListOfAnswers(), ilTestServiceGUI\isPdfDeliveryRequest(), ILIAS\Repository\lng(), ILIAS\Repository\object(), PDF_USER_RESULT, ilTestServiceGUI\populateContent(), and ilPDFGeneratorUtils\prepareGenerationRequest().

Referenced by showVirtualPassResetTableFilterCmd(), and showVirtualPassSetTableFilterCmd().

67  {
68  $testSession = $this->testSessionFactory->getSession();
69 
70  if (!$this->object->getShowPassDetails()) {
71  $executable = $this->object->isExecutable($testSession, $testSession->getUserId());
72 
73  if ($executable["executable"]) {
74  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
75  }
76  }
77 
78  // prepare generation before contents are processed (for mathjax)
79  if ($this->isPdfDeliveryRequest()) {
81  }
82 
83  $toolbar = $this->buildUserTestResultsToolbarGUI();
84  $this->ctrl->setParameter($this, 'pdf', '1');
85  $toolbar->setPdfExportLinkTarget($this->ctrl->getLinkTarget($this, 'showVirtualPass'));
86  $this->ctrl->setParameter($this, 'pdf', '');
87  $toolbar->build();
88 
89  $virtualSequence = $this->service->buildVirtualSequence($testSession);
90  $userResults = $this->service->getVirtualSequenceUserResults($virtualSequence);
91 
92  require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
93  $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
94 
95  $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $virtualSequence);
96  $objectivesList->loadObjectivesTitles();
97 
98  require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
99  $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $this->objCache);
100 
101  $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
102  $testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
103  $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
104  $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
105  $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
106 
107  $tpl = new ilTemplate('tpl.il_as_tst_virtual_pass_details.html', false, false, 'Modules/Test');
108 
109  $command_solution_details = "";
110  if ($this->object->getShowSolutionDetails()) {
111  $command_solution_details = "outCorrectSolution";
112  }
113 
114  $questionAnchorNav = $listOfAnswers = $this->object->canShowSolutionPrintview();
115 
116  if ($listOfAnswers) {
117  $list_of_answers = $this->getPassListOfAnswers(
118  $userResults,
119  $testSession->getActiveId(),
120  null,
121  $this->object->getShowSolutionListComparison(),
122  false,
123  false,
124  false,
125  true,
126  $objectivesList,
127  $testResultHeaderLabelBuilder
128  );
129  $tpl->setVariable("LIST_OF_ANSWERS", $list_of_answers);
130  }
131 
132  foreach ($objectivesList->getObjectives() as $loId => $loTitle) {
133  $userResultsForLO = $objectivesList->filterResultsByObjective($userResults, $loId);
134 
135  $overviewTableGUI = $this->getPassDetailsOverviewTableGUI(
136  $userResultsForLO,
137  $testSession->getActiveId(),
138  null,
139  $this,
140  "showVirtualPass",
141  $command_solution_details,
142  $questionAnchorNav,
143  $objectivesList,
144  false
145  );
146  $overviewTableGUI->setTitle(
147  $testResultHeaderLabelBuilder->getVirtualPassDetailsHeaderLabel(
148  $objectivesList->getObjectiveTitleById($loId)
149  )
150  );
151 
152  require_once 'Modules/Test/classes/class.ilTestLearningObjectivesStatusGUI.php';
153  $loStatus = new ilTestLearningObjectivesStatusGUI($this->lng);
154  $loStatus->setCrsObjId($this->getObjectiveOrientedContainer()->getObjId());
155  $loStatus->setUsrId($testSession->getUserId());
156  $lostatus = $loStatus->getHTML($loId);
157 
158  $tpl->setCurrentBlock('pass_details');
159  $tpl->setVariable("PASS_DETAILS", $overviewTableGUI->getHTML());
160  $tpl->setVariable("LO_STATUS", $lostatus);
161  $tpl->parseCurrentBlock();
162  }
163 
164  $this->populateContent($this->ctrl->getHTML($toolbar) . $tpl->get());
165  }
const PDF_USER_RESULT
PDF Purposes.
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
static getInstance(ilTestSession $a_test_session)
static prepareGenerationRequest(string $service, string $purpose)
Prepare the content processing for a PDF generation request This function should be called as in a re...
getPassDetailsOverviewTableGUI( $result_array, $active_id, $pass, $targetGUI, $targetCMD, $questionDetailsCMD, $questionAnchorNav, ilTestQuestionRelatedObjectivesList $objectivesList=null, $multipleObjectivesInvolved=true)
getPassListOfAnswers(&$result_array, $active_id, $pass, $show_solutions=false, $only_answered_questions=false, $show_question_only=false, $show_reached_points=false, $anchorNav=false, ilTestQuestionRelatedObjectivesList $objectivesList=null, ilTestResultHeaderLabelBuilder $testResultHeaderLabelBuilder=null)
Returns the list of answers of a users test pass.
+ 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->initFilter();
61  $tableGUI->resetOffset();
62  $tableGUI->resetFilter();
63  $this->showVirtualPassCmd();
64  }
buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD)
+ Here is the call graph for this function:

◆ showVirtualPassSetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassSetTableFilterCmd ( )

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

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

49  {
50  $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
51  $tableGUI->initFilter();
52  $tableGUI->resetOffset();
53  $tableGUI->writeFilterToSession();
54  $this->showVirtualPassCmd();
55  }
buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD)
+ Here is the call graph for this function:

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