5 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
6 include_once(
"./Services/Link/classes/class.ilLink.php");
36 public function __construct($a_skill_id, $a_parent_obj, $a_parent_cmd, $a_tref_id = 0, $a_in_use =
false)
40 $this->ctrl = $DIC->ctrl();
41 $this->lng = $DIC->language();
42 $this->access = $DIC->access();
44 $lng = $DIC->language();
45 $ilAccess = $DIC->access();
46 $lng = $DIC->language();
48 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
49 $this->skill_id = $a_skill_id;
51 $this->tref_id = $a_tref_id;
52 $this->in_use = $a_in_use;
54 parent::__construct($a_parent_obj, $a_parent_cmd);
58 if ($this->tref_id == 0) {
62 if ($this->tref_id == 0 && !$this->in_use) {
64 $this->
addColumn($this->lng->txt(
"skmg_nr"));
66 $this->
addColumn($this->lng->txt(
"title"));
67 $this->
addColumn($this->lng->txt(
"description"));
70 $this->
addColumn($this->lng->txt(
"resources"));
71 $this->
addColumn($this->lng->txt(
"actions"));
77 $this->
setRowTemplate(
"tpl.skill_level_row.html",
"Services/Skill");
80 if ($this->tref_id == 0 && !$this->in_use && $a_parent_obj->checkPermissionBool(
"write")) {
82 if (count($this->
getData()) > 0) {
95 if ($a_field ==
"nr") {
109 $levels = $this->skill->getLevelData();
113 include_once(
"./Services/Skill/classes/class.ilSkillResources.php");
115 foreach ($resources->getResources() as $level_id => $item) {
116 $res[$level_id] = array_keys($item);
119 foreach ($levels as $idx => $item) {
120 $levels[$idx][
"ressources"] =
$res[$item[
"id"]];
134 if ($this->tref_id == 0 && !$this->in_use) {
135 $this->tpl->setCurrentBlock(
"cb");
136 $this->tpl->setVariable(
"CB_ID", $a_set[
"id"]);
137 $this->tpl->parseCurrentBlock();
139 $this->tpl->setCurrentBlock(
"nr");
140 $this->tpl->setVariable(
"ORD_ID", $a_set[
"id"]);
141 $this->tpl->setVariable(
"VAL_NR", ((
int) $a_set[
"nr"]) * 10);
142 $this->tpl->parseCurrentBlock();
145 $this->tpl->setCurrentBlock(
"cmd");
146 $this->tpl->setVariable(
"TXT_CMD",
$lng->txt(
"edit"));
147 $ilCtrl->setParameter($this->parent_obj,
"level_id", $a_set[
"id"]);
148 if ($this->tref_id == 0) {
149 $this->tpl->setVariable(
151 $ilCtrl->getLinkTarget($this->parent_obj,
"editLevel")
154 $this->tpl->setVariable(
156 $ilCtrl->getLinkTarget($this->parent_obj,
"showLevelResources")
159 $this->tpl->parseCurrentBlock();
161 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
162 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
183 if (is_array($a_set[
"ressources"])) {
184 $this->tpl->setCurrentBlock(
"ressource_bl");
185 foreach ($a_set[
"ressources"] as $rref_id) {
190 $this->tpl->parseCurrentBlock();
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setDescription($a_val)
Set description.
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?
foreach($_POST as $key=> $value) $res
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.
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.
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.
setLimit($a_limit=0, $a_default_limit=0)