ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSkillProfileLevelsTableGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Table/classes/class.ilTable2GUI.php");
6 
16 {
20  function __construct($a_parent_obj, $a_parent_cmd, $a_profile)
21  {
22  global $ilCtrl, $lng, $ilAccess, $lng;
23 
24  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
25  include_once("./Services/Skill/classes/class.ilSkillTree.php");
26  $this->tree = new ilSkillTree();
27 
28  $this->profile = $a_profile;
29  parent::__construct($a_parent_obj, $a_parent_cmd);
30 
31  $this->setData($this->profile->getSkillLevels());
32  $this->setTitle($lng->txt("skmg_skill_levels"));
33 
34  $this->addColumn("", "", "1", true);
35  $this->addColumn($this->lng->txt("skmg_skill"));
36  $this->addColumn($this->lng->txt("skmg_level"));
37 
38  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
39  $this->setRowTemplate("tpl.skill_profile_level_row.html", "Services/Skill");
40 
41  $this->addMultiCommand("confirmLevelAssignmentRemoval", $lng->txt("skmg_remove_levels"));
42  //$this->addCommandButton("", $lng->txt(""));
43  }
44 
48  protected function fillRow($a_set)
49  {
50  $path = $this->tree->getSkillTreePath($a_set["base_skill_id"],
51  $a_set["tref_id"]);
52  $path_items = array();
53  foreach ($path as $p)
54  {
55  if ($p["type"] != "skrt")
56  {
57  $path_items[] = $p["title"];
58  }
59  }
60  $this->tpl->setVariable("SKILL_TITLE",
61  implode($path_items, " > "));
62 
63  $this->tpl->setVariable("LEVEL_TITLE", ilBasicSkill::lookupLevelTitle($a_set["level_id"]));
64 
65  $this->tpl->setVariable("ID",
66  ((int) $a_set["base_skill_id"]).":".((int) $a_set["tref_id"]).":".((int) $a_set["level_id"]));
67  }
68 
69 }
70 ?>