24 require_once(
"./Services/COPage/classes/class.ilPCSkills.php");
25 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
44 function ilPCSkillsGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id =
"")
55 $next_class = $this->ctrl->getNextClass($this);
58 $cmd = $this->ctrl->getCmd();
85 $tpl->setContent($a_form->getHTML());
103 $tpl->setContent($a_form->getHTML());
116 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
118 $form->setFormAction($ilCtrl->getFormAction($this));
121 $form->setTitle($this->lng->txt(
"cont_insert_skills"));
125 $form->setTitle($this->lng->txt(
"cont_update_skills"));
129 include_once
"Services/Skill/classes/class.ilPersonalSkill.php";
133 foreach($skills as $skill)
135 $options[$skill[
"skill_node_id"]] = $skill[
"title"];
145 $obj->setOptions($options);
146 $form->addItem($obj);
150 $form->addCommandButton(
"create_skill", $this->lng->txt(
"select"));
151 $form->addCommandButton(
"cancelCreate", $this->lng->txt(
"cancel"));
155 $obj->setValue($this->content_obj->getSkillId());
156 $form->addCommandButton(
"update", $this->lng->txt(
"select"));
157 $form->addCommandButton(
"cancelUpdate", $this->lng->txt(
"cancel"));
169 if($form->checkInput())
171 $this->content_obj =
new ilPCSkills($this->dom);
172 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
173 $this->content_obj->setData($form->getInput(
"skill_id"));
174 $this->updated = $this->pg_obj->update();
175 if ($this->updated ===
true)
177 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
181 $form->setValuesByPost();
182 return $this->
insert($form);
191 if($form->checkInput())
193 $this->content_obj->setData($form->getInput(
"skill_id"));
194 $this->updated = $this->pg_obj->update();
195 if ($this->updated ===
true)
197 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
201 $this->pg_obj->addHierIDs();
202 $form->setValuesByPost();
203 return $this->
edit($form);