5 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
20 public function __construct($a_parent_obj, $a_parent_cmd, $a_survey)
24 $this->ctrl = $DIC->ctrl();
25 $this->lng = $DIC->language();
27 $lng = $DIC->language();
29 $this->survey = $a_survey;
31 parent::__construct($a_parent_obj, $a_parent_cmd);
35 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
38 include_once(
"./Modules/Survey/classes/class.ilSurveySkillThresholds.php");
40 $this->thresholds = $this->skill_thres->getThresholds();
42 $this->
addColumn($this->lng->txt(
"survey_skill"));
43 $this->
addColumn($this->lng->txt(
"survey_skill_nr_q"));
44 $this->
addColumn($this->lng->txt(
"survey_skill_max_scale_points"));
45 $this->
addColumn($this->lng->txt(
"survey_up_to_x_points"));
46 $this->
addColumn($this->lng->txt(
"actions"));
63 include_once(
"./Modules/Survey/classes/class.ilSurveySkill.php");
65 $opts = $sskill->getAllAssignedSkillsAsOptions();
67 foreach ($opts as $k => $o) {
68 $v = explode(
":", $k);
70 $question_ids = $sskill->getQuestionsForSkill($v[0], $v[1]);
71 $scale_sum = $sskill->determineMaxScale($v[0], $v[1]);
74 "base_skill" => $v[0],
76 "nr_of_q" => count($question_ids),
77 "scale_sum" => $scale_sum
93 $ilCtrl->setParameter($this->parent_obj,
"sk_id", $a_set[
"base_skill"]);
94 $ilCtrl->setParameter($this->parent_obj,
"tref_id", $a_set[
"tref_id"]);
96 $this->tpl->setVariable(
100 $path = $this->skill_tree->getSkillTreePath($a_set[
"base_skill"], $a_set[
"tref_id"]);
101 $path_nodes =
array();
102 foreach (
$path as $p) {
103 if ($p[
"child"] > 1 && $p[
"skill_id"] != $a_set[
"base_skill"]) {
107 $this->tpl->setVariable(
"PATH", implode($path_nodes,
" > "));
111 $this->tpl->setVariable(
"NR_OF_QUESTIONS", $a_set[
"nr_of_q"]);
112 $this->tpl->setVariable(
"MAX_SCALE_POINTS", $a_set[
"scale_sum"]);
113 $this->tpl->setVariable(
"CMD",
$ilCtrl->getLinkTarget($this->parent_obj,
"listSkillThresholds"));
114 $this->tpl->setVariable(
"ACTION",
$lng->txt(
"edit"));
116 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
118 $ld = $bs->getLevelData();
119 foreach ($ld as
$l) {
120 $this->tpl->setCurrentBlock(
"points");
121 $this->tpl->setVariable(
"LEV", $l[
"title"]);
123 $tr = $this->thresholds[$l[
"id"]][$a_set[
"tref_id"]];
124 if ((
int) $tr != 0) {
125 $this->tpl->setVariable(
"THRESHOLD", (
int) $tr);
127 $this->tpl->setVariable(
"THRESHOLD",
"");
129 $this->tpl->parseCurrentBlock();
TableGUI class for skill list in survey.
__construct($a_parent_obj, $a_parent_cmd, $a_survey)
Constructor.
fillRow($a_set)
Fill table row.
Skill/Competence handling in surveys.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Skill tresholds for 360 surveys.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.