ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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)
 
 ilTestServiceGUI (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)
 
 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(), and ilTestServiceGUI\populateContent().

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  $toolbar = $this->buildUserTestResultsToolbarGUI();
67  $this->ctrl->setParameter($this, 'pdf', '1');
68  $toolbar->setPdfExportLinkTarget( $this->ctrl->getLinkTarget($this, 'showVirtualPass') );
69  $this->ctrl->setParameter($this, 'pdf', '');
70  $toolbar->build();
71 
72  $virtualSequence = $this->service->buildVirtualSequence($testSession);
73  $userResults = $this->service->getVirtualSequenceUserResults($virtualSequence);
74 
75  require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
76  $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
77 
78  $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $virtualSequence);
79  $objectivesList->loadObjectivesTitles();
80 
81  require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
82  $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $this->objCache);
83 
84  $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
85  $testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
86  $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
87  $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
88  $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
89 
90  $tpl = new ilTemplate('tpl.il_as_tst_virtual_pass_details.html', false, false, 'Modules/Test');
91 
92  $command_solution_details = "";
93  if ($this->object->getShowSolutionDetails())
94  {
95  $command_solution_details = "outCorrectSolution";
96  }
97 
98  $questionAnchorNav = $listOfAnswers = $this->object->canShowSolutionPrintview();
99 
100  if( $listOfAnswers )
101  {
102  $list_of_answers = $this->getPassListOfAnswers(
103  $userResults, $testSession->getActiveId(), null, $this->object->getShowSolutionListComparison(),
104  false, false, false, true, $objectivesList, $testResultHeaderLabelBuilder
105  );
106  $tpl->setVariable("LIST_OF_ANSWERS", $list_of_answers);
107  }
108 
109  foreach($objectivesList->getObjectives() as $loId => $loTitle)
110  {
111  $userResultsForLO = $objectivesList->filterResultsByObjective($userResults, $loId);
112 
113  $overviewTableGUI = $this->getPassDetailsOverviewTableGUI(
114  $userResultsForLO, $testSession->getActiveId(), null, $this, "showVirtualPass",
115  $command_solution_details, $questionAnchorNav, $objectivesList
116  );
117  $overviewTableGUI->setTitle($testResultHeaderLabelBuilder->getVirtualPassDetailsHeaderLabel(
118  $objectivesList->getObjectiveTitleById($loId)
119  ));
120  $overviewTableGUI->setMultipleObjectivesInvolved(false);
121 
122  require_once 'Modules/Test/classes/class.ilTestLearningObjectivesStatusGUI.php';
123  $loStatus = new ilTestLearningObjectivesStatusGUI($this->lng);
124  $loStatus->setCrsObjId($this->getObjectiveOrientedContainer()->getObjId());
125  $loStatus->setUsrId($testSession->getUserId());
126  $lostatus = $loStatus->getHTML($loId);
127 
128  $tpl->setCurrentBlock('pass_details');
129  $tpl->setVariable("PASS_DETAILS", $overviewTableGUI->getHTML());
130  $tpl->setVariable("LO_STATUS", $lostatus);
131  $tpl->parseCurrentBlock();
132  }
133 
134  $this->populateContent($this->ctrl->getHTML($toolbar).$tpl->get());
135  }
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)
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
static getInstance(ilTestSession $a_test_session)
special template class to simplify handling of ITX/PEAR
+ 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: