5 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
6 include_once(
"./Services/Link/classes/class.ilLink.php");
26 function __construct($a_skill_id, $a_parent_obj, $a_parent_cmd, $a_tref_id = 0, $a_in_use =
false)
30 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
31 $this->skill_id = $a_skill_id;
33 $this->tref_id = $a_tref_id;
34 $this->in_use = $a_in_use;
36 parent::__construct($a_parent_obj, $a_parent_cmd);
39 $this->
setTitle($lng->txt(
"skmg_skill_levels"));
40 if ($this->tref_id == 0)
42 $this->
setDescription($lng->txt(
"skmg_from_lower_to_higher_levels"));
45 if ($this->tref_id == 0 && !$this->in_use)
48 $this->
addColumn($this->lng->txt(
"skmg_nr"));
50 $this->
addColumn($this->lng->txt(
"title"));
51 $this->
addColumn($this->lng->txt(
"description"));
54 $this->
addColumn($this->lng->txt(
"resources"));
55 $this->
addColumn($this->lng->txt(
"actions"));
61 $this->
setRowTemplate(
"tpl.skill_level_row.html",
"Services/Skill");
64 if ($this->tref_id == 0 && !$this->in_use && $a_parent_obj->checkPermissionBool(
"write"))
67 if (count($this->
getData()) > 0)
96 $levels = $this->skill->getLevelData();
100 include_once(
"./Services/Skill/classes/class.ilSkillResources.php");
102 foreach($resources->getResources() as $level_id => $item)
104 $res[$level_id] = array_keys($item);
107 foreach($levels as $idx => $item)
109 $levels[$idx][
"ressources"] =
$res[$item[
"id"]];
122 if ($this->tref_id == 0 && !$this->in_use)
124 $this->tpl->setCurrentBlock(
"cb");
125 $this->tpl->setVariable(
"CB_ID", $a_set[
"id"]);
126 $this->tpl->parseCurrentBlock();
128 $this->tpl->setCurrentBlock(
"nr");
129 $this->tpl->setVariable(
"ORD_ID", $a_set[
"id"]);
130 $this->tpl->setVariable(
"VAL_NR", ((
int) $a_set[
"nr"]) * 10);
131 $this->tpl->parseCurrentBlock();
135 $this->tpl->setCurrentBlock(
"cmd");
136 $this->tpl->setVariable(
"TXT_CMD", $lng->txt(
"edit"));
137 $ilCtrl->setParameter($this->parent_obj,
"level_id", $a_set[
"id"]);
138 if ($this->tref_id == 0)
140 $this->tpl->setVariable(
"HREF_CMD",
141 $ilCtrl->getLinkTarget($this->parent_obj,
"editLevel"));
145 $this->tpl->setVariable(
"HREF_CMD",
146 $ilCtrl->getLinkTarget($this->parent_obj,
"showLevelResources"));
148 $this->tpl->parseCurrentBlock();
150 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
151 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
172 if(is_array($a_set[
"ressources"]))
174 $this->tpl->setCurrentBlock(
"ressource_bl");
175 foreach($a_set[
"ressources"] as $rref_id)
181 $this->tpl->parseCurrentBlock();
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setDescription($a_val)
Set description.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static _lookupTitle($a_id)
lookup object title
fillRow($a_set)
Fill table row.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
numericOrdering($a_field)
Should this field be sorted numeric?
static _lookupObjId($a_id)
Manages resources for skills.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
getSkillLevelData()
Get skill level data.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
setEnableHeader($a_enableheader)
Set Enable Header.
__construct($a_skill_id, $a_parent_obj, $a_parent_cmd, $a_tref_id=0, $a_in_use=false)
Constructor.
setEnableTitle($a_enabletitle)
Set Enable Title.
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.
setLimit($a_limit=0, $a_default_limit=0)