ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSurveySkillChangesTableGUI.php
Go to the documentation of this file.
1<?php
2
24{
27 protected array $appraisee;
29
30 public function __construct(
31 object $a_parent_obj,
32 string $a_parent_cmd,
33 ilObjSurvey $a_survey,
34 array $a_appraisee
35 ) {
36 global $DIC;
37
38 $this->ctrl = $DIC->ctrl();
39 $this->lng = $DIC->language();
40 $ilCtrl = $DIC->ctrl();
41 $lng = $DIC->language();
42
43 $this->survey = $a_survey;
44 $this->appraisee = $a_appraisee;
45
46 $this->survey_skill = new ilSurveySkill($a_survey);
47 $this->thresholds = new ilSurveySkillThresholds($a_survey);
48
49 parent::__construct($a_parent_obj, $a_parent_cmd);
51
52 $this->setTitle($lng->txt(""));
53 $this->setLimit(9999);
54 $this->disable("footer");
55
56 $this->addColumn($this->lng->txt("survey_skill"));
57 $this->addColumn($this->lng->txt("survey_sum_of_means"));
58 $this->addColumn($this->lng->txt("survey_reached_level"));
59
60 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
61 $this->setRowTemplate("tpl.survey_skill_change.html", "components/ILIAS/Survey");
62 }
63
64 public function getSkillLevelsForAppraisee(): void
65 {
66 $sskill = new ilSurveySkill($this->survey);
67
68 if ($this->survey->get360Mode()) {
69 $new_levels = $sskill->determineSkillLevelsForAppraisee($this->appraisee["user_id"]);
70 } else { //Svy self evaluation mode.
71 $new_levels = $sskill->determineSkillLevelsForAppraisee(ilObjUser::getUserIdByLogin($this->appraisee["login"]), true);
72 }
73
74 $this->setData($new_levels);
75 }
76
77 protected function fillRow(array $a_set): void
78 {
80 //var_dump($a_set);
81 $this->tpl->setVariable("SKILL", $a_set["skill_title"]);
82 $this->tpl->setVariable("MEAN_SUM", $a_set["mean_sum"]);
83 $this->tpl->setVariable("NEW_LEVEL", $a_set["new_level"]);
84 }
85}
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 getUserIdByLogin(string $a_login)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillRow(array $a_set)
Standard Version of Fill Row.
__construct(object $a_parent_obj, string $a_parent_cmd, ilObjSurvey $a_survey, array $a_appraisee)
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
ilLanguage $lng
disable(string $a_module_name)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26