ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilSkillSelfEvalSkillTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2020 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
15 protected $ctrl;
16
20 protected $access;
21
22
26 public function __construct($a_parent_obj, $a_parent_cmd, $a_sn_id, $a_se = null)
27 {
28 global $DIC;
29
30 $this->ctrl = $DIC->ctrl();
31 $this->lng = $DIC->language();
32 $this->access = $DIC->access();
33 $ilCtrl = $DIC->ctrl();
34 $lng = $DIC->language();
35 $ilAccess = $DIC->access();
36 $lng = $DIC->language();
37
38 $this->sn_id = $a_sn_id;
39 if ($a_se != null) {
40 $this->se = $a_se;
41 $this->levels = $this->se->getLevels();
42 }
43
44 // build title
45 $stree = new ilSkillTree();
46 $path = $stree->getPathFull($this->sn_id);
47 $title = $sep = "";
48 foreach ($path as $p) {
49 if ($p["type"] != "skrt") {
50 $title .= $sep . $p["title"];
51 $sep = " > ";
52 }
53 }
54
55 parent::__construct($a_parent_obj, $a_parent_cmd);
56 $this->setData($this->getLevels());
57 $this->setTitle($title);
58 $this->setLimit(9999);
59
60 $this->addColumn($this->lng->txt("skmg_your_self_evaluation"));
61 $this->addColumn($this->lng->txt("skmg_skill_level"));
62
63 $this->setEnableHeader(true);
64 // $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
65 $this->setRowTemplate("tpl.self_eval_row.html", "Services/Skill");
66 $this->disable("footer");
67 $this->setEnableTitle(true);
68
69 // $this->addMultiCommand("", $lng->txt(""));
70// $this->addCommandButton("", $lng->txt(""));
71 }
72
79 public function getLevels()
80 {
81 $this->skill = new ilBasicSkill($this->sn_id);
82 $levels = array(array("id" => 0));
83 foreach ($this->skill->getLevelData() as $k => $v) {
84 $levels[] = $v;
85 }
86
87 return $levels;
88 }
89
93 protected function fillRow($a_set)
94 {
96
97 //var_dump($a_set);
98 if ($a_set["id"] == 0) {
99 $this->tpl->setVariable("LEVEL_ID", $a_set["id"]);
100 $this->tpl->setVariable("SKILL_ID", $this->sn_id);
101 $this->tpl->setVariable("TXT_SKILL", $lng->txt("skmg_no_skills"));
102 } else {
103 $this->tpl->setVariable("LEVEL_ID", $a_set["id"]);
104 $this->tpl->setVariable("SKILL_ID", $this->sn_id);
105 $this->tpl->setVariable("TXT_SKILL", $a_set["title"] . ": " . $a_set["description"]);
106 }
107
108 if ($this->se != null) {
109 if ($this->levels[$this->sn_id] == $a_set["id"]) {
110 $this->tpl->setVariable("CHECKED", " checked='checked' ");
111 }
112 } else {
113 if ($a_set["id"] == 0) {
114 $this->tpl->setVariable("CHECKED", " checked='checked' ");
115 }
116 }
117 }
118}
An exception for terminatinating execution or to throw for unit testing.
Self evaluation table for single skill.
__construct($a_parent_obj, $a_parent_cmd, $a_sn_id, $a_se=null)
Constructor.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
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.
disable($a_module_name)
diesables particular modules of table
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc