ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSkillLevelProfileAssignmentTableGUI.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_cskill_id)
21  {
22  global $ilCtrl, $lng;
23 
24  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
25 
26  $parts = explode(":", $a_cskill_id);
27  $this->skill_id = (int) $parts[0];
28  $this->tref_id = (int) $parts[1];
29 
30  $this->skill = new ilBasicSkill($this->skill_id);
31  parent::__construct($a_parent_obj, $a_parent_cmd);
32  $this->setData($this->skill->getLevelData());
33  $this->setTitle($this->skill->getTitle().", ".
34  $lng->txt("skmg_skill_levels"));
35 
36  $this->addColumn($this->lng->txt("title"));
37  $this->addColumn($this->lng->txt("actions"));
38 
39  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
40  $this->setRowTemplate("tpl.skill_level_profile_assignment_row.html", "Services/Skill");
41  }
42 
46  protected function fillRow($a_set)
47  {
48  global $lng, $ilCtrl;
49 
50  $this->tpl->setCurrentBlock("cmd");
51  $this->tpl->setVariable("CMD", $lng->txt("skmg_assign_level"));
52  $ilCtrl->setParameter($this->parent_obj, "level_id", (int) $a_set["id"]);
53  $this->tpl->setVariable("CMD_HREF", $ilCtrl->getLinkTarget($this->parent_obj,
54  "assignLevelToProfile"));
55  $ilCtrl->setParameter($this->parent_obj, "level_id", $_GET["level_id"]);
56  $this->tpl->parseCurrentBlock();
57 
58  $this->tpl->setVariable("TITLE", $a_set["title"]);
59  }
60 
61 }
62 ?>