5 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeGUI.php");
6 include_once(
"./Services/Skill/classes/class.ilSkillTemplateCategory.php");
52 $this->ctrl = $DIC->ctrl();
53 $this->tpl = $DIC[
"tpl"];
54 $this->tabs = $DIC->tabs();
55 $this->lng = $DIC->language();
56 $this->help = $DIC[
"ilHelp"];
59 $ilCtrl->saveParameter($this,
"obj_id");
60 $this->tref_id = $a_tref_id;
62 parent::__construct($a_node_id);
84 $next_class =
$ilCtrl->getNextClass($this);
87 switch ($next_class) {
105 $ilTabs->clearTargets();
106 $ilHelp->setScreenIdComponent(
"skmg_sctp");
111 $lng->txt(
"content"),
112 $ilCtrl->getLinkTarget($this,
'listItems')
117 if ($this->tref_id == 0) {
120 $lng->txt(
"settings"),
121 $ilCtrl->getLinkTarget($this,
'editProperties')
129 if ($this->tref_id == 0) {
133 $this->node_object->skill_tree->getRootId()
135 $ilTabs->setBackTarget(
136 $lng->txt(
"skmg_skill_templates"),
137 $ilCtrl->getLinkTargetByClass(
"ilskillrootgui",
"listTemplates")
146 parent::setTitleIcon();
148 $lng->txt(
"skmg_sctp") .
": " . $this->node_object->getTitle()
152 $ilTabs->activateTab($a_tab);
162 $r = parent::initForm($a_mode);
163 if ($a_mode ==
"create") {
164 $ni = $this->form->getItemByPostVar(
"order_nr");
165 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
167 $max =
$tree->getMaxOrderNr((
int)
$_GET[
"obj_id"],
true);
168 $ni->setValue($max + 10);
189 if ($this->tref_id == 0) {
190 self::addCreationButtons();
196 include_once(
"./Services/Skill/classes/class.ilSkillCatTableGUI.php");
200 (
int)
$_GET[
"obj_id"],
219 $lng = $DIC->language();
220 $ilToolbar = $DIC->toolbar();
223 $ilCtrl->setParameterByClass(
"ilobjskillmanagementgui",
"tmpmode", 1);
226 "ilbasicskilltemplategui",
228 (
int)
$_GET[
"obj_id"]
230 $ilToolbar->addButton(
231 $lng->txt(
"skmg_create_skill_template"),
232 $ilCtrl->getLinkTargetByClass(
"ilbasicskilltemplategui",
"create")
235 "ilskilltemplatecategorygui",
237 (
int) $_GET[
"obj_id"]
239 $ilToolbar->addButton(
240 $lng->txt(
"skmg_create_skill_template_category"),
241 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"create")
246 if (
$ilUser->clipboardHasObjectsOfType(
"sktp")) {
247 $ilToolbar->addSeparator();
249 $ilToolbar->addButton(
250 $lng->txt(
"skmg_insert_skill_template_from_clip"),
251 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"insertSkillTemplateClip")
256 if (
$ilUser->clipboardHasObjectsOfType(
"sctp")) {
258 $ilToolbar->addSeparator();
261 $ilToolbar->addButton(
262 $lng->txt(
"skmg_insert_template_category_from_clip"),
263 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"insertTemplateCategoryClip")
274 parent::editProperties();
288 $it->setTitle($this->form->getInput(
"title"));
289 $it->setOrderNr($this->form->getInput(
"order_nr"));
303 $this->node_object->setTitle($this->form->getInput(
"title"));
304 $this->node_object->setOrderNr($this->form->getInput(
"order_nr"));
305 $this->node_object->setSelfEvaluation(
$_POST[
"self_eval"]);
306 $this->node_object->update();
325 if ($this->tref_id > 0) {
326 return parent::showUsage();
333 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
335 $usages = $usage_info->getAllUsagesOfTemplate((
int)
$_GET[
"obj_id"]);
338 include_once(
"./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
339 foreach ($usages as $k => $usage) {
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.
if(empty($password)) $table