46 $this->ctrl = $DIC->ctrl();
47 $this->tpl = $DIC[
"tpl"];
48 $this->tabs = $DIC->tabs();
49 $this->lng = $DIC->language();
50 $this->
help = $DIC[
"ilHelp"];
51 $ilCtrl = $DIC->ctrl();
53 $ilCtrl->saveParameter($this,
"obj_id");
54 $this->tref_id = $a_tref_id;
78 $next_class = $ilCtrl->getNextClass($this);
79 $cmd = $ilCtrl->getCmd();
81 switch ($next_class) {
99 $ilTabs->clearTargets();
100 $ilHelp->setScreenIdComponent(
"skmg_sctp");
105 $lng->txt(
"content"),
106 $ilCtrl->getLinkTarget($this,
'listItems')
111 if ($this->tref_id == 0) {
114 $lng->txt(
"settings"),
115 $ilCtrl->getLinkTarget($this,
'editProperties')
123 if ($this->tref_id == 0) {
124 $ilCtrl->setParameterByClass(
127 $this->node_object->skill_tree->getRootId()
129 $ilTabs->setBackTarget(
130 $lng->txt(
"skmg_skill_templates"),
131 $ilCtrl->getLinkTargetByClass(
"ilskillrootgui",
"listTemplates")
133 $ilCtrl->setParameterByClass(
140 parent::setTitleIcon();
142 $lng->txt(
"skmg_sctp") .
": " . $this->node_object->getTitle()
146 $ilTabs->activateTab($a_tab);
156 $r = parent::initForm($a_mode);
157 if ($a_mode ==
"create") {
158 $ni = $this->form->getItemByPostVar(
"order_nr");
160 $max = $tree->getMaxOrderNr((
int)
$_GET[
"obj_id"],
true);
161 $ni->setValue($max + 10);
182 if ($this->tref_id == 0) {
183 self::addCreationButtons();
192 (
int)
$_GET[
"obj_id"],
197 $tpl->setContent($table->getHTML());
210 $ilCtrl = $DIC->ctrl();
211 $lng = $DIC->language();
212 $ilToolbar = $DIC->toolbar();
215 $ilCtrl->setParameterByClass(
"ilobjskillmanagementgui",
"tmpmode", 1);
217 $ilCtrl->setParameterByClass(
218 "ilbasicskilltemplategui",
220 (
int)
$_GET[
"obj_id"]
222 $ilToolbar->addButton(
223 $lng->txt(
"skmg_create_skill_template"),
224 $ilCtrl->getLinkTargetByClass(
"ilbasicskilltemplategui",
"create")
226 $ilCtrl->setParameterByClass(
227 "ilskilltemplatecategorygui",
229 (
int) $_GET[
"obj_id"]
231 $ilToolbar->addButton(
232 $lng->txt(
"skmg_create_skill_template_category"),
233 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"create")
238 if (
$ilUser->clipboardHasObjectsOfType(
"sktp")) {
239 $ilToolbar->addSeparator();
241 $ilToolbar->addButton(
242 $lng->txt(
"skmg_insert_skill_template_from_clip"),
243 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"insertSkillTemplateClip")
248 if (
$ilUser->clipboardHasObjectsOfType(
"sctp")) {
250 $ilToolbar->addSeparator();
253 $ilToolbar->addButton(
254 $lng->txt(
"skmg_insert_template_category_from_clip"),
255 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"insertTemplateCategoryClip")
266 parent::editProperties();
280 $it->setTitle($this->form->getInput(
"title"));
281 $it->setDescription($this->form->getInput(
"description"));
282 $it->setOrderNr($this->form->getInput(
"order_nr"));
296 $this->node_object->setTitle($this->form->getInput(
"title"));
297 $this->node_object->setDescription($this->form->getInput(
"description"));
298 $this->node_object->setOrderNr($this->form->getInput(
"order_nr"));
299 $this->node_object->setSelfEvaluation(
$_POST[
"self_eval"]);
300 $this->node_object->update();
319 if ($this->tref_id > 0) {
320 return parent::showUsage();
328 $usages = $usage_info->getAllUsagesOfTemplate((
int)
$_GET[
"obj_id"]);
331 foreach ($usages as $k => $usage) {
333 $html .= $tab->getHTML() .
"<br/><br/>";
336 $tpl->setContent($html);
redirectToParent($a_tmp_mode=false)
Redirect to parent (identified by current obj_id)
addUsageTab($a_tabs)
Add usage tab.
__construct($a_node_id=0, $a_tref_id)
Constructor.
setSkillNodeDescription()
Set skill node description.
editProperties()
Edit properties.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
Put this object into the skill tree.
setTabs($a_tab)
output tabs
checkPermissionBool($a_perm)
Check permission pool.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
executeCommand()
Execute command.
initForm($a_mode="edit")
Init form.
showUsage()
Show skill usage.
Basic GUI class for skill tree nodes.
TableGUI class for skill usages.
Skill template category GUI class.
static addCreationButtons()
Add creation buttons.
__construct(Container $dic, ilPlugin $plugin)