24 require_once(
"./Services/COPage/classes/class.ilPCSkills.php");
25 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
49 public function __construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id =
"")
53 $this->tpl = $DIC[
"tpl"];
54 $this->ctrl = $DIC->ctrl();
55 $this->
user = $DIC->user();
56 $this->lng = $DIC->language();
57 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
66 $next_class = $this->ctrl->getNextClass($this);
69 $cmd = $this->ctrl->getCmd();
71 switch ($next_class) {
93 include_once
"Services/Skill/classes/class.ilPersonalSkillExplorerGUI.php";
95 if (!$exp->handleCommand()) {
96 $tpl->setContent($exp->getHTML());
104 $tpl->setContent($a_form->getHTML());
120 if ($this->
getPageConfig()->getEnablePCType(
"PlaceHolder")) {
121 include_once
"Services/Skill/classes/class.ilPersonalSkillExplorerGUI.php";
123 if (!$exp->handleCommand()) {
124 $tpl->setContent($exp->getHTML());
132 $tpl->setContent($a_form->getHTML());
148 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
152 $form->setTitle($this->lng->txt(
"cont_insert_skills"));
154 $form->setTitle($this->lng->txt(
"cont_update_skills"));
158 include_once
"Services/Skill/classes/class.ilPersonalSkill.php";
162 foreach ($skills as $skill) {
163 $options[$skill[
"skill_node_id"]] = $skill[
"title"];
172 $form->addItem($obj);
175 $form->addCommandButton(
"create_skill", $this->lng->txt(
"select"));
176 $form->addCommandButton(
"cancelCreate", $this->lng->txt(
"cancel"));
178 $obj->setValue($this->content_obj->getSkillId());
179 $form->addCommandButton(
"update", $this->lng->txt(
"select"));
180 $form->addCommandButton(
"cancelUpdate", $this->lng->txt(
"cancel"));
194 if ($this->
getPageConfig()->getEnablePCType(
"PlaceHolder")) {
201 if (
$form->checkInput()) {
209 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
210 $this->content_obj->setData(
$data);
211 $this->updated = $this->pg_obj->update();
212 if ($this->updated ===
true) {
213 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
217 $form->setValuesByPost();
227 if ($this->
getPageConfig()->getEnablePCType(
"PlaceHolder")) {
234 if (
$form->checkInput()) {
241 $this->content_obj->setData(
$data);
242 $this->updated = $this->pg_obj->update();
243 if ($this->updated ===
true) {
244 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
248 $this->pg_obj->addHierIDs();
249 $form->setValuesByPost();
edit(ilPropertyFormGUI $a_form=null)
Edit skills form.
__construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
Constructor public.
executeCommand()
execute command
Explorer for selecting a personal skill.
static getSelectedUserSkills($a_user_id)
Get personal selected user skills.
getPageConfig()
Get Page Config.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
if(isset($_POST['submit'])) $form
create()
Create new skill.
displayValidationError()
display validation errors
insert(ilPropertyFormGUI $a_form=null)
Insert skills form.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
initForm($a_insert=false)
Init skills form.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options