ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilBasicSkillTemplate.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
6 
16 {
17  var $id;
18 
23  function __construct($a_id = 0)
24  {
26  $this->setType("sktp");
27  }
28 
32  function copy()
33  {
34  $skill = new ilBasicSkillTemplate();
35  $skill->setTitle($this->getTitle());
36  $skill->setType($this->getType());
37  $skill->setOrderNr($this->getOrderNr());
38  $skill->create();
39 
40  $levels = $this->getLevelData();
41  if (sizeof($levels))
42  {
43  foreach($levels as $item)
44  {
45  $skill->addLevel($item["title"], $item["description"]);
46  }
47  }
48  $skill->update();
49 
50  return $skill;
51  }
52 }
53 ?>