42 bool $a_in_use =
false,
43 bool $a_manage_perm =
false 47 $this->
ctrl = $DIC->ctrl();
48 $this->
lng = $DIC->language();
49 $this->
access = $DIC->access();
50 $ilCtrl = $DIC->ctrl();
51 $lng = $DIC->language();
52 $this->ui_fac = $DIC->ui()->factory();
53 $this->ui_ren = $DIC->ui()->renderer();
55 $this->skill_id = $a_skill_id;
57 $this->tref_id = $a_tref_id;
58 $this->in_use = $a_in_use;
59 $this->manage_perm = $a_manage_perm;
65 if ($this->tref_id == 0) {
69 if ($this->tref_id == 0 && !$this->in_use) {
70 if ($this->manage_perm) {
78 $this->
addColumn($this->
lng->txt(
"skmg_lp_triggers_level"));
79 if ($this->manage_perm) {
87 $this->
setRowTemplate(
"tpl.skill_level_row.html",
"Services/Skill");
90 if ($this->tref_id == 0 && !$this->in_use && $this->manage_perm) {
92 if (count($this->
getData()) > 0) {
103 if ($a_field ==
"nr") {
111 $levels = $this->skill->getLevelData();
116 foreach (
$resources->getResources() as $level_id => $item) {
117 $res[$level_id] = $item;
120 foreach ($levels as $idx => $item) {
121 if (isset(
$res[$item[
"id"]])) {
122 $levels[$idx][
"ressources"] =
$res[$item[
"id"]];
129 protected function fillRow(array $a_set): void
134 if ($this->tref_id == 0 && !$this->in_use) {
135 if ($this->manage_perm) {
136 $this->tpl->setCurrentBlock(
"cb");
137 $this->tpl->setVariable(
"CB_ID", $a_set[
"id"]);
138 $this->tpl->parseCurrentBlock();
141 $this->tpl->setCurrentBlock(
"nr");
142 $this->tpl->setVariable(
"ORD_ID", $a_set[
"id"]);
143 $this->tpl->setVariable(
"VAL_NR", ((
int) $a_set[
"nr"]) * 10);
144 if (!$this->manage_perm) {
145 $this->tpl->touchBlock(
"disabled");
147 $this->tpl->parseCurrentBlock();
150 $this->tpl->setCurrentBlock(
"cmd");
151 if ($this->manage_perm) {
152 $this->tpl->setVariable(
"TXT_CMD",
$lng->
txt(
"edit"));
154 $ilCtrl->
setParameter($this->parent_obj,
"level_id", $a_set[
"id"]);
155 if ($this->tref_id == 0) {
156 $this->tpl->setVariable(
158 $ilCtrl->getLinkTarget($this->parent_obj,
"editLevel")
161 $this->tpl->setVariable(
163 $ilCtrl->getLinkTarget($this->parent_obj,
"showLevelResources")
166 $this->tpl->parseCurrentBlock();
168 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
169 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
170 if (isset($a_set[
"ressources"]) && is_array($a_set[
"ressources"])) {
171 foreach ($a_set[
"ressources"] as $rref_id => $ressource) {
174 $robj_icon = $this->ui_fac->symbol()->icon()->standard(
176 $this->
lng->txt(
"icon") .
" " . $this->
lng->txt($robj_type),
182 if ($ressource[
"imparting"]) {
183 $this->tpl->setCurrentBlock(
"ressource_sugg");
184 $this->tpl->setVariable(
"RSRC_IMG", $this->ui_ren->render($robj_icon));
185 $this->tpl->setVariable(
"RSRC_TITLE", $robj_title);
186 $this->tpl->setVariable(
"RSRC_URL", $robj_link);
187 $this->tpl->parseCurrentBlock();
190 if ($ressource[
"trigger"]) {
191 $this->tpl->setCurrentBlock(
"ressource_trigg");
192 $this->tpl->setVariable(
"RSRC_IMG", $this->ui_ren->render($robj_icon));
193 $this->tpl->setVariable(
"RSRC_TITLE", $robj_title);
194 $this->tpl->setVariable(
"RSRC_URL", $robj_link);
195 $this->tpl->parseCurrentBlock();
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
setEnableTitle(bool $a_enabletitle)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setDescription(string $a_val)
__construct(int $a_skill_id, $a_parent_obj, string $a_parent_cmd, int $a_tref_id=0, bool $a_in_use=false, bool $a_manage_perm=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
setDefaultOrderField(string $a_defaultorderfield)
ILIAS UI Renderer $ui_ren
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
Get static link.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDefaultOrderDirection(string $a_defaultorderdirection)
numericOrdering(string $a_field)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
setLimit(int $a_limit=0, int $a_default_limit=0)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
static _lookupType(int $id, bool $reference=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addMultiCommand(string $a_cmd, string $a_text)
setEnableHeader(bool $a_enableheader)