35 protected \ILIAS\Survey\InternalGUIService
$gui;
37 protected \ILIAS\Survey\PrintView\GUIService
$print;
45 protected \ILIAS\DI\UIServices
$ui;
59 protected \ILIAS\Survey\Evaluation\EvaluationGUIRequest
$request;
67 $this->
tabs = $DIC->tabs();
68 $this->
access = $DIC->access();
69 $this->
user = $DIC->user();
70 $this->rbacsystem = $DIC->rbac()->system();
71 $this->tree = $DIC->repositoryTree();
72 $this->
toolbar = $DIC->toolbar();
73 $this->
ui = $DIC->ui();
74 $lng = $DIC->language();
76 $ilCtrl = $DIC->ctrl();
80 $this->
ctrl = $ilCtrl;
81 $this->
object = $a_object;
83 $this->array_panels = array();
85 $this->request = $DIC->survey()->internal()->gui()->evaluation($this->
object)->request();
87 $this->
ctrl->saveParameter($this, [
"appr_id",
"rater_id"]);
88 $this->evaluation_manager = $DIC
94 $DIC->user()->getId(),
95 $this->request->getAppraiseeId(),
96 $this->request->getRaterId()
100 $this->evaluation_manager->getCurrentAppraisee()
103 $this->ui_modifier = $DIC->survey()
106 ->modeUIModifier($this->
object->getMode());
107 $this->print = $DIC->survey()
111 $this->access_manager = $DIC->survey()
115 $this->
object->getRefId(),
116 $DIC->user()->getId()
118 $this->skill_profile_service = $DIC->skills()->profile();
119 $this->gui = $DIC->survey()->internal()->gui();
125 if ($this->
object->getSkillService() && $skmg_set->isActivated()) {
126 $cmd = $this->
ctrl->getCmd(
"competenceEval");
128 $cmd = $this->
ctrl->getCmd(
"evaluation");
131 $next_class = $this->
ctrl->getNextClass($this);
133 $this->log->debug($cmd);
135 switch ($next_class) {
138 $ret = (string) $this->$cmd();
152 if ($this->
object->getSkillService() && $skmg_set->isActivated()) {
153 $ilTabs->addSubTabTarget(
154 "svy_eval_competences",
155 $this->
ctrl->getLinkTarget($this,
"competenceEval"),
156 array(
"competenceEval")
161 $ilTabs->addSubTabTarget(
162 "svy_eval_cumulated",
163 $this->
ctrl->getLinkTarget($this,
"evaluation"),
164 array(
"evaluation",
"checkEvaluationAccess")
168 $ilTabs->addSubTabTarget(
170 $this->
ctrl->getLinkTarget($this,
"evaluationdetails"),
171 array(
"evaluationdetails")
175 $ilTabs->addSubTabTarget(
177 $this->
ctrl->getLinkTarget($this,
"evaluationuser"),
178 array(
"evaluationuser")
182 if ($this->
object->getCalculateSumScore()) {
183 $ilTabs->addSubTabTarget(
185 $this->
ctrl->getLinkTarget($this,
"sumscore"),
195 $this->appr_id = $a_val;
207 if ($this->
object->getAnonymize() === 1 &&
208 $this->evaluation_manager->getAnonEvaluationAccess() === $this->request->getRefId()) {
216 if ($this->
object->getAnonymize() === 1) {
217 $this->evaluation_manager->setAnonEvaluationAccess($this->request->getRefId());
222 if ($this->
object->getAnonymize() === 1) {
224 $surveycode = $this->
object->getUserAccessCode($ilUser->getId());
225 if ($this->
object->isAnonymizedParticipant($surveycode)) {
226 $this->evaluation_manager->setAnonEvaluationAccess($this->request->getRefId());
231 $this->tpl->setVariable(
"TABS",
"");
232 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_svy_svy_evaluation_checkaccess.html",
"components/ILIAS/Survey");
233 $this->tpl->setCurrentBlock(
"adm_content");
234 $this->tpl->setVariable(
"AUTHENTICATION_NEEDED", $this->
lng->txt(
"svy_check_evaluation_authentication_needed"));
235 $this->tpl->setVariable(
"FORM_ACTION", $this->
ctrl->getFormAction($this,
"checkEvaluationAccess"));
236 $this->tpl->setVariable(
"EVALUATION_CHECKACCESS_INTRODUCTION", $this->
lng->txt(
"svy_check_evaluation_access_introduction"));
237 $this->tpl->setVariable(
"VALUE_CHECK", $this->
lng->txt(
"ok"));
238 $this->tpl->setVariable(
"VALUE_CANCEL", $this->
lng->txt(
"cancel"));
239 $this->tpl->setVariable(
"TEXT_SURVEY_CODE", $this->
lng->txt(
"survey_code"));
240 $this->tpl->parseCurrentBlock();
243 $this->evaluation_manager->clearAnonEvaluationAccess();
252 $surveycode = $this->request->getSurveyCode();
253 if ($this->
object->isAnonymizedParticipant($surveycode)) {
254 $this->evaluation_manager->setAnonEvaluationAccess($this->request->getRefId());
257 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"svy_check_evaluation_wrong_key",
true));
270 $ilCtrl->setParameterByClass(
275 $ilCtrl->redirectByClass(
"ilrepositorygui",
"frameset");
289 $finished_ids =
null;
290 if ($this->
object->get360Mode()) {
291 $appr_id = $this->request->getAppraiseeId();
293 $this->
ctrl->redirect($this, $details ?
"evaluationdetails" :
"evaluation");
295 $finished_ids = $this->
object->getFinishedIdsForAppraiseeId($appr_id);
296 if (!count($finished_ids)) {
297 $finished_ids = array(-1);
302 $title_row = array();
303 $do_title = $do_label =
true;
304 switch ($this->request->getExportLabel()) {
306 $title_row[] = $this->
lng->txt(
"label");
311 $title_row[] = $this->
lng->txt(
"title");
316 $title_row[] = $this->
lng->txt(
"title");
317 $title_row[] = $this->
lng->txt(
"label");
320 $title_row[] = $this->
lng->txt(
"question");
321 $title_row[] = $this->
lng->txt(
"question_type");
322 $title_row[] = $this->
lng->txt(
"users_answered");
323 $title_row[] = $this->
lng->txt(
"users_skipped");
324 $title_row[] = $this->
lng->txt(
"mode");
325 $title_row[] = $this->
lng->txt(
"mode_text");
326 $title_row[] = $this->
lng->txt(
"mode_nr_of_selections");
327 $title_row[] = $this->
lng->txt(
"median");
328 $title_row[] = $this->
lng->txt(
"arithmetic_mean");
333 switch ($this->request->getExportFormat()) {
336 $excel->addSheet($this->
lng->txt(
"svy_eval_cumulated"));
337 $excel->setCellArray(array($title_row),
"A1");
338 $excel->setBold(
"A1:" . $excel->getColumnCoord(count($title_row) - 1) .
"1");
341 case self::TYPE_SPSS:
342 $csvfile = array($title_row);
349 foreach ($this->
object->getSurveyQuestions() as $qdata) {
351 $q_res = $q_eval->getResults();
352 $ov_rows = $q_eval->exportResults($q_res, $do_title, $do_label);
354 switch ($this->request->getExportFormat()) {
356 $excel->setActiveSheet(0);
357 foreach ($ov_rows as $row) {
358 foreach ($row as $col => $value) {
359 $excel->setCell($ov_row, $col, $value);
365 case self::TYPE_SPSS:
366 foreach ($ov_rows as $row) {
373 switch ($this->request->getExportFormat()) {
383 ? $this->
lng->txt(
"svy_eval_cumulated")
384 : $this->
lng->txt(
"svy_eval_detail");
386 $surveyname = $this->
object->getTitle() .
" " . $type .
" " . date(
"Y-m-d");
387 $surveyname = preg_replace(
"/\s/",
"_", trim($surveyname));
391 switch ($this->request->getExportFormat()) {
393 $excel->sendToClient($surveyname);
396 case self::TYPE_SPSS:
399 foreach ($csvfile as $csvrow) {
401 $csv .= implode($separator, $csvrow) .
"\n";
420 $question_res = $a_results;
422 if (is_array($question_res)) {
423 $question_res = $question_res[0][1];
426 $question = $question_res->getQuestion();
428 $a_excel->
addSheet($question->getTitle());
436 $kv[$this->
lng->txt(
"title")] = $question->getTitle();
439 $kv[$this->
lng->txt(
"label")] = $question->label;
443 $kv[$this->
lng->txt(
"question")] = $question->getQuestiontext();
451 $kv[$this->
lng->txt(
"users_answered")] = $question_res->getUsersAnswered();
452 $kv[$this->
lng->txt(
"users_skipped")] = $question_res->getUsersSkipped();
456 foreach ($kv as $key => $value) {
457 $a_excel->
setCell($excel_row, 0, $key);
458 $a_excel->
setCell($excel_row++, 1, $value);
483 foreach ($a_results as $row_results) {
484 $row_title = $row_results[0];
486 $a_excel->
setCell($excel_row, 0, $this->
lng->txt(
"row"));
487 $a_excel->
setCell($excel_row++, 1, $row_title);
494 is_array($texts[$row_title] ??
false)
495 ? array(
"" => $texts[$row_title])
503 $a_excel->
setCell($excel_row++, 0, $this->
lng->txt(
"overview"));
507 $cats = $question->getColumns();
508 foreach ($cats->getCategories() as $cat) {
510 $a_excel->
setCell($excel_row, 1 + $counter, $cat->title);
515 foreach ($a_results as $row_results) {
516 $row_title = $row_results[0];
518 $a_excel->
setCell($excel_row, 0, $row_title);
520 $vars = $row_results[1]->getVariables();
522 foreach ($vars as $var) {
523 $a_excel->
setCell($excel_row, ++$counter, $var->abs);
531 $a_excel->
setBold(
"A1:A" . $excel_row);
538 ?array $a_grid =
null,
539 ?array $a_text_answers =
null,
540 bool $a_include_mode =
true 544 if ($a_include_mode) {
560 $kv[$this->
lng->txt(
"arithmetic_mean")] = $a_results->
getMean();
564 foreach ($kv as $key => $value) {
565 $a_excel->
setCell($a_excel_row, 0, $key);
566 $a_excel->
setCell($a_excel_row++, 1, $value);
572 $a_excel->
setColors(
"B" . $a_excel_row .
":E" . $a_excel_row, self::EXCEL_SUBTITLE);
573 $a_excel->
setCell($a_excel_row, 0, $this->
lng->txt(
"svy_categories"));
574 foreach ($a_grid[
"cols"] as $col_idx => $col) {
575 $a_excel->
setCell($a_excel_row, $col_idx + 1, $col);
580 foreach ($a_grid[
"rows"] as $cols) {
581 foreach ($cols as $col_idx => $col) {
582 $a_excel->
setCell($a_excel_row, $col_idx + 1, $col);
589 if ($a_text_answers) {
591 $a_excel->
setCell($a_excel_row, 0, $this->
lng->txt(
"freetext_answers"));
594 if (!is_array($a_text_answers[
""] ??
null)) {
595 $a_excel->
setColors(
"B" . $a_excel_row .
":C" . $a_excel_row, self::EXCEL_SUBTITLE);
596 $a_excel->
setCell($a_excel_row, 1, $this->
lng->txt(
"title"));
597 $a_excel->
setCell($a_excel_row++, 2, $this->
lng->txt(
"answer"));
601 $a_excel->
setColors(
"B" . $a_excel_row .
":B" . $a_excel_row, self::EXCEL_SUBTITLE);
602 $a_excel->
setCell($a_excel_row++, 1, $this->
lng->txt(
"answer"));
605 foreach ($a_text_answers as $var => $items) {
606 foreach ($items as $item) {
607 if (!is_array($a_text_answers[
""] ?? null)) {
608 $a_excel->
setCell($a_excel_row, 1, $var);
609 $a_excel->
setCell($a_excel_row++, 2, $item);
611 $a_excel->
setCell($a_excel_row++, 1, $item);
620 if ($this->request->getExportFormat() !==
'') {
623 $this->
ctrl->redirect($this,
'evaluation');
629 if ($this->request->getExportFormat() !==
'') {
632 $this->
ctrl->redirect($this,
'evaluation');
638 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'use_browser_print_function'),
true);
639 $this->
ctrl->redirect($this,
'evaluation');
648 $ui_fac = $this->gui->ui()->factory();
652 $button = $ui_fac->button()->standard(
655 )->withOnClick($modal->getShowSignal());
665 $ui_fac = $this->gui->ui()->factory();
667 $post_url = $ctrl->
getFormAction($this,
"validateAndSubmitExportForm");
669 $inputs[
"export_format"] = $ui_fac->input()->field()->select(
670 $lng->
txt(
"filetype"),
677 ->withRequired(
true);
679 $inputs[
"export_label"] = $ui_fac->input()->field()->select(
682 "label_only" => $lng->
txt(
"export_label_only"),
683 "title_only" => $lng->
txt(
"export_title_only"),
684 "title_label" => $lng->
txt(
"export_title_label")
688 ->withRequired(
true);
690 $modal = $ui_fac->modal()->roundtrip(
691 $lng->
txt(
"svy_export_format"),
696 ->withSubmitLabel($lng->
txt(
"export"));
708 $ui_request = $this->gui->http()->request();
710 $export_cmd = $request->getExportCmd();
713 if (
"POST" === $ui_request->getMethod()) {
714 $modal = $modal->withRequest($ui_request);
715 $data = $modal->getData();
719 $ctrl->
redirect($this, $export_cmd);
721 switch ($export_cmd) {
726 case "exportDetailData":
730 case "exportEvaluationUser":
731 $toolbar->
addComponent($modal->withOnLoad($modal->getShowSignal()));
739 switch ($export_cmd) {
741 $ctrl->
redirect($this,
"evaluation");
743 case "exportDetailData":
744 $ctrl->
redirect($this,
"evaluationdetails");
746 case "exportEvaluationUser":
747 $ctrl->
redirect($this,
"evaluationuser");
754 if ($this->
object->getSkillService() && $skmg_set->isActivated()) {
772 $ui_factory = $ui->factory();
773 $ui_renderer = $ui->renderer();
775 $this->
lng->loadLanguageModule(
"survey");
777 $this->log->debug(
"check access");
781 if (!$this->
access->checkAccess(
'read',
'', $this->object->getRefId())) {
782 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"));
786 switch ($this->
object->getEvaluationAccess()) {
789 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"));
797 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"));
804 $this->log->debug(
"check access ok");
807 $appr_id = $this->evaluation_manager->getCurrentAppraisee();
808 $ilToolbar->setFormAction($this->
ctrl->getFormAction($this));
811 $eval_tpl =
new ilTemplate(
"tpl.il_svy_svy_evaluation.html",
true,
true,
"components/ILIAS/Survey");
815 $this->ui_modifier->setResultsDetailToolbar(
818 $this->
user->getId(),
822 $this->ui_modifier->setResultsOverviewToolbar(
825 $this->
user->getId(),
833 $dtmpl =
new ilTemplate(
"tpl.il_svy_svy_results_details.html",
true,
true,
"components/ILIAS/Survey/Evaluation");
834 $toc_tpl =
new ilTemplate(
"tpl.svy_results_table_contents.html",
true,
true,
"components/ILIAS/Survey/Evaluation");
835 $this->
lng->loadLanguageModule(
"content");
836 $toc_tpl->setVariable(
"TITLE_TOC", $this->
lng->txt(
'cont_toc'));
839 $finished_ids = $this->evaluation_manager->getFilteredFinishedIds();
842 $listing = $this->gui->listing();
845 foreach ($this->
object->getSurveyQuestions() as $qdata) {
847 $q_res = $q_eval->getResults();
851 $panels = array_merge(
853 $this->ui_modifier->getDetailPanels(
854 $this->object->getSurveyParticipants(),
861 if ($qdata[
"questionblock_id"] &&
862 $qdata[
"questionblock_id"] != $this->last_questionblock_id) {
864 if ($qblock[
"show_blocktitle"]) {
866 $this->
ui->factory()->legacy()->content($qdata[
"questionblock_title"]),
867 "q" . $qdata[
"questionblock_id"]
871 $this->
ui->factory()->legacy()->content(
""),
872 "q" . $qdata[
"questionblock_id"]
875 $this->last_questionblock_id = $qdata[
"questionblock_id"];
877 $anchor_id =
"svyrdq" . $qdata[
"question_id"];
879 $this->
ui->factory()->link()->standard($qdata[
"title"],
"#" . $anchor_id),
880 (string) $qdata[
"question_id"],
881 $qdata[
"questionblock_id"] ?
"q" . $qdata[
"questionblock_id"] :
"0" 887 $toc_tpl->setVariable(
"LIST", $listing->render());
890 $panel_toc = $ui_factory->panel()->standard(
"", $ui_factory->legacy()->content($toc_tpl->get()));
891 $render_toc = $ui_renderer->render($panel_toc);
892 $dtmpl->setVariable(
"PANEL_TOC", $render_toc);
896 $panel_report = $ui_factory->panel()->report($report_title, $panels);
897 $render_report = $ui_renderer->render($panel_report);
898 $dtmpl->setVariable(
"PANEL_REPORT", $render_report);
901 $eval_tpl->setVariable(
'DETAIL', $dtmpl->get());
908 $eval_tpl->setVariable(
'CUMULATED', $table_gui->getHTML());
917 foreach ($path_full as
$data) {
918 $path .=
" » ";
919 $path .= $data[
'title'];
926 $this->
lng->txt(
"svy_results") => !$details
927 ? $this->
lng->txt(
"svy_eval_cumulated")
928 : $this->
lng->txt(
"svy_eval_detail"),
931 $eval_tpl->setCurrentBlock(
"print_header_bl");
932 foreach ($props as $key => $value) {
933 $eval_tpl->setVariable(
"HEADER_PROP_KEY", $key);
934 $eval_tpl->setVariable(
"HEADER_PROP_VALUE", $value);
935 $eval_tpl->parseCurrentBlock();
938 $this->log->debug(
"end");
940 $this->tpl->setContent($eval_tpl->get());
953 bool $quoteAll =
false,
954 string $separator =
";" 956 $resultarray = array();
957 foreach ($row as $rowindex => $entry) {
958 if (is_array($entry)) {
959 $entry = implode(
"/", $entry);
965 if (strpos($entry ??
"",
"\"") !==
false) {
966 $entry = str_replace(
"\"",
"\"\"", (
string) $entry);
969 if (strpos($entry ??
"", $separator) !==
false) {
973 $entry = str_replace(chr(13) . chr(10), chr(10), (
string) $entry);
976 $resultarray[$rowindex] =
"\"" . $entry .
"\"";
979 $resultarray[$rowindex] = $entry;
989 $title_row = $title_row2 = array();
990 $title_row[] = $this->
lng->txt(
"lastname");
991 $title_row[] = $this->
lng->txt(
"firstname");
992 $title_row[] = $this->
lng->txt(
"login");
993 $title_row[] = $this->
lng->txt(
'workingtime');
994 $title_row[] = $this->
lng->txt(
'survey_results_finished');
1000 if ($this->
object->canExportSurveyCode()) {
1001 $title_row[] = $this->
lng->txt(
"codes");
1005 $questions = array();
1007 foreach ($this->
object->getSurveyQuestions() as $qdata) {
1009 $q_res = $q_eval->getResults();
1011 $questions[$qdata[
"question_id"]] = array($q_eval, $q_res);
1013 $question = is_array($q_res)
1014 ? $q_res[0][1]->getQuestion()
1015 : $q_res->getQuestion();
1017 $do_title = $do_label =
true;
1018 switch ($this->request->getExportLabel()) {
1020 $title_row[] = $question->label;
1026 $title_row[] = $question->getTitle();
1032 $title_row[] = $question->getTitle();
1033 $title_row2[] = $question->label;
1037 $q_eval->getUserSpecificVariableTitles($title_row, $title_row2, $do_title, $do_label);
1043 $rows[] = $title_row;
1044 if (implode(
"", $title_row2)) {
1045 $rows[] = $title_row2;
1051 $finished_ids =
null;
1052 if ($this->
object->get360Mode()) {
1053 $appr_id = $this->request->getAppraiseeId();
1055 $this->
ctrl->redirect($this,
"evaluationuser");
1057 $finished_ids = $this->
object->getFinishedIdsForAppraiseeId($appr_id);
1058 if (!count($finished_ids)) {
1059 $finished_ids = array(-1);
1064 $participants = $this->access_manager->canReadResultOfParticipants($finished_ids);
1066 foreach ($participants as $user) {
1070 $row[] = trim($user[
"lastname"] ??
"")
1072 : ($user[
"name"] ??
"");
1073 $row[] = $user[
"firstname"] ??
"";
1074 $row[] = $user[
"login"] ??
"";
1076 if ($this->
object->canExportSurveyCode()) {
1080 $row[] = $this->
object->getWorkingtimeForParticipant(
$user_id);
1082 if ($user[
"finished"] ??
false) {
1084 $row[] = ($this->request->getExportFormat() === self::TYPE_XLS)
1091 foreach ($questions as $item) {
1095 $q_eval->addUserSpecificResults($row,
$user_id, $q_res);
1102 $surveyname = $this->
object->getTitle() .
" " . $this->
lng->txt(
"svy_eval_user") .
" " . date(
"Y-m-d");
1103 $surveyname = preg_replace(
"/\s/",
"_", trim($surveyname));
1106 switch ($this->request->getExportFormat()) {
1107 case self::TYPE_XLS:
1109 $excel->addSheet($this->
lng->txt(
"svy_eval_user"));
1111 foreach ($rows as $row_idx => $row) {
1112 foreach ($row as $col_idx => $col) {
1113 $excel->setCell($row_idx + 1, $col_idx, $col);
1116 $excel->setBold(
"A1:" . $excel->getColumnCoord(count($row) - 1) .
"1");
1119 $excel->sendToClient($surveyname);
1122 case self::TYPE_SPSS:
1125 foreach ($rows as $csvrow) {
1126 $csvrow = str_replace(
"\n",
" ", $this->
processCSVRow($csvrow,
true, $separator));
1127 $csv .= implode($separator, $csvrow) .
"\n";
1143 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_permission"),
true);
1144 $this->
ctrl->redirectByClass(
"ilObjSurveyGUI",
"infoScreen");
1150 if ($this->
object->get360Mode()) {
1157 $ilToolbar->addSeparator();
1159 $pv = $this->print->resultsDetails($this->
object->getRefId());
1160 $modal_elements = $pv->getModalElements(
1161 $this->
ctrl->getLinkTargetByClass(
1162 "ilSurveyEvaluationGUI",
1163 "printResultsPerUserSelection" 1166 $ilToolbar->addComponent($modal_elements->button);
1167 $ilToolbar->addComponent($modal_elements->modal);
1169 $data = $this->evaluation_manager->getUserSpecificResults();
1173 $table_gui->setData(
$data);
1174 $this->tpl->setContent($table_gui->getHTML());
1187 $ilTabs->activateSubTab(
"svy_eval_competences");
1188 $ilTabs->activateTab(
"svy_results");
1190 $ilToolbar->setFormAction($this->
ctrl->getFormAction($this,
"competenceEval"));
1194 if ($appr_id === 0) {
1195 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"svy_no_appraisees_found"));
1199 $this->ui_modifier->setResultsCompetenceToolbar(
1202 $this->
user->getId()
1206 $eval_modes = array();
1210 $opts = $sskill->getAllAssignedSkillsAsOptions();
1212 foreach ($opts as
$id => $o) {
1213 $idarr = explode(
":",
$id);
1214 $skills[
$id] = array(
"id" =>
$id,
"title" => $o,
"profiles" => array(),
1215 "base_skill" => $idarr[0],
"tref_id" => $idarr[1]);
1220 $profiles = $this->skill_profile_service->getProfilesOfUser($appr_id);
1221 foreach ($profiles as $p) {
1222 $prof_levels = $this->skill_profile_service->getSkillLevels($p->getId());
1223 foreach ($prof_levels as $pl) {
1224 if (isset($skills[$pl->getBaseSkillId() .
":" . $pl->getTrefId()])) {
1225 $skills[$pl->getBaseSkillId() .
":" . $pl->getTrefId()][
"profiles"][] =
1228 $eval_modes[
"gap_" . $p->getId()] =
1229 $lng->
txt(
"svy_gap_analysis") .
": " . $p->getTitle();
1236 foreach ($skills as $sk) {
1237 if (count($sk[
"profiles"]) === 0) {
1238 $eval_modes[
"skills_of_survey"] = $lng->
txt(
"svy_all_survey_competences");
1243 $comp_eval_mode = $this->request->getCompEvalMode();
1245 if (!isset($eval_modes[$comp_eval_mode])) {
1246 $comp_eval_mode = key($eval_modes);
1247 $ilCtrl->setParameter($this,
"comp_eval_mode", $comp_eval_mode);
1250 $ilCtrl->saveParameter($this,
"comp_eval_mode");
1254 $mode_sel->setValue($comp_eval_mode);
1255 $ilToolbar->addInputItem($mode_sel,
true);
1257 $ilToolbar->addFormButton($lng->
txt(
"select"),
"competenceEval");
1260 $rater = $this->evaluation_manager->getCurrentRater();
1261 if ($rater !==
"") {
1262 if (strpos($rater ??
"",
"u") === 0) {
1263 $rater = substr($rater, 1);
1265 $pskills_gui->setTriggerUserFilter([$rater]);
1268 if (strpos($comp_eval_mode ??
"",
"gap_") === 0) {
1270 $profile_id = (
int) substr($comp_eval_mode, 4);
1272 $pskills_gui->setProfileId($profile_id);
1273 $pskills_gui->setGapAnalysisActualStatusModePerObject($survey->getId(), $lng->
txt(
"skmg_eval_type_1"));
1274 if ($survey->getFinishedIdForAppraiseeIdAndRaterId($appr_id, $appr_id) > 0) {
1276 $self_levels = array();
1277 foreach ($sskill->determineSkillLevelsForAppraisee($appr_id,
true) as $sl) {
1278 $self_levels[$sl[
"base_skill_id"]][$sl[
"tref_id"]] = $sl[
"new_level_id"] ?? 0;
1280 $pskills_gui->setGapAnalysisSelfEvalLevels($self_levels);
1282 $html = $pskills_gui->getGapAnalysisHTML($appr_id);
1284 $pskills_gui->setGapAnalysisActualStatusModePerObject($survey->getId(), $lng->
txt(
"skmg_eval_type_1"));
1285 if ($survey->getFinishedIdForAppraiseeIdAndRaterId($appr_id, $appr_id) > 0) {
1287 $self_levels = array();
1288 foreach ($sskill->determineSkillLevelsForAppraisee($appr_id,
true) as $sl) {
1289 $self_levels[$sl[
"base_skill_id"]][$sl[
"tref_id"]] = $sl[
"new_level_id"] ?? 0;
1291 $pskills_gui->setGapAnalysisSelfEvalLevels($self_levels);
1294 foreach ($skills as $skill) {
1296 "base_skill_id" => (
int) $skill[
"base_skill"],
1297 "tref_id" => (
int) $skill[
"tref_id"]
1300 $html = $pskills_gui->getGapAnalysisHTML($appr_id, $sk);
1311 return $this->
access->checkRbacOrPositionPermissionAccess(
'read_results',
'access_results', $this->
object->getRefId());
1321 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_permission"),
true);
1322 $this->
ctrl->redirectByClass(
"ilObjSurveyGUI",
"infoScreen");
1325 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"svy_max_sum_score") .
": " . $this->
object->getMaxSumScore());
1328 $this->
lng->txt(
"print"),
1330 )->onClick(
"window.print(); return false;")->toToolbar();
1332 $finished_ids =
null;
1337 $this->tpl->setContent($table_gui->getHTML());
1344 ?array $a_finished_ids =
null 1347 foreach ($this->access_manager->canReadResultOfParticipants($a_finished_ids) as $p) {
1348 $sum_scores[$p[
"active_id"]] = [
1349 "username" => $p[
"sortname"],
1354 foreach ($this->
object->getSurveyQuestions() as $qdata) {
1356 foreach ($q_eval->getSumScores() as $finished_id => $sum_score) {
1357 if ($sum_score ===
null) {
1358 $sum_scores[$finished_id][
"score"] =
null;
1360 if ($sum_scores[$finished_id][
"score"] !==
null) {
1361 $sum_scores[$finished_id][
"score"] += (
int) $sum_score;
1373 $view = $this->print->resultsOverview($this->
object->getRefId());
1382 $this->
ctrl->setParameterByClass(
1383 "ilSurveyEvaluationGUI",
1385 $this->request->getVW()
1387 $this->
ctrl->setParameterByClass(
1388 "ilSurveyEvaluationGUI",
1390 $this->request->getCP()
1392 $view = $this->print->resultsDetails($this->
object->getRefId());
1398 $view = $this->print->resultsDetails($this->
object->getRefId());
1399 $view->sendPrintView();
1407 $view = $this->print->resultsPerUser($this->
object->getRefId());
1413 $view = $this->print->resultsPerUser($this->
object->getRefId());
1414 $view->sendPrintView();
This describes commonalities between the different modals.
static array static setUseRelativeDates(bool $a_status)
set use relative dates
getFormAction(object $a_gui_obj, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
getExportGrid($a_results)
Get grid data.
printResultsDetailsSelection()
setAppraiseeId(int $a_val)
setEvalSubtabs()
Set the tabs for the evaluation output.
evaluationuser()
Print the survey evaluation for a selected user.
static getLogger(string $a_component_id)
Get component logger.
const EVALUATION_ACCESS_OFF
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
exportResultsDetailsExcel(ilExcel $a_excel, SurveyQuestionEvaluation $a_eval, $a_results, bool $a_do_title, bool $a_do_label)
Export details (excel only)
Skill management settings.
const EVALUATION_ACCESS_PARTICIPANTS
cancelEvaluationAccess()
Cancels the input of the survey access code for evaluation access.
activateSubTab(string $a_id)
ILIAS Skill Service SkillProfileService $skill_profile_service
static _getQuestionblock(int $questionblock_id)
get question block properties
buildExportButtonAndModal(string $export_cmd)
setContent(string $a_html)
Sets content for standard template.
static _getQuestionTypeName(string $type_tag)
Return the translation for a given question type.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Survey Evaluation EvaluationManager $evaluation_manager
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
printResultsPerUserSelection()
ILIAS Survey Access AccessManager $access_manager
checkEvaluationAccess()
Checks the evaluation access after entering the survey access code.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getASCIIFilename(string $a_filename)
parseResultsToExcel(ilExcel $a_excel, ilSurveyEvaluationResults $a_results, int &$a_excel_row, ?array $a_grid=null, ?array $a_text_answers=null, bool $a_include_mode=true)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
hasResultsAccess()
Check if user can view results granted by rbac or positions.
Personal skills GUI class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setColors(string $a_coords, string $a_background, ?string $a_font=null)
Set cell(s) colors.
setCell(int $a_row, int $col, $value, ?string $datatype=null, bool $disable_strip_tags_for_strings=false)
Set cell value.
setBold(string $a_coords)
Set cell(s) to bold.
static _instanciateQuestionEvaluation(int $question_id, ?array $a_finished_ids=null)
exportCumulatedResults(int $details=0)
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
validateAndSubmitExportForm()
getCoordByColumnAndRow(int $pColumn=1, int $pRow=1)
Get cell coordinate (e.g.
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
ILIAS Survey Mode UIModifier $ui_modifier
checkAnonymizedEvaluationAccess()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addSheet(string $a_name, bool $a_activate=true)
Add sheet.
setSumScores(array $scores)
ILIAS Survey Evaluation EvaluationGUIRequest $request
evaluation(int $details=0)
static _hasEvaluationAccess(int $a_obj_id, int $user_id)
processCSVRow(array $row, bool $quoteAll=false, string $separator=";")
Processes an array as a CSV row and converts the array values to correct CSV values.
const EVALUATION_ACCESS_ALL
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
Survey evaluation graphical output.
getSumScores(?array $a_finished_ids=null)
ILIAS Survey InternalGUIService $gui
evaluationdetails()
Show the detailed evaluation.
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
sumscore()
Show sum score table.
ILIAS Survey PrintView GUIService $print
printResultsOverviewSelection()
ilGlobalTemplateInterface $tpl
__construct(ilObjSurvey $a_object)
getTextAnswers($a_results)
Get text answers.