ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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, $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 ( )

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

References $cmd, and ilTestServiceGUI\handleTabs().

17  {
18  $this->ctrl->saveParameter($this, "active_id");
19 
20  switch( $this->ctrl->getNextClass($this) )
21  {
22  default:
23  $this->handleTabs('results_objective_oriented');
24  $cmd = $this->ctrl->getCmd().'Cmd';
25  $this->$cmd();
26  }
27  }
$cmd
Definition: sahs_server.php:35
+ Here is the call graph for this function:

◆ showVirtualPassCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassCmd ( )
private

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

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

Referenced by showVirtualPassResetTableFilterCmd(), and showVirtualPassSetTableFilterCmd().

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

◆ showVirtualPassResetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassResetTableFilterCmd ( )

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

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

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

◆ showVirtualPassSetTableFilterCmd()

ilTestEvalObjectiveOrientedGUI::showVirtualPassSetTableFilterCmd ( )

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

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

30  {
31  $tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'showVirtualPass');
32  $tableGUI->initFilter();
33  $tableGUI->resetOffset();
34  $tableGUI->writeFilterToSession();
35  $this->showVirtualPassCmd();
36  }
buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD)
+ Here is the call graph for this function:

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