ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  protected $ctrl;
21 
25  public function __construct($a_parent_obj, $a_parent_cmd, $a_cskill_id)
26  {
27  global $DIC;
28 
29  $this->ctrl = $DIC->ctrl();
30  $this->lng = $DIC->language();
31  $ilCtrl = $DIC->ctrl();
32  $lng = $DIC->language();
33 
34  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
35 
36  $parts = explode(":", $a_cskill_id);
37  $this->skill_id = (int) $parts[0];
38  $this->tref_id = (int) $parts[1];
39 
40  $this->skill = new ilBasicSkill($this->skill_id);
41  parent::__construct($a_parent_obj, $a_parent_cmd);
42  $this->setData($this->skill->getLevelData());
43  $this->setTitle($this->skill->getTitle() . ", " .
44  $lng->txt("skmg_skill_levels"));
45 
46  $this->addColumn($this->lng->txt("title"));
47  $this->addColumn($this->lng->txt("actions"));
48 
49  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
50  $this->setRowTemplate("tpl.skill_level_profile_assignment_row.html", "Services/Skill");
51  }
52 
56  protected function fillRow($a_set)
57  {
58  $lng = $this->lng;
60 
61  $this->tpl->setCurrentBlock("cmd");
62  $this->tpl->setVariable("CMD", $lng->txt("skmg_assign_level"));
63  $ilCtrl->setParameter($this->parent_obj, "level_id", (int) $a_set["id"]);
64  $this->tpl->setVariable("CMD_HREF", $ilCtrl->getLinkTarget(
65  $this->parent_obj,
66  "assignLevelToProfile"
67  ));
68  $ilCtrl->setParameter($this->parent_obj, "level_id", $_GET["level_id"]);
69  $this->tpl->parseCurrentBlock();
70 
71  $this->tpl->setVariable("TITLE", $a_set["title"]);
72  }
73 }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
TableGUI class for skill profile skill level assignment.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
__construct($a_parent_obj, $a_parent_cmd, $a_cskill_id)
Constructor.
Basic Skill.