3 declare(strict_types=1);
47 $ts_results = new \ilRadioGroupInputGUI(
$lng->txt(
"survey_360_results"),
"ts_res");
51 $option->setInfo(
$lng->txt(
"survey_360_results_none_info"));
52 $ts_results->addOption($option);
54 $option = new \ilRadioOption(
55 $lng->txt(
"survey_360_results_own"),
58 $option->setInfo(
$lng->txt(
"survey_360_results_own_info"));
59 $ts_results->addOption($option);
61 $items[] = $ts_results;
74 $cb = new \ilCheckboxInputGUI(
$lng->txt(
"survey_notification_target_group"),
"remind_appraisees");
75 $cb->setOptionTitle(
$lng->txt(
"survey_360_appraisees"));
76 $cb->setInfo(
$lng->txt(
"survey_360_appraisees_remind_info"));
78 $cb->setChecked(in_array(
86 $cb = new \ilCheckboxInputGUI(
"",
"remind_raters");
87 $cb->setOptionTitle(
$lng->txt(
"survey_360_raters"));
88 $cb->setInfo(
$lng->txt(
"survey_360_raters_remind_info"));
90 $cb->setChecked(in_array(
104 if ($form->
getInput(
"remind_appraisees") && $form->
getInput(
"remind_raters")) {
106 } elseif ($form->
getInput(
"remind_appraisees")) {
108 } elseif ($form->
getInput(
"remind_raters")) {
162 $lng = $this->service->gui()->lng();
163 $ctrl = $this->service->gui()->ctrl();
164 $req = $this->service->gui()->evaluation($survey)->request();
166 $evaluation_manager = $this->service->domain()->evaluation(
169 $req->getAppraiseeId(),
174 if (!$evaluation_manager->isMultiParticipantsView()) {
175 $raters = $evaluation_manager->getSelectableRaters();
177 if (count($raters) > 0) {
179 $options[
"-"] =
$lng->txt(
"svy_all_raters");
180 foreach ($raters as $rater) {
181 $options[$rater[
"user_id"]] = $rater[
"name"];
184 $rat = new \ilSelectInputGUI(
$lng->txt(
"svy_rater"),
"rater_id");
185 $rat->setOptions($options);
186 $rat->setValue($evaluation_manager->getCurrentRater());
190 $this->gui->lng()->txt(
"svy_select_rater"),
192 )->submit()->toToolbar(
false, $toolbar);
222 $lng = $this->service->gui()->lng();
224 if (is_array($a_results)) {
225 $answers = $a_results[0][1]->getAnswers();
226 $q = $a_results[0][1]->getQuestion();
229 $answers = $a_results->getAnswers();
230 $q = $a_results->getQuestion();
233 if (!in_array(
$q->getQuestionType(), [
234 "SurveySingleChoiceQuestion",
235 "SurveyMultipleChoiceQuestion",
236 "SurveyMetricQuestion",
247 $a_tpl = new \ilTemplate(
"tpl.svy_results_details_table.html",
true,
true,
"Modules/Survey/Evaluation");
251 if ($request->getShowTable()) {
254 $a_tpl->setCurrentBlock(
"grid_col_header_bl");
255 $a_tpl->setVariable(
"COL_HEADER",
$lng->txt(
"svy_rater"));
256 $a_tpl->parseCurrentBlock();
259 $a_tpl->setCurrentBlock(
"grid_col_header_bl");
260 $a_tpl->setVariable(
"COL_HEADER",
$lng->txt(
"date"));
261 $a_tpl->parseCurrentBlock();
264 $a_tpl->setCurrentBlock(
"grid_col_header_bl");
265 $a_tpl->setVariable(
"COL_HEADER",
$lng->txt(
"answers"));
266 $a_tpl->parseCurrentBlock();
268 $condensed_answers = [];
269 foreach ($answers as $answer) {
270 $condensed_answers[$answer->active_id][
"tstamp"] = $answer->tstamp;
271 $condensed_answers[$answer->active_id][
"active_id"] = $answer->active_id;
273 $condensed_answers[$answer->active_id][
"value"][] = $answer->value;
274 $condensed_answers[$answer->active_id][
"text"] = $answer->text;
278 foreach ($condensed_answers as $answer) {
280 $a_tpl->setCurrentBlock(
"grid_col_bl");
281 $a_tpl->setVariable(
"COL_CAPTION",
" ");
282 $a_tpl->parseCurrentBlock();
290 $a_tpl->setCurrentBlock(
"grid_col_bl");
291 $a_tpl->setVariable(
"COL_CAPTION", $part_caption);
292 $a_tpl->parseCurrentBlock();
295 $a_tpl->setCurrentBlock(
"grid_col_bl");
296 $date = new \ilDate($answer[
"tstamp"],
IL_CAL_UNIX);
301 $a_tpl->parseCurrentBlock();
304 $a_tpl->setCurrentBlock(
"grid_col_bl");
305 if (
$q->getQuestionType() ===
"SurveyTextQuestion") {
308 $a_results->getScaleText($answer[
"text"])
311 $scale_texts = array_map(
static function ($v) use ($a_results):
string {
312 return $a_results->getScaleText($v);
313 }, $answer[
"value"]);
316 implode(
", ", $scale_texts)
319 $a_tpl->parseCurrentBlock();
321 $a_tpl->touchBlock(
"grid_row_bl");
323 $ret = $a_tpl->get();
326 foreach ($answers as $answer) {
329 $cats =
$q->getColumns();
330 foreach ($cats->getCategories() as $cat) {
331 $a_tpl->touchBlock(
"grid_col_head_center");
332 $a_tpl->setCurrentBlock(
"grid_col_header_bl");
333 $a_tpl->setVariable(
"COL_HEADER", $cat->title);
334 $a_tpl->parseCurrentBlock();
337 $cats_rows =
$q->getRows();
340 foreach ($cats_rows->getCategories() as $cat) {
341 $a_tpl->setCurrentBlock(
"grid_col_bl");
342 $a_tpl->setVariable(
"COL_CAPTION", $cat->title);
343 $a_tpl->parseCurrentBlock();
345 $r = current($a_results);
346 $row_answers =
$r[1]->getAnswers();
347 $user_answers = null;
348 foreach ($row_answers as $ra) {
349 if ($ra->active_id == $answer->active_id) {
354 foreach ($cats->getCategories() as $catr) {
355 if ($user_answers && $user_answers->value == $catr->scale) {
356 $a_tpl->touchBlock(
"grid_col_center");
357 $a_tpl->setCurrentBlock(
"grid_col_bl");
358 $a_tpl->setVariable(
"COL_CAPTION",
"X");
360 $a_tpl->setCurrentBlock(
"grid_col_bl");
361 $a_tpl->setVariable(
"COL_CAPTION",
" ");
364 $a_tpl->parseCurrentBlock();
367 $a_tpl->touchBlock(
"grid_row_bl");
375 $part_caption = $participant[
"sortname"];
380 $a_tpl->setVariable(
"HEADER", $part_caption);
381 $ret .= $a_tpl->get();
382 $a_tpl = new \ilTemplate(
"tpl.svy_results_details_table.html",
true,
true,
"Modules/Survey/Evaluation");
391 foreach ($participants as $part) {
392 if ((
int) $part[
"active_id"] === $active_id) {
401 return $part_array[
"sortname"];
getSurveySettingsResults(\ilObjSurvey $survey, InternalGUIService $ui_service)
getSurveySettingsReminderTargets(\ilObjSurvey $survey, InternalGUIService $ui_service)
Survey internal ui service.
getCaptionForParticipant(array $part_array)
setValuesFromForm(\ilObjSurvey $survey, \ilPropertyFormGUI $form)
getPanelChart(\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addRaterSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
Add rater selection to toolbar.
getPanelTable(array $participants, \ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
const NOTIFICATION_APPRAISEES
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
getParticipantByActiveId(array $participants, int $active_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
set360Results(int $a_value)
getPanelText(\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval, \ilSurveyEvaluationResults $question_res)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
catch(\Exception $e) $req
setReminderTarget(int $a_value)
addApprSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
const NOTIFICATION_APPRAISEES_AND_RATERS
addExportAndPrintButton(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, bool $details)
setResultsDetailToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
setResultsCompetenceToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
const NOTIFICATION_RATERS
static setUseRelativeDates(bool $a_status)
set use relative dates
getSurveySettingsGeneral(\ilObjSurvey $survey)