ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSkillSelfEvalSkillTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Table/classes/class.ilTable2GUI.php");
5
15{
16
20 function __construct($a_parent_obj, $a_parent_cmd, $a_sn_id, $a_se = null)
21 {
22 global $ilCtrl, $lng, $ilAccess, $lng;
23
24 $this->sn_id = $a_sn_id;
25 if ($a_se != null)
26 {
27 $this->se = $a_se;
28 $this->levels = $this->se->getLevels();
29 }
30
31 // build title
32 include_once("./Services/Skill/classes/class.ilSkillTree.php");
33 $stree = new ilSkillTree();
34 $path = $stree->getPathFull($this->sn_id);
35 $title = $sep = "";
36 foreach ($path as $p)
37 {
38 if ($p["type"] != "skrt")
39 {
40 $title.= $sep.$p["title"];
41 $sep = " > ";
42 }
43 }
44
45 parent::__construct($a_parent_obj, $a_parent_cmd);
46 $this->setData($this->getLevels());
47 $this->setTitle($title);
48 $this->setLimit(9999);
49
50 $this->addColumn($this->lng->txt("skmg_your_self_evaluation"));
51 $this->addColumn($this->lng->txt("skmg_skill_level"));
52
53 $this->setEnableHeader(true);
54// $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
55 $this->setRowTemplate("tpl.self_eval_row.html", "Services/Skill");
56 $this->disable("footer");
57 $this->setEnableTitle(true);
58
59// $this->addMultiCommand("", $lng->txt(""));
60// $this->addCommandButton("", $lng->txt(""));
61 }
62
69 function getLevels()
70 {
71 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
72 $this->skill = new ilBasicSkill($this->sn_id);
73 $levels = array(array("id" => 0));
74 foreach ($this->skill->getLevelData() as $k => $v)
75 {
76 $levels[] = $v;
77 }
78
79 return $levels;
80 }
81
85 protected function fillRow($a_set)
86 {
87 global $lng;
88
89//var_dump($a_set);
90 if ($a_set["id"] == 0)
91 {
92 $this->tpl->setVariable("LEVEL_ID", $a_set["id"]);
93 $this->tpl->setVariable("SKILL_ID", $this->sn_id);
94 $this->tpl->setVariable("TXT_SKILL", $lng->txt("skmg_no_skills"));
95 }
96 else
97 {
98 $this->tpl->setVariable("LEVEL_ID", $a_set["id"]);
99 $this->tpl->setVariable("SKILL_ID", $this->sn_id);
100 $this->tpl->setVariable("TXT_SKILL", $a_set["title"].": ".$a_set["description"]);
101 }
102
103 if ($this->se != null)
104 {
105 if ($this->levels[$this->sn_id] == $a_set["id"])
106 {
107 $this->tpl->setVariable("CHECKED", " checked='checked' ");
108 }
109 }
110 else
111 {
112 if ($a_set["id"] == 0)
113 {
114 $this->tpl->setVariable("CHECKED", " checked='checked' ");
115 }
116 }
117
118 }
119
120}
121?>
Self evaluation table for single skill.
__construct($a_parent_obj, $a_parent_cmd, $a_sn_id, $a_se=null)
Constructor.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
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.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
disable($a_module_name)
diesables particular modules of table
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$path
Definition: index.php:22