ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilParticipantsTestResultsGUI Class Reference

ilParticipantsTestResultsGUI: ilTestEvaluationGUI ilParticipantsTestResultsGUI: ilAssQuestionPageGUI ilParticipantsTestResultsGUI: ilAssSpecFeedbackPageGUI ilParticipantsTestResultsGUI: ilAssGenFeedbackPageGUI More...

+ Collaboration diagram for ilParticipantsTestResultsGUI:

Public Member Functions

 __construct (private ilCtrlInterface $ctrl, private ilLanguage $lng, private ilDBInterface $db, private ilObjUser $user, private ilTabsGUI $tabs, private ilToolbarGUI $toolbar, private ilGlobalTemplateInterface $main_tpl, private UIFactory $ui_factory, private UIRenderer $ui_renderer, private ilTestParticipantAccessFilterFactory $participant_access_filter_factory, private InternalRequestService $testrequest, private \ILIAS\HTTP\GlobalHttpState $http, private \ILIAS\Refinery\Factory $refinery,)
 
 getObject ()
 
 getTestObj ()
 
 setTestObj (ilObjTest $test_obj)
 
 getQuestionSetConfig ()
 
 setQuestionSetConfig (ilTestQuestionSetConfig $question_set_config)
 
 getTestAccess ()
 
 setTestAccess (ilTestAccess $test_access)
 
 getObjectiveParent ()
 
 setObjectiveParent (ilTestObjectiveOrientedContainer $objective_parent)
 
 executeCommand ()
 
 createUserResults (bool $show_pass_details, bool $show_answers, bool $show_reached_points, array $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'
 

Private Member Functions

 getUserIdsFromPost ()
 
 forwardToEvaluationGUI ()
 
 buildTableGUI ()
 
 showParticipantsCmd ()
 
 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...
 

Private Attributes

ilObjTest $test_obj = null
 
ilTestQuestionSetConfig $question_set_config = null
 
ilTestAccess $test_access = null
 
ilTestObjectiveOrientedContainer $objective_parent = null
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilParticipantsTestResultsGUI::__construct ( private ilCtrlInterface  $ctrl,
private ilLanguage  $lng,
private ilDBInterface  $db,
private ilObjUser  $user,
private ilTabsGUI  $tabs,
private ilToolbarGUI  $toolbar,
private ilGlobalTemplateInterface  $main_tpl,
private UIFactory  $ui_factory,
private UIRenderer  $ui_renderer,
private ilTestParticipantAccessFilterFactory  $participant_access_filter_factory,
private InternalRequestService  $testrequest,
private \ILIAS\HTTP\GlobalHttpState  $http,
private \ILIAS\Refinery\Factory  $refinery 
)

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

59  {
60  }

Member Function Documentation

◆ addDeleteAllTestResultsButton()

ilParticipantsTestResultsGUI::addDeleteAllTestResultsButton ( ilToolbarGUI  $toolbar)
private

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

References ilToolbarGUI\addComponent(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by showParticipantsCmd().

223  : void
224  {
225  $delete_all_results_btn = $this->ui_factory->button()->standard($this->lng->txt('delete_all_user_data'), $this->ctrl->getLinkTarget($this, 'deleteAllUserResults'));
226  $toolbar->addComponent($delete_all_results_btn);
227  }
addComponent(\ILIAS\UI\Component\Component $a_comp)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTableGUI()

ilParticipantsTestResultsGUI::buildTableGUI ( )
private

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

References ILIAS\Repository\lng().

Referenced by showParticipantsCmd().

151  {
152  $table_gui = new ilParticipantsTestResultsTableGUI(
153  $this,
154  self::CMD_SHOW_PARTICIPANTS,
155  $this->ui_factory,
156  $this->ui_renderer
157  );
158  $table_gui->setTitle($this->lng->txt('tst_tbl_results_grades'));
159  return $table_gui;
160  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmDeleteAllUserResultsCmd()

ilParticipantsTestResultsGUI::confirmDeleteAllUserResultsCmd ( )
private

Deletes all user data for the test object.

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

References ILIAS\Repository\ctrl(), getTestObj(), and ILIAS\Repository\lng().

246  : void
247  {
248  $access_filter = $this->participant_access_filter_factory->getManageParticipantsUserFilter(
249  $this->getTestObj()->getRefId()
250  );
251 
252  $participant_data = new ilTestParticipantData($this->db, $this->lng);
253  $participant_data->setParticipantAccessFilter($access_filter);
254  $participant_data->load($this->getTestObj()->getTestId());
255 
256  $this->getTestObj()->removeTestResults($participant_data);
257 
258  $this->main_tpl->setOnScreenMessage('success', $this->lng->txt("tst_all_user_data_deleted"), true);
259  $this->ctrl->redirect($this, self::CMD_SHOW_PARTICIPANTS);
260  }
+ Here is the call graph for this function:

◆ confirmDeleteSelectedUserDataCmd()

ilParticipantsTestResultsGUI::confirmDeleteSelectedUserDataCmd ( )
private

Deletes the selected user data for the test object.

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

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

311  : void
312  {
313  $usr_ids = $this->getUserIdsFromPost();
314  if ($usr_ids !== []) {
315  $access_filter = $this->participant_access_filter_factory->getManageParticipantsUserFilter($this->getTestObj()->getRefId());
316 
317  $participant_data = new ilTestParticipantData($this->db, $this->lng);
318  $participant_data->setParticipantAccessFilter($access_filter);
319  $participant_data->setActiveIdsFilter($usr_ids);
320 
321  $participant_data->load($this->getTestObj()->getTestId());
322 
323  $this->getTestObj()->removeTestResults($participant_data);
324 
325  $this->main_tpl->setOnScreenMessage('success', $this->lng->txt("tst_selected_user_data_deleted"), true);
326  }
327 
328  $this->ctrl->redirect($this, self::CMD_SHOW_PARTICIPANTS);
329  }
+ Here is the call graph for this function:

◆ createUserResults()

ilParticipantsTestResultsGUI::createUserResults ( bool  $show_pass_details,
bool  $show_answers,
bool  $show_reached_points,
array  $show_user_results 
)

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

References ILIAS\LTI\ToolProvider\$key, $results, ilObjTest\_getResultPass(), ILIAS\Repository\ctrl(), ilSession\get(), getObjectiveParent(), getTestObj(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilSession\set(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

Referenced by showUserResults().

413  : ilTemplate {
414  $this->tabs->setBackTarget(
415  $this->lng->txt('back'),
416  $this->ctrl->getLinkTarget($this, self::CMD_SHOW_PARTICIPANTS)
417  );
418 
419  if ($this->getObjectiveParent()->isObjectiveOrientedPresentationRequired()) {
420  $courseLink = ilLink::_getLink($this->getObjectiveParent()->getRefId());
421  $this->tabs->setBack2Target($this->lng->txt('back_to_objective_container'), $courseLink);
422  }
423 
424  $template = new ilTemplate("tpl.il_as_tst_participants_result_output.html", true, true, "Modules/Test");
425 
426  $toolbar = new ilTestResultsToolbarGUI($this->ctrl, $this->main_tpl, $this->lng);
427 
428  if ($show_answers) {
429  if ($this->testrequest->isset('show_best_solutions')) {
430  ilSession::set('tst_results_show_best_solutions', true);
431  } elseif ($this->testrequest->isset('hide_best_solutions')) {
432  ilSession::set('tst_results_show_best_solutions', false);
433  } elseif (ilSession::get('tst_results_show_best_solutions') !== null) {
434  ilSession::set('tst_results_show_best_solutions', false);
435  }
436 
437  if (ilSession::get('tst_results_show_best_solutions')) {
438  $this->ctrl->setParameter($this, 'hide_best_solutions', '1');
439  $toolbar->setHideBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
440  $this->ctrl->setParameter($this, 'hide_best_solutions', '');
441  } else {
442  $this->ctrl->setParameter($this, 'show_best_solutions', '1');
443  $toolbar->setShowBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
444  $this->ctrl->setParameterByClass('', 'show_best_solutions', '');
445  }
446  }
447 
448  $participant_data = new ilTestParticipantData($this->db, $this->lng);
449  $participant_data->setParticipantAccessFilter(
450  $this->participant_access_filter_factory->getAccessResultsUserFilter($this->getTestObj()->getRefId())
451  );
452 
453  $participant_data->setActiveIdsFilter($show_user_results);
454 
455  $participant_data->load($this->getTestObj()->getTestId());
456  $toolbar->setParticipantSelectorOptions($participant_data->getOptionArray());
457 
458  $toolbar->build();
459  $template->setVariable('RESULTS_TOOLBAR', $toolbar->getHTML());
460 
461  $service_gui = new ilTestServiceGUI($this->getTestObj());
462  $service_gui->setObjectiveOrientedContainer($this->getObjectiveParent());
463  $service_gui->setParticipantData($participant_data);
464 
465  $testSessionFactory = new ilTestSessionFactory($this->getTestObj(), $this->db, $this->user);
466 
467  $count = 0;
468  foreach ($show_user_results as $key => $active_id) {
469  if (!in_array($active_id, $participant_data->getActiveIds())) {
470  continue;
471  }
472 
473  $count++;
474  $results = "";
475  if ($active_id > 0) {
476  $results = $service_gui->getResultsOfUserOutput(
477  $testSessionFactory->getSession((int) $active_id),
478  (int) $active_id,
479  ilObjTest::_getResultPass((int) $active_id),
480  $this,
481  $show_pass_details,
482  $show_answers,
483  false,
484  $show_reached_points
485  );
486  }
487  if ($count < count($show_user_results)) {
488  $template->touchBlock("break");
489  }
490  $template->setCurrentBlock("user_result");
491  $template->setVariable("USER_RESULT", $results);
492  $template->parseCurrentBlock();
493  }
494 
495  return $template;
496  }
static get(string $a_var)
static _getResultPass($active_id)
Retrieves the pass number that should be counted for a given user.
string $key
Consumer key/client ID value.
Definition: System.php:193
$results
Service GUI class for tests.
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

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

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

232  : void
233  {
234  $cgui = new ilConfirmationGUI();
235  $cgui->setFormAction($this->ctrl->getFormAction($this));
236  $cgui->setHeaderText($this->lng->txt("delete_all_user_data_confirmation"));
237  $cgui->setCancel($this->lng->txt("cancel"), self::CMD_SHOW_PARTICIPANTS);
238  $cgui->setConfirm($this->lng->txt("proceed"), self::CMD_PERFORM_DELETE_ALL_USER_RESULTS);
239 
240  $this->main_tpl->setContent($cgui->getHTML());
241  }
+ Here is the call graph for this function:

◆ deleteSingleUserResultsCmd()

ilParticipantsTestResultsGUI::deleteSingleUserResultsCmd ( )
private

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

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

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

265  : void
266  {
267  $usr_ids = $this->getUserIdsFromPost();
268  if ($usr_ids === []) {
269  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("select_one_user"), true);
270  $this->ctrl->redirect($this);
271  }
272 
273  $cgui = new ilConfirmationGUI();
274  $cgui->setHeaderText($this->lng->txt("confirm_delete_single_user_data"));
275 
276  $cgui->setFormAction($this->ctrl->getFormAction($this));
277  $cgui->setCancel($this->lng->txt("cancel"), self::CMD_SHOW_PARTICIPANTS);
278  $cgui->setConfirm($this->lng->txt("confirm"), self::CMD_PERFORM_DELETE_SELECTED_USER_RESULTS);
279 
280  $access_filter = $this->participant_access_filter_factory->getManageParticipantsUserFilter($this->getTestObj()->getRefId());
281 
282  $participant_data = new ilTestParticipantData($this->db, $this->lng);
283  $participant_data->setParticipantAccessFilter($access_filter);
284 
285  $participant_data->setActiveIdsFilter($usr_ids);
286 
287  $participant_data->load($this->getTestObj()->getTestId());
288 
289  foreach ($participant_data->getActiveIds() as $active_id) {
290  if ($this->test_obj->getAnonymity()) {
291  $username = $this->lng->txt('anonymous');
292  } else {
293  $username = $participant_data->getFormatedFullnameByActiveId($active_id);
294  }
295 
296  $cgui->addItem(
297  "chbUser[]",
298  (string) $active_id,
299  $username,
300  ilUtil::getImagePath("standard/icon_usr.svg"),
301  $this->lng->txt("usr")
302  );
303  }
304 
305  $this->main_tpl->setContent($cgui->getHTML());
306  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

◆ executeCommand()

ilParticipantsTestResultsGUI::executeCommand ( )

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

References ILIAS\Repository\ctrl(), forwardToEvaluationGUI(), and getTestObj().

107  : void
108  {
109  switch ($this->ctrl->getNextClass($this)) {
110  case "iltestevaluationgui":
111  $this->forwardToEvaluationGUI();
112  break;
113 
114  case 'ilassquestionpagegui':
115  $forwarder = new ilAssQuestionPageCommandForwarder();
116  $forwarder->setTestObj($this->getTestObj());
117  $forwarder->forward();
118  break;
119 
120  default:
121 
122  $command = $this->ctrl->getCmd(self::CMD_SHOW_PARTICIPANTS) . 'Cmd';
123  $this->{$command}();
124  }
125  }
+ Here is the call graph for this function:

◆ forwardToEvaluationGUI()

ilParticipantsTestResultsGUI::forwardToEvaluationGUI ( )
private

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

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

Referenced by executeCommand().

140  : void
141  {
142  $gui = new ilTestEvaluationGUI($this->getTestObj());
143  $gui->setObjectiveOrientedContainer($this->getObjectiveParent());
144  $gui->setTestAccess($this->getTestAccess());
145  $this->tabs->clearTargets();
146  $this->tabs->clearSubTabs();
147  $this->ctrl->forwardCommand($gui);
148  }
Output class for assessment test evaluation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObject()

ilParticipantsTestResultsGUI::getObject ( )

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

References $test_obj.

◆ getObjectiveParent()

ilParticipantsTestResultsGUI::getObjectiveParent ( )

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

References $objective_parent.

Referenced by createUserResults(), and forwardToEvaluationGUI().

+ Here is the caller graph for this function:

◆ getQuestionSetConfig()

ilParticipantsTestResultsGUI::getQuestionSetConfig ( )

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

References $question_set_config.

Referenced by showParticipantsCmd().

+ Here is the caller graph for this function:

◆ getTestAccess()

ilParticipantsTestResultsGUI::getTestAccess ( )

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

References $test_access.

Referenced by forwardToEvaluationGUI(), and showParticipantsCmd().

+ Here is the caller graph for this function:

◆ 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:

◆ setObjectiveParent()

ilParticipantsTestResultsGUI::setObjectiveParent ( ilTestObjectiveOrientedContainer  $objective_parent)

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

References $objective_parent.

102  : void
103  {
104  $this->objective_parent = $objective_parent;
105  }
ilTestObjectiveOrientedContainer $objective_parent

◆ setQuestionSetConfig()

ilParticipantsTestResultsGUI::setQuestionSetConfig ( ilTestQuestionSetConfig  $question_set_config)

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

References $question_set_config.

82  : void
83  {
84  $this->question_set_config = $question_set_config;
85  }

◆ setTestAccess()

ilParticipantsTestResultsGUI::setTestAccess ( ilTestAccess  $test_access)

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

References $test_access.

92  : void
93  {
94  $this->test_access = $test_access;
95  }

◆ setTestObj()

ilParticipantsTestResultsGUI::setTestObj ( ilObjTest  $test_obj)

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

References $test_obj.

72  : void
73  {
74  $this->test_obj = $test_obj;
75  }

◆ showDetailedResultsCmd()

ilParticipantsTestResultsGUI::showDetailedResultsCmd ( )
private

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

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

References ILIAS\Repository\ctrl(), getUserIdsFromPost(), ILIAS\Repository\lng(), and ilSession\set().

334  : void
335  {
336  $usr_ids = $this->getUserIdsFromPost();
337  if ($usr_ids === []) {
338  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt('select_one_user'), true);
339  $this->ctrl->redirect($this);
340  }
341 
342  ilSession::set('show_user_results', $usr_ids);
343  $results_href = $this->ctrl->getLinkTargetByClass(
344  [ilTestResultsGUI::class, ilParticipantsTestResultsGUI::class, ilTestEvaluationGUI::class],
345  'multiParticipantsPassDetails'
346  );
347  $this->ctrl->redirectToURL($results_href);
348  }
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 162 of file class.ilParticipantsTestResultsGUI.php.

References addDeleteAllTestResultsButton(), buildTableGUI(), ilSession\clear(), getGeneralSettings(), getQuestionSetConfig(), getTestAccess(), getTestObj(), ILIAS\Repository\lng(), and ILIAS\Repository\toolbar().

162  : void
163  {
164  ilSession::clear("show_user_results");
165 
166  if ($this->getQuestionSetConfig()->areDepenciesBroken()) {
167  $this->main_tpl->setOnScreenMessage(
168  'failure',
169  $this->getQuestionSetConfig()->getDepenciesBrokenMessage($this->lng)
170  );
171  } elseif ($this->getQuestionSetConfig()->areDepenciesInVulnerableState()) {
172  $this->main_tpl->setOnScreenMessage(
173  'info',
174  $this->getQuestionSetConfig()->getDepenciesInVulnerableStateMessage($this->lng)
175  );
176  }
177 
178  $manage_participant_filter = $this->participant_access_filter_factory->getManageParticipantsUserFilter(
179  $this->getTestObj()->getRefId()
180  );
181  $access_results_filter = $this->participant_access_filter_factory->getAccessResultsUserFilter(
182  $this->getTestObj()->getRefId()
183  );
184 
185  $full_participant_list = $this->getTestObj()->getActiveParticipantList();
186  $participantList = $full_participant_list->getAccessFilteredList($manage_participant_filter);
187  $access_to_results_participants = $full_participant_list->getAccessFilteredList($access_results_filter);
188  foreach ($access_to_results_participants as $participant) {
189  if (!$participantList->isActiveIdInList($participant->getActiveId())) {
190  $participantList->addParticipant($participant);
191  }
192  }
193 
194  $scored_participant_list = $participantList->getScoredParticipantList();
195 
196  $table_gui = $this->buildTableGUI();
197 
198  if (!$this->getQuestionSetConfig()->areDepenciesBroken()) {
199  $table_gui->setAccessResultsCommandsEnabled(
200  $this->getTestAccess()->checkParticipantsResultsAccess()
201  );
202 
203  $table_gui->setManageResultsCommandsEnabled(
204  $this->getTestAccess()->checkManageParticipantsAccess()
205  );
206 
207  if ($this->test_access->checkManageParticipantsAccess()
208  && $scored_participant_list->hasScorings()) {
209  $this->addDeleteAllTestResultsButton($this->toolbar);
210  }
211  }
212 
213  $table_gui->setAnonymity($this->getTestObj()->getMainSettings()->getGeneralSettings()->getAnonymity());
214 
215  $table_gui->initColumns();
216  $table_gui->initCommands();
217 
218  $table_gui->setData($participantList->getScoringsTableRows());
219 
220  $this->main_tpl->setContent($table_gui->getHTML());
221  }
getGeneralSettings()
static clear(string $a_var)
+ Here is the call graph for this function:

◆ showPassOverviewCmd()

ilParticipantsTestResultsGUI::showPassOverviewCmd ( )
private

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

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

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

365  : void
366  {
367  $usr_ids = $this->getUserIdsFromPost();
368  if ($usr_ids !== []) {
369  ilSession::set('show_user_results', $usr_ids);
370  }
371  $this->showUserResults(true, false);
372  }
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
Shows the pass overview of the scored pass for one ore more users.
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ showUserAnswersCmd()

ilParticipantsTestResultsGUI::showUserAnswersCmd ( )
private

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

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

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

353  : void
354  {
355  $usr_ids = $this->getUserIdsFromPost();
356  if ($usr_ids !== []) {
357  ilSession::set('show_user_results', $usr_ids);
358  }
359  $this->showUserResults(false, true);
360  }
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
Shows the pass overview of the scored pass for one ore more users.
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 
)
private

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

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

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

Referenced by showPassOverviewCmd(), and showUserAnswersCmd().

377  : void
378  {
379  $this->tabs->clearTargets();
380  $this->tabs->clearSubTabs();
381 
382  $show_user_results = ilSession::get("show_user_results");
383 
384  if (!is_array($show_user_results) || count($show_user_results) === 0) {
385  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("select_one_user"), true);
386  $this->ctrl->redirect($this, self::CMD_SHOW_PARTICIPANTS);
387  }
388 
389  $template = $this->createUserResults(
390  $show_pass_details,
391  $show_answers,
392  $show_reached_points,
393  $show_user_results
394  );
395 
396  if ($template instanceof ilTemplate) {
397  $this->main_tpl->setVariable("ADM_CONTENT", $template->get());
398  $this->main_tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
399  if ($this->getTestObj()->getShowSolutionAnswersOnly()) {
400  $this->main_tpl->addCss(
401  ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"),
402  "print"
403  );
404  }
405  }
406  }
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(bool $show_pass_details, bool $show_answers, bool $show_reached_points, array $show_user_results)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $objective_parent

ilTestObjectiveOrientedContainer ilParticipantsTestResultsGUI::$objective_parent = null
private

◆ $question_set_config

ilTestQuestionSetConfig ilParticipantsTestResultsGUI::$question_set_config = null
private

◆ $test_access

ilTestAccess ilParticipantsTestResultsGUI::$test_access = null
private

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

Referenced by getTestAccess(), and setTestAccess().

◆ $test_obj

ilObjTest ilParticipantsTestResultsGUI::$test_obj = null
private

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

Referenced by getObject(), getTestObj(), and setTestObj().

◆ CMD_CONFIRM_DELETE_ALL_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_CONFIRM_DELETE_ALL_USER_RESULTS = 'deleteAllUserResults'

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

◆ CMD_CONFIRM_DELETE_SELECTED_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_CONFIRM_DELETE_SELECTED_USER_RESULTS = 'deleteSingleUserResults'

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

◆ CMD_PERFORM_DELETE_ALL_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_PERFORM_DELETE_ALL_USER_RESULTS = 'confirmDeleteAllUserResults'

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

◆ CMD_PERFORM_DELETE_SELECTED_USER_RESULTS

const ilParticipantsTestResultsGUI::CMD_PERFORM_DELETE_SELECTED_USER_RESULTS = 'confirmDeleteSelectedUserData'

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

◆ CMD_SHOW_PARTICIPANTS

const ilParticipantsTestResultsGUI::CMD_SHOW_PARTICIPANTS = 'showParticipants'

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


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