/**
  * Save item
  */
 function saveItem()
 {
     $it = new ilBasicSkill();
     $it->setTitle($this->form->getInput("title"));
     $it->setOrderNr($this->form->getInput("order_nr"));
     $it->setDraft($this->form->getInput("draft"));
     $it->setSelfEvaluation($_POST["self_eval"]);
     $it->create();
     ilSkillTreeNode::putInTree($it, (int) $_GET["obj_id"], IL_LAST_NODE);
     $this->node_object = $it;
 }
예제 #2
0
 /**
  * Copy basic skill
  */
 function copy()
 {
     $skill = new ilBasicSkill();
     $skill->setTitle($this->getTitle());
     $skill->setType($this->getType());
     $skill->setSelfEvaluation($this->getSelfEvaluation());
     $skill->setOrderNr($this->getOrderNr());
     $skill->create();
     $levels = $this->getLevelData();
     if (sizeof($levels)) {
         foreach ($levels as $item) {
             $skill->addLevel($item["title"], $item["description"]);
         }
     }
     $skill->update();
     return $skill;
 }