ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilParticipantsTestResultsGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilParticipantsTestResultsGUI:

Public Member Functions

 __construct ()
 
 getTestObj ()
 
 setTestObj (ilObjTest $testObj)
 
 getQuestionSetConfig ()
 
 setQuestionSetConfig (ilTestQuestionSetConfig $questionSetConfig)
 
 getTestAccess ()
 
 setTestAccess (ilTestAccess $testAccess)
 
 getObjectiveParent ()
 
 setObjectiveParent (ilTestObjectiveOrientedContainer $objectiveParent)
 
 executeCommand ()
 
 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

 deleteSingleUserResultsCmd ()
 
 confirmDeleteSelectedUserDataCmd ()
 
 showDetailedResultsCmd ()
 
 showUserAnswersCmd ()
 
 showPassOverviewCmd ()
 
 showUserResults ($show_pass_details, $show_answers, $show_reached_points=false)
 
 isPdfDeliveryRequest ()
 

Private Member Functions

 getUserIdsFromPost ()
 
 buildTableGUI ()
 
 showParticipantsCmd ()
 
 addDeleteAllTestResultsButton (ilToolbarGUI $toolbar)
 
 deleteAllUserResultsCmd ()
 
 confirmDeleteAllUserResultsCmd ()
 

Private Attributes

ILIAS Test InternalRequestService $testrequest
 
ilObjTest $testObj = null
 
ilTestQuestionSetConfig $questionSetConfig = null
 
ilTestAccess $testAccess = null
 
ilCtrlInterface $ctrl
 
ilLanguage $lang
 
ilDBInterface $db
 
ilTabsGUI $tabs
 
ilToolbarGUI $toolbar
 
ILIAS HTTP GlobalHttpState $http
 
ILIAS Refinery Factory $refinery
 
ilTestObjectiveOrientedContainer $objectiveParent = null
 
ilGlobalTemplateInterface $main_tpl
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning ilParticipantsTestResultsGUI: ilTestEvaluationGUI ilParticipantsTestResultsGUI: ilAssQuestionPageGUI ilParticipantsTestResultsGUI: ilAssSpecFeedbackPageGUI ilParticipantsTestResultsGUI: ilAssGenFeedbackPageGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilParticipantsTestResultsGUI::__construct ( )

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

References $DIC, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

48  {
49  global $DIC;
50  $this->main_tpl = $DIC->ui()->mainTemplate();
51  $this->http = $DIC->http();
52  $this->refinery = $DIC->refinery();
53  $this->ctrl = $DIC->ctrl();
54  $this->lang = $DIC->language();
55  $this->db = $DIC->database();
56  $this->tabs = $DIC->tabs();
57  $this->toolbar = $DIC->toolbar();
58  $this->testrequest = $DIC->test()->internal()->request();
59  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

Member Function Documentation

◆ addDeleteAllTestResultsButton()

ilParticipantsTestResultsGUI::addDeleteAllTestResultsButton ( ilToolbarGUI  $toolbar)
private

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

References ilToolbarGUI\addButtonInstance(), ILIAS\Repository\ctrl(), and ilLinkButton\getInstance().

Referenced by showParticipantsCmd().

208  : void
209  {
210  $delete_all_results_btn = ilLinkButton::getInstance();
211  $delete_all_results_btn->setCaption('delete_all_user_data');
212  $delete_all_results_btn->setUrl($this->ctrl->getLinkTarget($this, 'deleteAllUserResults'));
213  $toolbar->addButtonInstance($delete_all_results_btn);
214  }
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 ( )
private

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

Referenced by showParticipantsCmd().

141  {
142  $tableGUI = new ilParticipantsTestResultsTableGUI($this, self::CMD_SHOW_PARTICIPANTS);
143  $tableGUI->setTitle($this->lang->txt('tst_tbl_results_grades'));
144  return $tableGUI;
145  }
+ Here is the caller graph for this function:

◆ confirmDeleteAllUserResultsCmd()

ilParticipantsTestResultsGUI::confirmDeleteAllUserResultsCmd ( )
private

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

References ILIAS\Repository\ctrl(), ilTestParticipantAccessFilter\getManageParticipantsUserFilter(), and getTestObj().

227  : void
228  {
230  $this->getTestObj()->getRefId()
231  );
232 
233  $participantData = new ilTestParticipantData($this->db, $this->lang);
234  $participantData->setParticipantAccessFilter($accessFilter);
235  $participantData->load($this->getTestObj()->getTestId());
236 
237  $this->getTestObj()->removeTestResults($participantData);
238 
239  $this->main_tpl->setOnScreenMessage('success', $this->lang->txt("tst_all_user_data_deleted"), true);
240  $this->ctrl->redirect($this, self::CMD_SHOW_PARTICIPANTS);
241  }
+ Here is the call graph for this function:

◆ confirmDeleteSelectedUserDataCmd()

ilParticipantsTestResultsGUI::confirmDeleteSelectedUserDataCmd ( )
protected

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

References ILIAS\Repository\ctrl(), ilTestParticipantAccessFilter\getManageParticipantsUserFilter(), getTestObj(), and getUserIdsFromPost().

286  : void
287  {
288  $usr_ids = $this->getUserIdsFromPost();
289  if ($usr_ids !== []) {
291  $this->getTestObj()->getRefId()
292  );
293 
294  $participantData = new ilTestParticipantData($this->db, $this->lang);
295  $participantData->setParticipantAccessFilter($accessFilter);
296  $participantData->setActiveIdsFilter($usr_ids);
297 
298  $participantData->load($this->getTestObj()->getTestId());
299 
300  $this->getTestObj()->removeTestResults($participantData);
301 
302  $this->main_tpl->setOnScreenMessage('success', $this->lang->txt("tst_selected_user_data_deleted"), true);
303  }
304 
305  $this->ctrl->redirect($this, self::CMD_SHOW_PARTICIPANTS);
306  }
+ 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

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

References ILIAS\LTI\ToolProvider\$key, $results, ilLink\_getLink(), ILIAS\Repository\ctrl(), ilTestPDFGenerator\generatePDF(), ilSession\get(), ilTestParticipantAccessFilter\getAccessResultsUserFilter(), getObjectiveParent(), getTestObj(), isPdfDeliveryRequest(), ilTestPDFGenerator\PDF_OUTPUT_DOWNLOAD, PDF_USER_RESULT, ilPDFGeneratorUtils\prepareGenerationRequest(), ilSession\set(), and ILIAS\Repository\tabs().

Referenced by showUserResults().

377  : ilTemplate {
378  // prepare generation before contents are processed (needed for mathjax)
379  if ($this->isPdfDeliveryRequest()) {
381  }
382 
383  $this->tabs->setBackTarget(
384  $this->lang->txt('back'),
385  $this->ctrl->getLinkTarget($this, self::CMD_SHOW_PARTICIPANTS)
386  );
387 
388  if ($this->getObjectiveParent()->isObjectiveOrientedPresentationRequired()) {
389  $courseLink = ilLink::_getLink($this->getObjectiveParent()->getRefId());
390  $this->tabs->setBack2Target($this->lang->txt('back_to_objective_container'), $courseLink);
391  }
392 
393  $template = new ilTemplate("tpl.il_as_tst_participants_result_output.html", true, true, "Modules/Test");
394 
395  $toolbar = new ilTestResultsToolbarGUI($this->ctrl, $this->main_tpl, $this->lang);
396 
397  $this->ctrl->setParameter($this, 'pdf', '1');
398  $toolbar->setPdfExportLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
399  $this->ctrl->setParameter($this, 'pdf', '');
400 
401  if ($show_answers) {
402  if ($this->testrequest->isset('show_best_solutions')) {
403  ilSession::set('tst_results_show_best_solutions', true);
404  } elseif ($this->testrequest->isset('hide_best_solutions')) {
405  ilSession::set('tst_results_show_best_solutions', false);
406  } elseif (ilSession::get('tst_results_show_best_solutions') !== null) {
407  ilSession::set('tst_results_show_best_solutions', false);
408  }
409 
410  if (ilSession::get('tst_results_show_best_solutions')) {
411  $this->ctrl->setParameter($this, 'hide_best_solutions', '1');
412  $toolbar->setHideBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
413  $this->ctrl->setParameter($this, 'hide_best_solutions', '');
414  } else {
415  $this->ctrl->setParameter($this, 'show_best_solutions', '1');
416  $toolbar->setShowBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
417  $this->ctrl->setParameterByClass('', 'show_best_solutions', '');
418  }
419  }
420 
421  $participantData = new ilTestParticipantData($this->db, $this->lang);
422  $participantData->setParticipantAccessFilter(
424  );
425 
426  $participantData->setActiveIdsFilter($show_user_results);
427 
428  $participantData->load($this->getTestObj()->getTestId());
429  $toolbar->setParticipantSelectorOptions($participantData->getOptionArray());
430 
431  $toolbar->build();
432  $template->setVariable('RESULTS_TOOLBAR', $toolbar->getHTML());
433 
434  $serviceGUI = new ilTestServiceGUI($this->getTestObj());
435  $serviceGUI->setObjectiveOrientedContainer($this->getObjectiveParent());
436  $serviceGUI->setParticipantData($participantData);
437 
438  $testSessionFactory = new ilTestSessionFactory($this->getTestObj());
439 
440  $count = 0;
441  foreach ($show_user_results as $key => $active_id) {
442  if (!in_array($active_id, $participantData->getActiveIds())) {
443  continue;
444  }
445 
446  $count++;
447  $results = "";
448  if ($active_id > 0) {
449  $results = $serviceGUI->getResultsOfUserOutput(
450  $testSessionFactory->getSession($active_id),
451  $active_id,
452  $this->getTestObj()->_getResultPass($active_id),
453  $this,
454  $show_pass_details,
455  $show_answers,
456  false,
457  $show_reached_points
458  );
459  }
460  if ($count < count($show_user_results)) {
461  $template->touchBlock("break");
462  }
463  $template->setCurrentBlock("user_result");
464  $template->setVariable("USER_RESULT", $results);
465  $template->parseCurrentBlock();
466  }
467 
468  if ($this->isPdfDeliveryRequest()) {
470  $template->get(),
472  $this->getTestObj()->getTitleFilenameCompliant(),
474  );
475  }
476  return $template;
477  }
static get(string $a_var)
const PDF_USER_RESULT
PDF Purposes.
string $key
Consumer key/client ID value.
Definition: System.php:193
$results
Service GUI class for tests.
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
static prepareGenerationRequest(string $service, string $purpose)
Prepare the content processing for a PDF generation request This function should be called as in a re...
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteAllUserResultsCmd()

ilParticipantsTestResultsGUI::deleteAllUserResultsCmd ( )
private

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

References ILIAS\Repository\ctrl().

216  : void
217  {
218  $cgui = new ilConfirmationGUI();
219  $cgui->setFormAction($this->ctrl->getFormAction($this));
220  $cgui->setHeaderText($this->lang->txt("delete_all_user_data_confirmation"));
221  $cgui->setCancel($this->lang->txt("cancel"), self::CMD_SHOW_PARTICIPANTS);
222  $cgui->setConfirm($this->lang->txt("proceed"), self::CMD_PERFORM_DELETE_ALL_USER_RESULTS);
223 
224  $this->main_tpl->setContent($cgui->getHTML());
225  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ deleteSingleUserResultsCmd()

ilParticipantsTestResultsGUI::deleteSingleUserResultsCmd ( )
protected

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

References ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilTestParticipantAccessFilter\getManageParticipantsUserFilter(), getTestObj(), and getUserIdsFromPost().

243  : void
244  {
245  $usr_ids = $this->getUserIdsFromPost();
246  if ($usr_ids === []) {
247  $this->main_tpl->setOnScreenMessage('info', $this->lang->txt("select_one_user"), true);
248  $this->ctrl->redirect($this);
249  }
250 
251  $cgui = new ilConfirmationGUI();
252  $cgui->setHeaderText($this->lang->txt("confirm_delete_single_user_data"));
253 
254  $cgui->setFormAction($this->ctrl->getFormAction($this));
255  $cgui->setCancel($this->lang->txt("cancel"), self::CMD_SHOW_PARTICIPANTS);
256  $cgui->setConfirm($this->lang->txt("confirm"), self::CMD_PERFORM_DELETE_SELECTED_USER_RESULTS);
257 
259 
260  $participantData = new ilTestParticipantData($this->db, $this->lang);
261  $participantData->setParticipantAccessFilter($accessFilter);
262 
263  $participantData->setActiveIdsFilter($usr_ids);
264 
265  $participantData->load($this->getTestObj()->getTestId());
266 
267  foreach ($participantData->getActiveIds() as $activeId) {
268  if ($this->testObj->getAnonymity()) {
269  $username = $this->lang->txt('anonymous');
270  } else {
271  $username = $participantData->getFormatedFullnameByActiveId($activeId);
272  }
273 
274  $cgui->addItem(
275  "chbUser[]",
276  $activeId,
277  $username,
278  ilUtil::getImagePath("icon_usr.svg"),
279  $this->lang->txt("usr")
280  );
281  }
282 
283  $this->main_tpl->setContent($cgui->getHTML());
284  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ executeCommand()

ilParticipantsTestResultsGUI::executeCommand ( )

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

References ILIAS\Repository\ctrl(), getObjectiveParent(), getTestAccess(), getTestObj(), and ILIAS\Repository\tabs().

101  : void
102  {
103  switch ($this->ctrl->getNextClass($this)) {
104  case "iltestevaluationgui":
105  $gui = new ilTestEvaluationGUI($this->getTestObj());
106  $gui->setObjectiveOrientedContainer($this->getObjectiveParent());
107  $gui->setTestAccess($this->getTestAccess());
108  $this->tabs->clearTargets();
109  $this->tabs->clearSubTabs();
110  $this->ctrl->forwardCommand($gui);
111  break;
112 
113  case 'ilassquestionpagegui':
114  $forwarder = new ilAssQuestionPageCommandForwarder();
115  $forwarder->setTestObj($this->getTestObj());
116  $forwarder->forward();
117  break;
118 
119  default:
120 
121  $command = $this->ctrl->getCmd(self::CMD_SHOW_PARTICIPANTS) . 'Cmd';
122  $this->{$command}();
123  }
124  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getObjectiveParent()

ilParticipantsTestResultsGUI::getObjectiveParent ( )

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

References $objectiveParent.

Referenced by createUserResults(), and executeCommand().

+ Here is the caller graph for this function:

◆ getQuestionSetConfig()

ilParticipantsTestResultsGUI::getQuestionSetConfig ( )

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

References $questionSetConfig.

Referenced by showParticipantsCmd().

+ Here is the caller graph for this function:

◆ getTestAccess()

ilParticipantsTestResultsGUI::getTestAccess ( )

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 ( )

◆ getUserIdsFromPost()

ilParticipantsTestResultsGUI::getUserIdsFromPost ( )
private
Returns
list<int>

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

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

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

129  : array
130  {
131  return $this->http->wrapper()->post()->retrieve(
132  'chbUser',
133  $this->refinery->byTrying([
134  $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int()),
135  $this->refinery->always([])
136  ])
137  );
138  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPdfDeliveryRequest()

ilParticipantsTestResultsGUI::isPdfDeliveryRequest ( )
protected

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

Referenced by createUserResults().

479  : bool
480  {
481  if (!$this->testrequest->isset('pdf')) {
482  return false;
483  }
484 
485  if (!$this->testrequest->raw('pdf')) {
486  return false;
487  }
488 
489  return true;
490  }
+ Here is the caller graph for this function:

◆ setObjectiveParent()

ilParticipantsTestResultsGUI::setObjectiveParent ( ilTestObjectiveOrientedContainer  $objectiveParent)

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

References $objectiveParent.

96  : void
97  {
98  $this->objectiveParent = $objectiveParent;
99  }
ilTestObjectiveOrientedContainer $objectiveParent

◆ setQuestionSetConfig()

ilParticipantsTestResultsGUI::setQuestionSetConfig ( ilTestQuestionSetConfig  $questionSetConfig)

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

References $questionSetConfig.

76  : void
77  {
78  $this->questionSetConfig = $questionSetConfig;
79  }

◆ setTestAccess()

ilParticipantsTestResultsGUI::setTestAccess ( ilTestAccess  $testAccess)

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

References $testAccess.

86  : void
87  {
88  $this->testAccess = $testAccess;
89  }

◆ setTestObj()

ilParticipantsTestResultsGUI::setTestObj ( ilObjTest  $testObj)

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

References $testObj.

66  : void
67  {
68  $this->testObj = $testObj;
69  }

◆ showDetailedResultsCmd()

ilParticipantsTestResultsGUI::showDetailedResultsCmd ( )
protected

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

References getUserIdsFromPost(), ilSession\set(), and showUserResults().

308  : void
309  {
310  $usr_ids = $this->getUserIdsFromPost();
311  if ($usr_ids !== []) {
312  ilSession::set('show_user_results', $usr_ids);
313  }
314  $this->showUserResults($show_pass_details = true, $show_answers = true, $show_reached_points = true);
315  }
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ showParticipantsCmd()

ilParticipantsTestResultsGUI::showParticipantsCmd ( )
private

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

References addDeleteAllTestResultsButton(), buildTableGUI(), ilSession\clear(), ilTestParticipantAccessFilter\getAccessResultsUserFilter(), ilTestParticipantAccessFilter\getManageParticipantsUserFilter(), getQuestionSetConfig(), getTestAccess(), getTestObj(), and ILIAS\Repository\toolbar().

147  : void
148  {
149  ilSession::clear("show_user_results");
150 
151  if ($this->getQuestionSetConfig()->areDepenciesBroken()) {
152  $this->main_tpl->setOnScreenMessage(
153  'failure',
154  $this->getQuestionSetConfig()->getDepenciesBrokenMessage($this->lang)
155  );
156  } elseif ($this->getQuestionSetConfig()->areDepenciesInVulnerableState()) {
157  $this->main_tpl->setOnScreenMessage(
158  'info',
159  $this->questionSetConfig->getDepenciesInVulnerableStateMessage($this->lang)
160  );
161  }
162 
164  $this->getTestObj()->getRefId()
165  );
167  $this->getTestObj()->getRefId()
168  );
169 
170  $full_participant_list = $this->getTestObj()->getActiveParticipantList();
171  $participantList = $full_participant_list->getAccessFilteredList($manageParticipantFilter);
172  $access_to_results_participants = $full_participant_list->getAccessFilteredList($accessResultsFilter);
173  foreach ($access_to_results_participants as $participant) {
174  if (!$participantList->isActiveIdInList($participant->getActiveId())) {
175  $participantList->addParticipant($participant);
176  }
177  }
178 
179  $scoredParticipantList = $participantList->getScoredParticipantList();
180 
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 ($this->testAccess->checkManageParticipantsAccess()
193  && $scoredParticipantList->hasScorings()) {
194  $this->addDeleteAllTestResultsButton($this->toolbar);
195  }
196  }
197 
198  $tableGUI->setAnonymity($this->getTestObj()->getAnonymity());
199 
200  $tableGUI->initColumns();
201  $tableGUI->initCommands();
202 
203  $tableGUI->setData($participantList->getScoringsTableRows());
204 
205  $this->main_tpl->setContent($tableGUI->getHTML());
206  }
static clear(string $a_var)
+ Here is the call graph for this function:

◆ showPassOverviewCmd()

ilParticipantsTestResultsGUI::showPassOverviewCmd ( )
protected

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

References getUserIdsFromPost(), ilSession\set(), and showUserResults().

326  : void
327  {
328  $usr_ids = $this->getUserIdsFromPost();
329  if ($usr_ids !== []) {
330  ilSession::set('show_user_results', $usr_ids);
331  }
332  $this->showUserResults($show_pass_details = true, $show_answers = false);
333  }
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ showUserAnswersCmd()

ilParticipantsTestResultsGUI::showUserAnswersCmd ( )
protected

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

References getUserIdsFromPost(), ilSession\set(), and showUserResults().

317  : void
318  {
319  $usr_ids = $this->getUserIdsFromPost();
320  if ($usr_ids !== []) {
321  ilSession::set('show_user_results', $usr_ids);
322  }
323  $this->showUserResults($show_pass_details = false, $show_answers = true);
324  }
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ showUserResults()

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

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

References createUserResults(), ILIAS\Repository\ctrl(), ilSession\get(), ilUtil\getStyleSheetLocation(), getTestObj(), and ILIAS\Repository\tabs().

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

335  : void
336  {
337  $this->tabs->clearTargets();
338  $this->tabs->clearSubTabs();
339 
340  $show_user_results = ilSession::get("show_user_results");
341 
342  if (!is_array($show_user_results) || count($show_user_results) === 0) {
343  $this->main_tpl->setOnScreenMessage('info', $this->lang->txt("select_one_user"), true);
344  $this->ctrl->redirect($this, self::CMD_SHOW_PARTICIPANTS);
345  }
346 
347  $template = $this->createUserResults(
348  $show_pass_details,
349  $show_answers,
350  $show_reached_points,
351  $show_user_results
352  );
353 
354  if ($template instanceof ilTemplate) {
355  $this->main_tpl->setVariable("ADM_CONTENT", $template->get());
356  $this->main_tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
357  if ($this->getTestObj()->getShowSolutionAnswersOnly()) {
358  $this->main_tpl->addCss(
359  ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"),
360  "print"
361  );
362  }
363  }
364  }
static get(string $a_var)
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
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

◆ $ctrl

ilCtrlInterface ilParticipantsTestResultsGUI::$ctrl
private

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

◆ $db

ilDBInterface ilParticipantsTestResultsGUI::$db
private

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

◆ $http

ILIAS HTTP GlobalHttpState ilParticipantsTestResultsGUI::$http
private

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

◆ $lang

ilLanguage ilParticipantsTestResultsGUI::$lang
private

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

◆ $main_tpl

ilGlobalTemplateInterface ilParticipantsTestResultsGUI::$main_tpl
private

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

◆ $objectiveParent

ilTestObjectiveOrientedContainer ilParticipantsTestResultsGUI::$objectiveParent = null
private

◆ $questionSetConfig

ilTestQuestionSetConfig ilParticipantsTestResultsGUI::$questionSetConfig = null
private

◆ $refinery

ILIAS Refinery Factory ilParticipantsTestResultsGUI::$refinery
private

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

◆ $tabs

ilTabsGUI ilParticipantsTestResultsGUI::$tabs
private

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

◆ $testAccess

ilTestAccess ilParticipantsTestResultsGUI::$testAccess = null
private

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

Referenced by getTestAccess(), and setTestAccess().

◆ $testObj

ilObjTest ilParticipantsTestResultsGUI::$testObj = null
private

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

Referenced by getTestObj(), and setTestObj().

◆ $testrequest

ILIAS Test InternalRequestService ilParticipantsTestResultsGUI::$testrequest
private

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

◆ $toolbar

ilToolbarGUI ilParticipantsTestResultsGUI::$toolbar
private

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

◆ CMD_CONFIRM_DELETE_ALL_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_CONFIRM_DELETE_ALL_USER_RESULTS = 'deleteAllUserResults'

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

◆ CMD_CONFIRM_DELETE_SELECTED_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_CONFIRM_DELETE_SELECTED_USER_RESULTS = 'deleteSingleUserResults'

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

◆ CMD_PERFORM_DELETE_ALL_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_PERFORM_DELETE_ALL_USER_RESULTS = 'confirmDeleteAllUserResults'

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

◆ CMD_PERFORM_DELETE_SELECTED_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_PERFORM_DELETE_SELECTED_USER_RESULTS = 'confirmDeleteSelectedUserData'

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

◆ CMD_SHOW_PARTICIPANTS

const ilParticipantsTestResultsGUI::CMD_SHOW_PARTICIPANTS = 'showParticipants'

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


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