5 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
6 include_once(
"./Services/Link/classes/class.ilLink.php");
22 function __construct($a_skill_id, $a_parent_obj, $a_parent_cmd, $a_tref_id = 0)
26 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
27 $this->skill_id = $a_skill_id;
29 $this->tref_id = $a_tref_id;
31 parent::__construct($a_parent_obj, $a_parent_cmd);
34 $this->
setTitle($lng->txt(
"skmg_skill_levels"));
35 if ($this->tref_id == 0)
37 $this->
setDescription($lng->txt(
"skmg_from_lower_to_higher_levels"));
40 if ($this->tref_id == 0)
43 $this->
addColumn($this->lng->txt(
"skmg_nr"));
45 $this->
addColumn($this->lng->txt(
"title"));
46 $this->
addColumn($this->lng->txt(
"description"));
49 $this->
addColumn($this->lng->txt(
"resources"));
50 $this->
addColumn($this->lng->txt(
"actions"));
56 $this->
setRowTemplate(
"tpl.skill_level_row.html",
"Services/Skill");
59 if ($a_parent_obj->checkPermissionBool(
"write"))
61 if ($this->tref_id == 0)
64 if (count($this->
getData()) > 0)
94 $levels = $this->skill->getLevelData();
98 include_once(
"./Services/Skill/classes/class.ilSkillResources.php");
100 foreach($resources->getResources() as $level_id => $item)
102 $res[$level_id] = array_keys($item);
105 foreach($levels as $idx => $item)
107 $levels[$idx][
"ressources"] =
$res[$item[
"id"]];
120 if ($this->tref_id == 0)
122 $this->tpl->setCurrentBlock(
"cb");
123 $this->tpl->setVariable(
"CB_ID", $a_set[
"id"]);
124 $this->tpl->parseCurrentBlock();
126 $this->tpl->setCurrentBlock(
"nr");
127 $this->tpl->setVariable(
"ORD_ID", $a_set[
"id"]);
128 $this->tpl->setVariable(
"VAL_NR", ((
int) $a_set[
"nr"]) * 10);
129 $this->tpl->parseCurrentBlock();
133 $this->tpl->setCurrentBlock(
"cmd");
134 $this->tpl->setVariable(
"TXT_CMD", $lng->txt(
"edit"));
135 $ilCtrl->setParameter($this->parent_obj,
"level_id", $a_set[
"id"]);
136 if ($this->tref_id == 0)
138 $this->tpl->setVariable(
"HREF_CMD",
139 $ilCtrl->getLinkTarget($this->parent_obj,
"editLevel"));
143 $this->tpl->setVariable(
"HREF_CMD",
144 $ilCtrl->getLinkTarget($this->parent_obj,
"showLevelResources"));
146 $this->tpl->parseCurrentBlock();
148 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
149 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
170 if(is_array($a_set[
"ressources"]))
172 $this->tpl->setCurrentBlock(
"ressource_bl");
173 foreach($a_set[
"ressources"] as $rref_id)
179 $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.
__construct($a_skill_id, $a_parent_obj, $a_parent_cmd, $a_tref_id=0)
Constructor.
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.
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.
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)