ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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)
 
 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)
 

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 ()
 
 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
 $db
 
 $tabs
 
 $objCache
 
 $testSessionFactory = null
 
 $testSequenceFactory = null
 
 $participantData
 

Detailed Description

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

Member Function Documentation

◆ executeCommand()

ilTestEvalObjectiveOrientedGUI::executeCommand ( )

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

18  {
19  $this->ctrl->saveParameter($this, "active_id");
20 
21  switch ($this->ctrl->getNextClass($this)) {
22  case 'ilassquestionpagegui':
23  require_once 'Modules/Test/classes/class.ilAssQuestionPageCommandForwarder.php';
24  $forwarder = new ilAssQuestionPageCommandForwarder();
25  $forwarder->setTestObj($this->object);
26  $forwarder->forward();
27  break;
28 
29  default:
30  $cmd = $this->ctrl->getCmd('showVirtualPass') . 'Cmd';
31  $this->$cmd();
32  }
33  }

◆ showVirtualPassCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassCmd ( )
private

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

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

Referenced by showVirtualPassResetTableFilterCmd(), and showVirtualPassSetTableFilterCmd().

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

◆ showVirtualPassResetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassResetTableFilterCmd ( )

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

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

45  {
46  $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
47  $tableGUI->initFilter();
48  $tableGUI->resetOffset();
49  $tableGUI->resetFilter();
50  $this->showVirtualPassCmd();
51  }
buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD)
+ Here is the call graph for this function:

◆ showVirtualPassSetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassSetTableFilterCmd ( )

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

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

36  {
37  $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
38  $tableGUI->initFilter();
39  $tableGUI->resetOffset();
40  $tableGUI->writeFilterToSession();
41  $this->showVirtualPassCmd();
42  }
buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD)
+ Here is the call graph for this function:

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