ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTestEvalObjectiveOrientedGUI Class Reference
+ Inheritance diagram for ilTestEvalObjectiveOrientedGUI:
+ Collaboration diagram for ilTestEvalObjectiveOrientedGUI:

Public Member Functions

 executeCommand ()
 execute command More...
 
 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, $targetCmd='')
 
 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)
 

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
 handleTabs ($activeTabId)
 
 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 14 of file class.ilTestEvalObjectiveOrientedGUI.php.

Member Function Documentation

◆ executeCommand()

ilTestEvalObjectiveOrientedGUI::executeCommand ( )

execute command

Reimplemented from ilTestServiceGUI.

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

17 {
18 $this->ctrl->saveParameter($this, "active_id");
19
20 switch ($this->ctrl->getNextClass($this)) {
21 default:
22 $this->handleTabs('results_objective_oriented');
23 $cmd = $this->ctrl->getCmd() . 'Cmd';
24 $this->$cmd();
25 }
26 }

References ilTestServiceGUI\handleTabs().

+ Here is the call graph for this function:

◆ showVirtualPassCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassCmd ( )
private

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

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

References ilTestServiceGUI\$tpl, ilTestServiceGUI\buildQuestionRelatedObjectivesList(), ilTestServiceGUI\buildUserTestResultsToolbarGUI(), ilLOTestQuestionAdapter\getInstance(), ilTestServiceGUI\getObjectiveOrientedContainer(), ilTestServiceGUI\getPassDetailsOverviewTableGUI(), ilTestServiceGUI\getPassListOfAnswers(), ilTestServiceGUI\isPdfDeliveryRequest(), ilTestServiceGUI\populateContent(), and ilPDFGeneration\prepareGeneration().

Referenced by showVirtualPassResetTableFilterCmd(), and showVirtualPassSetTableFilterCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showVirtualPassResetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassResetTableFilterCmd ( )

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

38 {
39 $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
40 $tableGUI->initFilter();
41 $tableGUI->resetOffset();
42 $tableGUI->resetFilter();
43 $this->showVirtualPassCmd();
44 }
buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD)

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

+ Here is the call graph for this function:

◆ showVirtualPassSetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassSetTableFilterCmd ( )

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

29 {
30 $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
31 $tableGUI->initFilter();
32 $tableGUI->resetOffset();
33 $tableGUI->writeFilterToSession();
34 $this->showVirtualPassCmd();
35 }

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

+ Here is the call graph for this function:

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