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 $button->setCaption(
"svy_select_rater");
191 $button->setCommand($ctrl->getCmd());
221 $lng = $this->service->gui()->lng();
223 if (is_array($a_results)) {
224 $answers = $a_results[0][1]->getAnswers();
225 $q = $a_results[0][1]->getQuestion();
228 $answers = $a_results->getAnswers();
229 $q = $a_results->getQuestion();
232 if (!in_array($q->getQuestionType(), [
233 "SurveySingleChoiceQuestion",
234 "SurveyMultipleChoiceQuestion",
235 "SurveyMetricQuestion",
246 $a_tpl = new \ilTemplate(
"tpl.svy_results_details_table.html",
true,
true,
"Modules/Survey/Evaluation");
250 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();
327 foreach ($answers as $answer) {
331 $cats = $q->getColumns();
332 foreach ($cats->getCategories() as $cat) {
333 $a_tpl->touchBlock(
"grid_col_head_center");
334 $a_tpl->setCurrentBlock(
"grid_col_header_bl");
335 $a_tpl->setVariable(
"COL_HEADER", $cat->title);
336 $a_tpl->parseCurrentBlock();
339 $cats_rows = $q->getRows();
342 foreach ($cats_rows->getCategories() as $cat) {
343 $a_tpl->setCurrentBlock(
"grid_col_bl");
344 $a_tpl->setVariable(
"COL_CAPTION", $cat->title);
345 $a_tpl->parseCurrentBlock();
347 $r = current($a_results);
348 $row_answers = $r[1]->getAnswers();
349 $user_answers = null;
350 foreach ($row_answers as $ra) {
351 if ($ra->active_id == $answer->active_id) {
356 foreach ($cats->getCategories() as $catr) {
357 if ($user_answers && $user_answers->value == $catr->scale) {
358 $a_tpl->touchBlock(
"grid_col_center");
359 $a_tpl->setCurrentBlock(
"grid_col_bl");
360 $a_tpl->setVariable(
"COL_CAPTION",
"X");
362 $a_tpl->setCurrentBlock(
"grid_col_bl");
363 $a_tpl->setVariable(
"COL_CAPTION",
" ");
366 $a_tpl->parseCurrentBlock();
369 $a_tpl->touchBlock(
"grid_row_bl");
377 $part_caption = $participant[
"sortname"];
382 $a_tpl->setVariable(
"HEADER", $part_caption);
383 $ret .= $a_tpl->get();
384 $a_tpl = new \ilTemplate(
"tpl.svy_results_details_table.html",
true,
true,
"Modules/Survey/Evaluation");
393 foreach ($participants as $part) {
394 if ((
int) $part[
"active_id"] === $active_id) {
403 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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)