22 $this->ctrl = $DIC->ctrl();
23 $this->tpl = $DIC[
"tpl"];
24 $this->tabs = $DIC->tabs();
25 $this->lng = $DIC->language();
26 $this->
help = $DIC[
"ilHelp"];
27 $ilCtrl = $DIC->ctrl();
29 $ilCtrl->saveParameter($this,
"obj_id");
30 $ilCtrl->saveParameter($this,
"tref_id");
34 $this->tref_id = $a_tref_id;
35 if (is_object($this->node_object)) {
36 $this->base_skill_id = $this->node_object->getSkillTemplateId();
59 $next_class = $ilCtrl->getNextClass($this);
60 $cmd = $ilCtrl->getCmd();
62 switch ($next_class) {
80 $ilTabs->clearTargets();
81 $ilHelp->setScreenIdComponent(
"skmg_sktr");
83 if (is_object($this->node_object)) {
84 $sk_id = $this->node_object->getSkillTemplateId();
87 if ($obj_type ==
"sctp") {
92 $ilCtrl->getLinkTarget($this,
'listItems')
98 $lng->txt(
"skmg_skill_levels"),
99 $ilCtrl->getLinkTarget($this,
'listItems')
106 $lng->txt(
"settings"),
107 $ilCtrl->getLinkTarget($this,
'editProperties')
114 if ($obj_type !=
"sctp") {
130 parent::setTitleIcon();
132 $lng->txt(
"skmg_sktr") .
": " . $this->node_object->getTitle() . $add
136 $ilTabs->activateTab($a_tab);
151 $ilCtrl->saveParameter($this,
"parent_id");
152 $ilCtrl->saveParameter($this,
"target");
154 $tpl->setContent($this->form->getHTML());
169 $tpl->setContent($this->form->getHTML());
189 $ti->setRequired(
true);
190 $this->form->addItem($ti);
193 if ($a_mode ==
"edit") {
198 $ne->setInfo(
$lng->txt(
"skmg_description_info"));
199 $this->form->addItem($ne);
205 "" =>
$lng->txt(
"please_select"),
207 foreach ($tmplts as $tmplt) {
208 $options[$tmplt[
"child"]] = $tmplt[
"title"];
210 if ($a_mode !=
"edit") {
212 $si->setOptions($options);
213 $si->setRequired(
true);
214 $this->form->addItem(
$si);
217 $ne->
setValue($options[$this->node_object->getSkillTemplateId()]);
218 $this->form->addItem($ne);
227 $this->form->addItem($cb);
230 if ($a_mode ==
"create") {
231 $this->form->addCommandButton(
"save",
$lng->txt(
"save"));
232 $this->form->addCommandButton(
"cancel",
$lng->txt(
"cancel"));
233 $this->form->setTitle(
$lng->txt(
"skmg_new_sktr"));
235 $this->form->addCommandButton(
"updateSkillTemplateReference",
$lng->txt(
"save"));
236 $this->form->setTitle(
$lng->txt(
"skmg_edit_sktr"));
240 $this->form->setFormAction($ilCtrl->getFormAction($this));
249 $values[
"skill_template_id"] = $this->node_object->getSkillTemplateId();
250 $values[
"title"] = $this->node_object->getTitle();
251 $values[
"description"] = $this->node_object->getDescription();
252 $values[
"selectable"] = $this->node_object->getSelfEvaluation();
253 $values[
"status"] = $this->node_object->getStatus();
254 $this->form->setValuesByArray($values);
269 $sktr->setTitle(
$_POST[
"title"]);
270 $sktr->setDescription(
$_POST[
"description"]);
271 $sktr->setSkillTemplateId(
$_POST[
"skill_template_id"]);
272 $sktr->setSelfEvaluation(
$_POST[
"selectable"]);
273 $sktr->setOrderNr(
$tree->getMaxOrderNr((
int)
$_GET[
"obj_id"]) + 10);
274 $sktr->setStatus(
$_POST[
"status"]);
277 $this->node_object = $sktr;
287 $ilCtrl->setParameterByClass(
288 "ilskilltemplatereferencegui",
290 $this->node_object->getId()
292 $ilCtrl->setParameterByClass(
293 "ilskilltemplatereferencegui",
295 $this->node_object->getSkillTemplateId()
297 $ilCtrl->redirectByClass(
"ilskilltemplatereferencegui",
"listItems");
314 if ($this->form->checkInput()) {
317 $this->node_object->setTitle(
$_POST[
"title"]);
318 $this->node_object->setDescription(
$_POST[
"description"]);
319 $this->node_object->setSelfEvaluation(
$_POST[
"selectable"]);
320 $this->node_object->setStatus(
$_POST[
"status"]);
321 $this->node_object->update();
323 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
324 $ilCtrl->redirect($this,
"editProperties");
327 $this->form->setValuesByPost();
328 $tpl->setContent($this->form->getHtml());
341 $ilCtrl->redirectByClass(
"ilobjskillmanagementgui",
"editSkills");
358 $sk_id = $this->node_object->getSkillTemplateId();
361 if ($obj_type ==
"sctp") {
367 $this->node_object->getId()
369 $tpl->setContent($table->getHTML());
370 } elseif ($obj_type ==
"sktp") {
372 $tpl->setContent($table->getHTML());
386 $objects = $usage_info->getAssignedObjectsForSkill($this->base_skill_id, $this->tref_id);
390 $tpl->setContent($tab->getHTML());
addUsageTab($a_tabs)
Add usage tab.
setValue($a_value)
Set Value.
showObjects()
Show assigned objects.
Skill Template Reference.
setSkillNodeDescription()
Set skill node description.
getValues()
Get current values for from.
__construct($a_tref_id=0)
Constructor.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
Put this object into the skill tree.
TableGUI class for assigned objects of skills.
static _lookupType($a_obj_id)
Lookup Type.
checkPermissionBool($a_perm)
Check permission pool.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
editProperties()
Edit properties.
setTabs($a_tab="")
output tabs
static _lookupDescription($a_obj_id)
Lookup Description.
Skill template reference GUI class.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
updateSkillTemplateReference()
Update form.
initForm($a_mode="edit")
Init form.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
This class represents a non editable value in a property form.
__construct(Container $dic, ilPlugin $plugin)
executeCommand()
Execute command.
Basic skill template GUI class.
addStatusInput(ilPropertyFormGUI $a_form)
Add status input.
static getTopTemplates()
Get top skill templates and template categories.