ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilParticipantsTestResultsGUI Class Reference
+ Collaboration diagram for ilParticipantsTestResultsGUI:

Public Member Functions

 getTestObj ()
 
 setTestObj ($testObj)
 
 getQuestionSetConfig ()
 
 setQuestionSetConfig ($questionSetConfig)
 
 getTestAccess ()
 
 setTestAccess ($testAccess)
 
 getObjectiveParent ()
 
 setObjectiveParent ($objectiveParent)
 
 executeCommand ()
 Execute Command. More...
 
 createUserResults ($show_pass_details, $show_answers, $show_reached_points, $show_user_results)
 

Data Fields

const CMD_SHOW_PARTICIPANTS = 'showParticipants'
 
const CMD_CONFIRM_DELETE_ALL_USER_RESULTS = 'deleteAllUserResults'
 
const CMD_PERFORM_DELETE_ALL_USER_RESULTS = 'confirmDeleteAllUserResults'
 
const CMD_CONFIRM_DELETE_SELECTED_USER_RESULTS = 'deleteSingleUserResults'
 
const CMD_PERFORM_DELETE_SELECTED_USER_RESULTS = 'confirmDeleteSelectedUserData'
 

Protected Member Functions

 buildTableGUI ()
 
 showParticipantsCmd ()
 show participants command More...
 
 addDeleteAllTestResultsButton (ilToolbarGUI $toolbar)
 
 deleteAllUserResultsCmd ()
 Asks for a confirmation to delete all user data of the test object. More...
 
 confirmDeleteAllUserResultsCmd ()
 Deletes all user data for the test object. More...
 
 deleteSingleUserResultsCmd ()
 Asks for a confirmation to delete selected user data of the test object. More...
 
 confirmDeleteSelectedUserDataCmd ()
 Deletes the selected user data for the test object. More...
 
 showDetailedResultsCmd ()
 Shows the pass overview and the answers of one ore more users for the scored pass. More...
 
 showUserAnswersCmd ()
 Shows the answers of one ore more users for the scored pass. More...
 
 showPassOverviewCmd ()
 Shows the pass overview of the scored pass for one ore more users. More...
 
 showUserResults ($show_pass_details, $show_answers, $show_reached_points=false)
 Shows the pass overview of the scored pass for one ore more users. More...
 
 isPdfDeliveryRequest ()
 

Protected Attributes

 $testObj
 
 $questionSetConfig
 
 $testAccess
 
 $objectiveParent
 

Detailed Description

Definition at line 18 of file class.ilParticipantsTestResultsGUI.php.

Member Function Documentation

◆ addDeleteAllTestResultsButton()

ilParticipantsTestResultsGUI::addDeleteAllTestResultsButton ( ilToolbarGUI  $toolbar)
protected
Parameters
ilToolbarGUI$toolbar

Definition at line 210 of file class.ilParticipantsTestResultsGUI.php.

References $DIC, ilToolbarGUI\addButtonInstance(), and ilLinkButton\getInstance().

Referenced by showParticipantsCmd().

211  {
212  global $DIC; /* @var ILIAS\DI\Container $DIC */
213 
214  require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
215  $delete_all_results_btn = ilLinkButton::getInstance();
216  $delete_all_results_btn->setCaption('delete_all_user_data');
217  $delete_all_results_btn->setUrl($DIC->ctrl()->getLinkTarget($this, 'deleteAllUserResults'));
218  $toolbar->addButtonInstance($delete_all_results_btn);
219  }
global $DIC
Definition: saml.php:7
addButtonInstance(ilButtonBase $a_button)
Add button instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTableGUI()

ilParticipantsTestResultsGUI::buildTableGUI ( )
protected
Returns
ilParticipantsTestResultsTableGUI

Definition at line 145 of file class.ilParticipantsTestResultsGUI.php.

References $DIC.

Referenced by showParticipantsCmd().

146  {
147  global $DIC; /* @var ILIAS\DI\Container $DIC */
148  require_once 'Modules/Test/classes/tables/class.ilParticipantsTestResultsTableGUI.php';
149  $tableGUI = new ilParticipantsTestResultsTableGUI($this, self::CMD_SHOW_PARTICIPANTS);
150  $tableGUI->setTitle($DIC->language()->txt('tst_tbl_results_grades'));
151  return $tableGUI;
152  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ confirmDeleteAllUserResultsCmd()

ilParticipantsTestResultsGUI::confirmDeleteAllUserResultsCmd ( )
protected

Deletes all user data for the test object.

Definition at line 242 of file class.ilParticipantsTestResultsGUI.php.

References $DIC, ilTestParticipantAccessFilter\getManageParticipantsUserFilter(), getTestObj(), and ilTestParticipantData\setParticipantAccessFilter().

243  {
244  global $DIC; /* @var ILIAS\DI\Container $DIC */
245 
246  require_once 'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
248  $this->getTestObj()->getRefId()
249  );
250 
251  require_once 'Modules/Test/classes/class.ilTestParticipantData.php';
252  $participantData = new ilTestParticipantData($DIC->database(), $DIC->language());
253  //$participantData->setScoredParticipantsFilterEnabled(!$this->getTestObj()->isDynamicTest());
254  $participantData->setParticipantAccessFilter($accessFilter);
255  $participantData->load($this->getTestObj()->getTestId());
256 
257  $this->getTestObj()->removeTestResults($participantData);
258 
259  ilUtil::sendSuccess($DIC->language()->txt("tst_all_user_data_deleted"), true);
260  $DIC->ctrl()->redirect($this, self::CMD_SHOW_PARTICIPANTS);
261  }
global $DIC
Definition: saml.php:7
setParticipantAccessFilter($participantAccessFilter)
+ Here is the call graph for this function:

◆ confirmDeleteSelectedUserDataCmd()

ilParticipantsTestResultsGUI::confirmDeleteSelectedUserDataCmd ( )
protected

Deletes the selected user data for the test object.

Definition at line 317 of file class.ilParticipantsTestResultsGUI.php.

References $_POST, $DIC, ilTestParticipantAccessFilter\getManageParticipantsUserFilter(), getTestObj(), and ilTestParticipantData\setParticipantAccessFilter().

318  {
319  global $DIC; /* @var ILIAS\DI\Container $DIC */
320 
321  if (isset($_POST["chbUser"]) && is_array($_POST["chbUser"]) && count($_POST["chbUser"])) {
322  require_once 'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
324 
325  require_once 'Modules/Test/classes/class.ilTestParticipantData.php';
326  $participantData = new ilTestParticipantData($DIC->database(), $DIC->language());
327  //$participantData->setScoredParticipantsFilterEnabled(!$this->getTestObj()->isDynamicTest());
328  $participantData->setParticipantAccessFilter($accessFilter);
329  $participantData->setActiveIdsFilter($_POST["chbUser"]);
330 
331  $participantData->load($this->getTestObj()->getTestId());
332 
333  $this->getTestObj()->removeTestResults($participantData);
334 
335  ilUtil::sendSuccess($DIC->language()->txt("tst_selected_user_data_deleted"), true);
336  }
337 
338  $DIC->ctrl()->redirect($this, self::CMD_SHOW_PARTICIPANTS);
339  }
global $DIC
Definition: saml.php:7
setParticipantAccessFilter($participantAccessFilter)
$_POST["username"]
+ Here is the call graph for this function:

◆ createUserResults()

ilParticipantsTestResultsGUI::createUserResults (   $show_pass_details,
  $show_answers,
  $show_reached_points,
  $show_user_results 
)
Parameters
$show_pass_details
$show_answers
$show_reached_points
$show_user_results
Returns
ilTemplate

Definition at line 413 of file class.ilParticipantsTestResultsGUI.php.

References $_GET, $_SESSION, $DIC, $key, $results, $template, ilLink\_getLink(), ilTestPDFGenerator\generatePDF(), ilTestParticipantAccessFilter\getAccessResultsUserFilter(), getObjectiveParent(), getTestObj(), isPdfDeliveryRequest(), ilTestPDFGenerator\PDF_OUTPUT_DOWNLOAD, PDF_USER_RESULT, ilPDFGeneratorUtils\prepareGenerationRequest(), ilTestParticipantData\setParticipantAccessFilter(), and ilTestResultsToolbarGUI\setPdfExportLinkTarget().

Referenced by showUserResults().

414  {
415  global $DIC; /* @var ILIAS\DI\Container $DIC */
416 
417  // prepare generation before contents are processed (needed for mathjax)
418  if ($this->isPdfDeliveryRequest()) {
420  }
421 
422  $DIC->tabs()->setBackTarget(
423  $DIC->language()->txt('back'),
424  $DIC->ctrl()->getLinkTarget($this, self::CMD_SHOW_PARTICIPANTS)
425  );
426 
427  if ($this->getObjectiveParent()->isObjectiveOrientedPresentationRequired()) {
428  require_once 'Services/Link/classes/class.ilLink.php';
429  $courseLink = ilLink::_getLink($this->getObjectiveParent()->getRefId());
430  $DIC->tabs()->setBack2Target($DIC->language()->txt('back_to_objective_container'), $courseLink);
431  }
432 
433  $template = new ilTemplate("tpl.il_as_tst_participants_result_output.html", true, true, "Modules/Test");
434 
435  require_once 'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
436  $toolbar = new ilTestResultsToolbarGUI($DIC->ctrl(), $DIC->ui()->mainTemplate(), $DIC->language());
437 
438  $DIC->ctrl()->setParameter($this, 'pdf', '1');
439  $toolbar->setPdfExportLinkTarget($DIC->ctrl()->getLinkTarget($this, $DIC->ctrl()->getCmd()));
440  $DIC->ctrl()->setParameter($this, 'pdf', '');
441 
442  if ($show_answers) {
443  if (isset($_GET['show_best_solutions'])) {
444  $_SESSION['tst_results_show_best_solutions'] = true;
445  } elseif (isset($_GET['hide_best_solutions'])) {
446  $_SESSION['tst_results_show_best_solutions'] = false;
447  } elseif (!isset($_SESSION['tst_results_show_best_solutions'])) {
448  $_SESSION['tst_results_show_best_solutions'] = false;
449  }
450 
451  if ($_SESSION['tst_results_show_best_solutions']) {
452  $DIC->ctrl()->setParameter($this, 'hide_best_solutions', '1');
453  $toolbar->setHideBestSolutionsLinkTarget($DIC->ctrl()->getLinkTarget($this, $DIC->ctrl()->getCmd()));
454  $DIC->ctrl()->setParameter($this, 'hide_best_solutions', '');
455  } else {
456  $DIC->ctrl()->setParameter($this, 'show_best_solutions', '1');
457  $toolbar->setShowBestSolutionsLinkTarget($DIC->ctrl()->getLinkTarget($this, $DIC->ctrl()->getCmd()));
458  $DIC->ctrl()->setParameterByClass('', 'show_best_solutions', '');
459  }
460  }
461 
462  require_once 'Modules/Test/classes/class.ilTestParticipantData.php';
463  require_once 'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
464 
465  $participantData = new ilTestParticipantData($DIC->database(), $DIC->language());
466 
467  $participantData->setParticipantAccessFilter(
469  );
470 
471  $participantData->setActiveIdsFilter($show_user_results);
472 
473  $participantData->load($this->getTestObj()->getTestId());
474  $toolbar->setParticipantSelectorOptions($participantData->getOptionArray());
475 
476  $toolbar->build();
477  $template->setVariable('RESULTS_TOOLBAR', $toolbar->getHTML());
478 
479  include_once "./Modules/Test/classes/class.ilTestServiceGUI.php";
480  $serviceGUI = new ilTestServiceGUI($this->getTestObj());
481  $serviceGUI->setObjectiveOrientedContainer($this->getObjectiveParent());
482  $serviceGUI->setParticipantData($participantData);
483 
484  require_once 'Modules/Test/classes/class.ilTestSessionFactory.php';
485  $testSessionFactory = new ilTestSessionFactory($this->getTestObj());
486 
487  $count = 0;
488  foreach ($show_user_results as $key => $active_id) {
489  if (!in_array($active_id, $participantData->getActiveIds())) {
490  continue;
491  }
492 
493  $count++;
494  $results = "";
495  if ($active_id > 0) {
496  $results = $serviceGUI->getResultsOfUserOutput(
497  $testSessionFactory->getSession($active_id),
498  $active_id,
499  $this->getTestObj()->_getResultPass($active_id),
500  $this,
501  $show_pass_details,
502  $show_answers,
503  false,
504  $show_reached_points
505  );
506  }
507  if ($count < count($show_user_results)) {
508  $template->touchBlock("break");
509  }
510  $template->setCurrentBlock("user_result");
511  $template->setVariable("USER_RESULT", $results);
512  $template->parseCurrentBlock();
513  }
514 
515  if ($this->isPdfDeliveryRequest()) {
516  require_once 'Modules/Test/classes/class.ilTestPDFGenerator.php';
517 
519  $template->get(),
521  $this->getTestObj()->getTitleFilenameCompliant(),
523  );
524  } else {
525  return $template;
526  }
527  }
$_SESSION["AccountId"]
$template
global $DIC
Definition: saml.php:7
$_GET["client_id"]
const PDF_USER_RESULT
PDF Purposes.
setParticipantAccessFilter($participantAccessFilter)
special template class to simplify handling of ITX/PEAR
$results
Definition: svg-scanner.php:47
Service GUI class for tests.
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
setPdfExportLinkTarget($pdfExportLinkTarget)
$key
Definition: croninfo.php:18
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:

◆ deleteAllUserResultsCmd()

ilParticipantsTestResultsGUI::deleteAllUserResultsCmd ( )
protected

Asks for a confirmation to delete all user data of the test object.

Definition at line 224 of file class.ilParticipantsTestResultsGUI.php.

References $DIC.

225  {
226  global $DIC; /* @var ILIAS\DI\Container $DIC */
227 
228  // display confirmation message
229  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
230  $cgui = new ilConfirmationGUI();
231  $cgui->setFormAction($DIC->ctrl()->getFormAction($this));
232  $cgui->setHeaderText($DIC->language()->txt("delete_all_user_data_confirmation"));
233  $cgui->setCancel($DIC->language()->txt("cancel"), self::CMD_SHOW_PARTICIPANTS);
234  $cgui->setConfirm($DIC->language()->txt("proceed"), self::CMD_PERFORM_DELETE_ALL_USER_RESULTS);
235 
236  $DIC->ui()->mainTemplate()->setContent($cgui->getHTML());
237  }
global $DIC
Definition: saml.php:7
Confirmation screen class.

◆ deleteSingleUserResultsCmd()

ilParticipantsTestResultsGUI::deleteSingleUserResultsCmd ( )
protected

Asks for a confirmation to delete selected user data of the test object.

Definition at line 266 of file class.ilParticipantsTestResultsGUI.php.

References $_POST, $DIC, ilUtil\getImagePath(), ilTestParticipantAccessFilter\getManageParticipantsUserFilter(), getTestObj(), ilUtil\sendInfo(), and ilTestParticipantData\setParticipantAccessFilter().

267  {
268  global $DIC; /* @var ILIAS\DI\Container $DIC */
269 
270  if (!is_array($_POST["chbUser"]) || count($_POST["chbUser"]) == 0) {
271  ilUtil::sendInfo($DIC->language()->txt("select_one_user"), true);
272  $DIC->ctrl()->redirect($this);
273  }
274 
275  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
276  $cgui = new ilConfirmationGUI();
277  $cgui->setHeaderText($DIC->language()->txt("confirm_delete_single_user_data"));
278 
279  $cgui->setFormAction($DIC->ctrl()->getFormAction($this));
280  $cgui->setCancel($DIC->language()->txt("cancel"), self::CMD_SHOW_PARTICIPANTS);
281  $cgui->setConfirm($DIC->language()->txt("confirm"), self::CMD_PERFORM_DELETE_SELECTED_USER_RESULTS);
282 
283  require_once 'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
285 
286  require_once 'Modules/Test/classes/class.ilTestParticipantData.php';
287  $participantData = new ilTestParticipantData($DIC->database(), $DIC->language());
288  //$participantData->setScoredParticipantsFilterEnabled(!$this->getTestObj()->isDynamicTest());
289  $participantData->setParticipantAccessFilter($accessFilter);
290 
291  $participantData->setActiveIdsFilter((array) $_POST["chbUser"]);
292 
293  $participantData->load($this->getTestObj()->getTestId());
294 
295  foreach ($participantData->getActiveIds() as $activeId) {
296  if ($this->testObj->getAnonymity()) {
297  $username = $DIC->language()->txt('anonymous');
298  } else {
299  $username = $participantData->getFormatedFullnameByActiveId($activeId);
300  }
301 
302  $cgui->addItem(
303  "chbUser[]",
304  $activeId,
305  $username,
306  ilUtil::getImagePath("icon_usr.svg"),
307  $DIC->language()->txt("usr")
308  );
309  }
310 
311  $DIC->ui()->mainTemplate()->setContent($cgui->getHTML());
312  }
global $DIC
Definition: saml.php:7
setParticipantAccessFilter($participantAccessFilter)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ executeCommand()

ilParticipantsTestResultsGUI::executeCommand ( )

Execute Command.

Definition at line 113 of file class.ilParticipantsTestResultsGUI.php.

References $DIC, getObjectiveParent(), getTestAccess(), and getTestObj().

114  {
115  global $DIC; /* @var ILIAS\DI\Container $DIC */
116 
117  switch ($DIC->ctrl()->getNextClass($this)) {
118  case "iltestevaluationgui":
119  require_once 'Modules/Test/classes/class.ilTestEvaluationGUI.php';
120  $gui = new ilTestEvaluationGUI($this->getTestObj());
121  $gui->setObjectiveOrientedContainer($this->getObjectiveParent());
122  $gui->setTestAccess($this->getTestAccess());
123  $DIC->tabs()->clearTargets();
124  $DIC->tabs()->clearSubTabs();
125  $DIC->ctrl()->forwardCommand($gui);
126  break;
127 
128  case 'ilassquestionpagegui':
129  require_once 'Modules/Test/classes/class.ilAssQuestionPageCommandForwarder.php';
130  $forwarder = new ilAssQuestionPageCommandForwarder();
131  $forwarder->setTestObj($this->getTestObj());
132  $forwarder->forward();
133  break;
134 
135  default:
136 
137  $command = $DIC->ctrl()->getCmd(self::CMD_SHOW_PARTICIPANTS) . 'Cmd';
138  $this->{$command}();
139  }
140  }
global $DIC
Definition: saml.php:7
Output class for assessment test evaluation.
+ Here is the call graph for this function:

◆ getObjectiveParent()

ilParticipantsTestResultsGUI::getObjectiveParent ( )
Returns
ilTestObjectiveOrientedContainer

Definition at line 97 of file class.ilParticipantsTestResultsGUI.php.

References $objectiveParent.

Referenced by createUserResults(), and executeCommand().

+ Here is the caller graph for this function:

◆ getQuestionSetConfig()

ilParticipantsTestResultsGUI::getQuestionSetConfig ( )
Returns
ilTestQuestionSetConfig

Definition at line 65 of file class.ilParticipantsTestResultsGUI.php.

References $questionSetConfig.

Referenced by showParticipantsCmd().

+ Here is the caller graph for this function:

◆ getTestAccess()

ilParticipantsTestResultsGUI::getTestAccess ( )
Returns
ilTestAccess

Definition at line 81 of file class.ilParticipantsTestResultsGUI.php.

References $testAccess.

Referenced by executeCommand(), and showParticipantsCmd().

+ Here is the caller graph for this function:

◆ getTestObj()

ilParticipantsTestResultsGUI::getTestObj ( )

◆ isPdfDeliveryRequest()

ilParticipantsTestResultsGUI::isPdfDeliveryRequest ( )
protected
Returns
bool

Definition at line 532 of file class.ilParticipantsTestResultsGUI.php.

References $_GET.

Referenced by createUserResults().

533  {
534  if (!isset($_GET['pdf'])) {
535  return false;
536  }
537 
538  if (!(bool) $_GET['pdf']) {
539  return false;
540  }
541 
542  return true;
543  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ setObjectiveParent()

ilParticipantsTestResultsGUI::setObjectiveParent (   $objectiveParent)
Parameters
ilTestObjectiveOrientedContainer$objectiveParent

Definition at line 105 of file class.ilParticipantsTestResultsGUI.php.

References $objectiveParent.

106  {
107  $this->objectiveParent = $objectiveParent;
108  }

◆ setQuestionSetConfig()

ilParticipantsTestResultsGUI::setQuestionSetConfig (   $questionSetConfig)
Parameters
ilTestQuestionSetConfig$questionSetConfig

Definition at line 73 of file class.ilParticipantsTestResultsGUI.php.

References $questionSetConfig.

74  {
75  $this->questionSetConfig = $questionSetConfig;
76  }

◆ setTestAccess()

ilParticipantsTestResultsGUI::setTestAccess (   $testAccess)
Parameters
ilTestAccess$testAccess

Definition at line 89 of file class.ilParticipantsTestResultsGUI.php.

References $testAccess.

90  {
91  $this->testAccess = $testAccess;
92  }

◆ setTestObj()

ilParticipantsTestResultsGUI::setTestObj (   $testObj)
Parameters
ilObjTest$testObj

Definition at line 57 of file class.ilParticipantsTestResultsGUI.php.

References $testObj.

58  {
59  $this->testObj = $testObj;
60  }

◆ showDetailedResultsCmd()

ilParticipantsTestResultsGUI::showDetailedResultsCmd ( )
protected

Shows the pass overview and the answers of one ore more users for the scored pass.

Definition at line 344 of file class.ilParticipantsTestResultsGUI.php.

References $_POST, $_SESSION, and showUserResults().

345  {
346  if (is_array($_POST) && count($_POST)) {
347  $_SESSION["show_user_results"] = $_POST["chbUser"];
348  }
349  $this->showUserResults($show_pass_details = true, $show_answers = true, $show_reached_points = true);
350  }
$_SESSION["AccountId"]
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
Shows the pass overview of the scored pass for one ore more users.
$_POST["username"]
+ Here is the call graph for this function:

◆ showParticipantsCmd()

ilParticipantsTestResultsGUI::showParticipantsCmd ( )
protected

show participants command

Definition at line 157 of file class.ilParticipantsTestResultsGUI.php.

References $DIC, addDeleteAllTestResultsButton(), buildTableGUI(), ilTestParticipantAccessFilter\getAccessResultsUserFilter(), ilTestParticipantAccessFilter\getManageParticipantsUserFilter(), getQuestionSetConfig(), getTestAccess(), getTestObj(), ilUtil\sendFailure(), and ilUtil\sendInfo().

158  {
159  global $DIC; /* @var ILIAS\DI\Container $DIC */
160 
161  if ($this->getQuestionSetConfig()->areDepenciesBroken()) {
163  $this->getQuestionSetConfig()->getDepenciesBrokenMessage($DIC->language())
164  );
165  } elseif ($this->getQuestionSetConfig()->areDepenciesInVulnerableState()) {
167  $this->questionSetConfig->getDepenciesInVulnerableStateMessage($DIC->language())
168  );
169  }
170 
171  $manageParticipantFilter = ilTestParticipantAccessFilter::getManageParticipantsUserFilter($this->getTestObj()->getRefId());
172  $accessResultsFilter = ilTestParticipantAccessFilter::getAccessResultsUserFilter($this->getTestObj()->getRefId());
173 
174  $participantList = $this->getTestObj()->getActiveParticipantList();
175  $participantList = $participantList->getAccessFilteredList($manageParticipantFilter);
176  $participantList = $participantList->getAccessFilteredList($accessResultsFilter);
177 
178  $scoredParticipantList = $participantList->getScoredParticipantList();
179 
180  require_once 'Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php';
181  $tableGUI = $this->buildTableGUI();
182 
183  if (!$this->getQuestionSetConfig()->areDepenciesBroken()) {
184  $tableGUI->setAccessResultsCommandsEnabled(
185  $this->getTestAccess()->checkParticipantsResultsAccess()
186  );
187 
188  $tableGUI->setManageResultsCommandsEnabled(
189  $this->getTestAccess()->checkManageParticipantsAccess()
190  );
191 
192  if ($scoredParticipantList->hasScorings()) {
193  $this->addDeleteAllTestResultsButton($DIC->toolbar());
194  }
195  }
196 
197  $tableGUI->setAnonymity($this->getTestObj()->getAnonymity());
198 
199  $tableGUI->initColumns();
200  $tableGUI->initCommands();
201 
202  $tableGUI->setData($participantList->getScoringsTableRows());
203 
204  $DIC->ui()->mainTemplate()->setContent($tableGUI->getHTML());
205  }
global $DIC
Definition: saml.php:7
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ showPassOverviewCmd()

ilParticipantsTestResultsGUI::showPassOverviewCmd ( )
protected

Shows the pass overview of the scored pass for one ore more users.

Definition at line 366 of file class.ilParticipantsTestResultsGUI.php.

References $_POST, $_SESSION, and showUserResults().

367  {
368  if (is_array($_POST) && count($_POST)) {
369  $_SESSION["show_user_results"] = $_POST["chbUser"];
370  }
371  $this->showUserResults($show_pass_details = true, $show_answers = false);
372  }
$_SESSION["AccountId"]
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
Shows the pass overview of the scored pass for one ore more users.
$_POST["username"]
+ Here is the call graph for this function:

◆ showUserAnswersCmd()

ilParticipantsTestResultsGUI::showUserAnswersCmd ( )
protected

Shows the answers of one ore more users for the scored pass.

Definition at line 355 of file class.ilParticipantsTestResultsGUI.php.

References $_POST, $_SESSION, and showUserResults().

356  {
357  if (is_array($_POST) && count($_POST)) {
358  $_SESSION["show_user_results"] = $_POST["chbUser"];
359  }
360  $this->showUserResults($show_pass_details = false, $show_answers = true);
361  }
$_SESSION["AccountId"]
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
Shows the pass overview of the scored pass for one ore more users.
$_POST["username"]
+ Here is the call graph for this function:

◆ showUserResults()

ilParticipantsTestResultsGUI::showUserResults (   $show_pass_details,
  $show_answers,
  $show_reached_points = false 
)
protected

Shows the pass overview of the scored pass for one ore more users.

public

Definition at line 379 of file class.ilParticipantsTestResultsGUI.php.

References $_SESSION, $DIC, $template, createUserResults(), ilUtil\getStyleSheetLocation(), getTestObj(), and ilUtil\sendInfo().

Referenced by showDetailedResultsCmd(), showPassOverviewCmd(), and showUserAnswersCmd().

380  {
381  global $DIC; /* @var ILIAS\DI\Container $DIC */
382 
383  $DIC->tabs()->clearTargets();
384  $DIC->tabs()->clearSubTabs();
385 
386  $show_user_results = $_SESSION["show_user_results"];
387 
388  if (!is_array($show_user_results) || count($show_user_results) == 0) {
389  ilUtil::sendInfo($DIC->language()->txt("select_one_user"), true);
390  $DIC->ctrl()->redirect($this, self::CMD_SHOW_PARTICIPANTS);
391  }
392 
393 
394  $template = $this->createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results);
395 
396  if ($template instanceof ilTemplate) {
397  $DIC->ui()->mainTemplate()->setVariable("ADM_CONTENT", $template->get());
398  $DIC->ui()->mainTemplate()->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
399  if ($this->getTestObj()->getShowSolutionAnswersOnly()) {
400  $DIC->ui()->mainTemplate()->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
401  }
402  }
403  }
$_SESSION["AccountId"]
$template
global $DIC
Definition: saml.php:7
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
special template class to simplify handling of ITX/PEAR
createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $objectiveParent

ilParticipantsTestResultsGUI::$objectiveParent
protected

◆ $questionSetConfig

ilParticipantsTestResultsGUI::$questionSetConfig
protected

◆ $testAccess

ilParticipantsTestResultsGUI::$testAccess
protected

Definition at line 39 of file class.ilParticipantsTestResultsGUI.php.

Referenced by getTestAccess(), and setTestAccess().

◆ $testObj

ilParticipantsTestResultsGUI::$testObj
protected

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

Referenced by getTestObj(), and setTestObj().

◆ CMD_CONFIRM_DELETE_ALL_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_CONFIRM_DELETE_ALL_USER_RESULTS = 'deleteAllUserResults'

Definition at line 21 of file class.ilParticipantsTestResultsGUI.php.

◆ CMD_CONFIRM_DELETE_SELECTED_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_CONFIRM_DELETE_SELECTED_USER_RESULTS = 'deleteSingleUserResults'

Definition at line 23 of file class.ilParticipantsTestResultsGUI.php.

◆ CMD_PERFORM_DELETE_ALL_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_PERFORM_DELETE_ALL_USER_RESULTS = 'confirmDeleteAllUserResults'

Definition at line 22 of file class.ilParticipantsTestResultsGUI.php.

◆ CMD_PERFORM_DELETE_SELECTED_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_PERFORM_DELETE_SELECTED_USER_RESULTS = 'confirmDeleteSelectedUserData'

Definition at line 24 of file class.ilParticipantsTestResultsGUI.php.

◆ CMD_SHOW_PARTICIPANTS

const ilParticipantsTestResultsGUI::CMD_SHOW_PARTICIPANTS = 'showParticipants'

Definition at line 20 of file class.ilParticipantsTestResultsGUI.php.


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