31 protected \ILIAS\Survey\InternalGUIService
$gui;
33 protected \ILIAS\Survey\Evaluation\EvaluationGUIRequest
$request;
37 protected \ilLanguage
$lng;
50 $this->survey = new \ilObjSurvey($this->ref_id);
51 $this->access_manager =
$DIC->survey()
54 ->access($this->ref_id,
$DIC->user()->getId());
55 $this->request =
$DIC->survey()
58 ->evaluation($this->survey)
60 $this->evaluation_manager =
$DIC->survey()
65 $DIC->user()->getId(),
66 $this->request->getAppraiseeId(),
67 $this->request->getRaterId()
69 $this->gui =
$DIC->survey()
72 $this->tree =
$DIC->repositoryTree();
89 $form = new \ilPropertyFormGUI();
91 $radg = new \ilRadioGroupInputGUI(
$lng->
txt(
"svy_selection"),
"print_selection");
92 $radg->setValue(
"all");
93 $op1 = new \ilRadioOption(
$lng->
txt(
"svy_all_participants"),
"all");
94 $radg->addOption($op1);
95 $op2 = new \ilRadioOption(
$lng->
txt(
"svy_selected_participants"),
"selected");
96 $radg->addOption($op2);
98 $nl = new \ilNestedListInputGUI(
"",
"active_ids");
99 $op2->addSubItem($nl);
101 foreach ($this->access_manager->canReadResultOfParticipants() as $participant) {
103 $participant[
"active_id"],
104 $participant[
"fullname"],
111 $form->addItem($radg);
112 $form->addCommandButton(
"printResultsPerUser",
$lng->
txt(
"print_view"));
114 $form->setTitle(
$lng->
txt(
"svy_print_selection"));
115 $form->setFormAction($ilCtrl->getFormActionByClass(
116 "ilSurveyEvaluationGUI",
117 "printResultsPerUser"
127 $data = $this->evaluation_manager->getUserSpecificResults();
129 $selection = $this->request->getPrintSelection();
130 $active_ids = $this->request->getActiveIds();
132 $table_gui = new \ilSurveyResultsUserTableGUI(
null,
'');
134 foreach (
$data as $active_id =>
$d) {
135 if ($selection ===
"all" || in_array($active_id, $active_ids)) {
136 $filtered_data[$active_id] =
$d;
140 $table_gui->setData($filtered_data);
143 $table_gui->getHTML();
150 $head =
"<h2>" . $this->survey->getTitle() .
"</h2>\n";
152 $path_full = $this->tree->getPathFull($this->survey->getRefId());
153 foreach ($path_full as
$data) {
154 $path .=
" » ";
161 $this->lng->txt(
"path") =>
$path,
165 $f = $this->gui->ui()->factory();
166 $r = $this->gui->ui()->renderer();
167 $l =
$f->listing()->descriptive($props);
169 return $head . $r->render($l);
getSelectionForm()
@inheritDoc
ILIAS Survey Access AccessManager $access_manager
ILIAS Survey Evaluation EvaluationManager $evaluation_manager
ILIAS Survey Evaluation EvaluationGUIRequest $request
ILIAS Survey InternalGUIService $gui
getTemplateInjectors()
@inheritDoc
__construct(\ilLanguage $lng, \ilCtrl $ctrl, int $ref_id)
Class ilCtrl provides processing control methods.
static setUseRelativeDates(bool $a_status)
set use relative dates
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
special template class to simplify handling of ITX/PEAR
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...