ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
5include_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?>
static lookupLevelTitle($a_id)
Lookup level title.
TableGUI class for skill profile levels.
__construct($a_parent_obj, $a_parent_cmd, $a_profile)
Constructor.
Class ilTable2GUI.
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.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$path
Definition: index.php:22