ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjSkillManagementGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Object/classes/class.ilObjectGUI.php");
6
19{
20 protected $skill_tree;
21
27 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
28 {
29 global $ilCtrl;
30
31 $this->type = 'skmg';
32 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
33
34 $this->lng->loadLanguageModule('skmg');
35
36 include_once("./Services/Skill/classes/class.ilSkillTree.php");
37 $this->skill_tree = new ilSkillTree();
38
39 $ilCtrl->saveParameter($this, "obj_id");
40 }
41
48 public function executeCommand()
49 {
50 global $rbacsystem, $ilErr, $ilAccess, $ilTabs;
51
52 $next_class = $this->ctrl->getNextClass($this);
53 $cmd = $this->ctrl->getCmd();
54
55 $this->prepareOutput();
56
57 if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
58 {
59 $ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
60 }
61
62 switch($next_class)
63 {
64 case 'ilskillrootgui':
65 include_once("./Services/Skill/classes/class.ilSkillRootGUI.php");
66 $skrt_gui = new ilSkillRootGUI((int) $_GET["obj_id"], $this);
67 $skrt_gui->setParentGUI($this);
68 $ret = $this->ctrl->forwardCommand($skrt_gui);
69 break;
70
71 case 'ilskillcategorygui':
72 $this->tabs_gui->activateTab("skills");
73 include_once("./Services/Skill/classes/class.ilSkillCategoryGUI.php");
74 $scat_gui = new ilSkillCategoryGUI((int) $_GET["obj_id"]);
75 $scat_gui->setParentGUI($this);
76 $this->showTree(false, $scat_gui, "listItems");
77 $ret = $this->ctrl->forwardCommand($scat_gui);
78 break;
79
80 case 'ilbasicskillgui':
81 $this->tabs_gui->activateTab("skills");
82 include_once("./Services/Skill/classes/class.ilBasicSkillGUI.php");
83 $skill_gui = new ilBasicSkillGUI((int) $_GET["obj_id"]);
84 $skill_gui->setParentGUI($this);
85 $this->showTree(false, $skill_gui, "edit");
86 $ret = $this->ctrl->forwardCommand($skill_gui);
87 break;
88
89 case 'ilskilltemplatecategorygui':
90 $this->tabs_gui->activateTab("skill_templates");
91 include_once("./Services/Skill/classes/class.ilSkillTemplateCategoryGUI.php");
92 $sctp_gui = new ilSkillTemplateCategoryGUI((int) $_GET["obj_id"], (int) $_GET["tref_id"]);
93 $sctp_gui->setParentGUI($this);
94 $this->showTree(((int) $_GET["tref_id"] == 0), $sctp_gui, "listItems");
95 $ret = $this->ctrl->forwardCommand($sctp_gui);
96 break;
97
98 case 'ilbasicskilltemplategui':
99 $this->tabs_gui->activateTab("skill_templates");
100 include_once("./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php");
101 $sktp_gui = new ilBasicSkillTemplateGUI((int) $_GET["obj_id"], (int) $_GET["tref_id"]);
102 $sktp_gui->setParentGUI($this);
103 $this->showTree(((int) $_GET["tref_id"] == 0), $sktp_gui, "edit");
104 $ret = $this->ctrl->forwardCommand($sktp_gui);
105 break;
106
107 case 'ilskilltemplatereferencegui':
108 $this->tabs_gui->activateTab("skills");
109 include_once("./Services/Skill/classes/class.ilSkillTemplateReferenceGUI.php");
110 $sktr_gui = new ilSkillTemplateReferenceGUI((int) $_GET["tref_id"]);
111 $sktr_gui->setParentGUI($this);
112 $this->showTree(false, $sktr_gui, "listItems");
113 $ret = $this->ctrl->forwardCommand($sktr_gui);
114 break;
115
116 case "ilskillprofilegui":
117 $ilTabs->activateTab("profiles");
118 include_once("./Services/Skill/classes/class.ilSkillProfileGUI.php");
119 $skprof_gui = new ilSkillProfileGUI();
120 $ret = $this->ctrl->forwardCommand($skprof_gui);
121 break;
122
123 case 'ilpermissiongui':
124 $this->tabs_gui->activateTab('permissions');
125 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
126 $perm_gui = new ilPermissionGUI($this);
127 $ret = $this->ctrl->forwardCommand($perm_gui);
128 break;
129
130 case "ilexportgui":
131 $this->tabs_gui->activateTab('export');
132 include_once("./Services/Export/classes/class.ilExportGUI.php");
133 $exp_gui = new ilExportGUI($this);
134 $exp_gui->addFormat("xml");
135 //$exp_gui->addFormat("html", "", $this, "exportHTML");
136 $ret = $this->ctrl->forwardCommand($exp_gui);
137 break;
138
139 default:
140 if(!$cmd || $cmd == 'view')
141 {
142 $cmd = "editSkills";
143 }
144
145 if ($cmd == "showTree")
146 {
147 $this->showTree($_GET["templates_tree"]);
148 }
149 else
150 {
151 $this->$cmd();
152 }
153 break;
154 }
155 return true;
156 }
157
164 public function getAdminTabs()
165 {
166 global $rbacsystem, $ilAccess, $lng;
167
168 if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
169 {
170 $this->tabs_gui->addTab("skills",
171 $lng->txt("skmg_skills"),
172 $this->ctrl->getLinkTarget($this, "editSkills"));
173
174 $this->tabs_gui->addTab("skill_templates",
175 $lng->txt("skmg_skill_templates"),
176 $this->ctrl->getLinkTarget($this, "editSkillTemplates"));
177
178 $this->tabs_gui->addTab("settings",
179 $lng->txt("settings"),
180 $this->ctrl->getLinkTarget($this, "editSettings"));
181
182 $this->tabs_gui->addTab("profiles",
183 $lng->txt("skmg_skill_profiles"),
184 $this->ctrl->getLinkTargetByClass("ilskillprofilegui"));
185
186 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
187 {
188 $this->tabs_gui->addTab("export",
189 $lng->txt("export"),
190 $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
191 }
192
193 if (DEVMODE == 1)
194 {
195 $this->tabs_gui->addTab("test",
196 "Test (DEVMODE)",
197 $this->ctrl->getLinkTarget($this, "test"));
198 }
199 }
200
201 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
202 {
203 $this->tabs_gui->addTab("permissions",
204 $lng->txt("perm_settings"),
205 $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"));
206 }
207 }
208
212 public function editSettings()
213 {
214 global $ilCtrl, $lng, $ilSetting, $ilTabs;
215
216 $ilTabs->activateTab("settings");
217
218 include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
219 $skmg_set = new ilSkillManagementSettings();
220 $enable_skmg = $skmg_set->isActivated();
221
222 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
223 $form = new ilPropertyFormGUI();
224 $form->setFormAction($ilCtrl->getFormAction($this));
225 $form->setTitle($lng->txt("skmg_settings"));
226
227 // Enable skill management
228 $cb_prop = new ilCheckboxInputGUI($lng->txt("skmg_enable_skmg"),
229 "enable_skmg");
230 $cb_prop->setValue("1");
231 $cb_prop->setChecked($enable_skmg);
232 $form->addItem($cb_prop);
233
234 // command buttons
235 if ($this->checkPermissionBool("write"))
236 {
237 $form->addCommandButton("saveSettings", $lng->txt("save"));
238 }
239
240 $this->tpl->setContent($form->getHTML());
241 }
242
246 public function saveSettings()
247 {
248 global $ilCtrl, $ilSetting;
249
250 if (!$this->checkPermissionBool("write"))
251 {
252 return;
253 }
254
255 include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
256 $skmg_set = new ilSkillManagementSettings();
257 $skmg_set->activate((int) $_POST["enable_skmg"]);
258
259 ilUtil::sendSuccess($this->lng->txt("settings_saved"),true);
260
261 $ilCtrl->redirect($this, "editSettings");
262 }
263
267 function editSkills()
268 {
269 global $tpl, $ilTabs, $lng, $ilCtrl;
270
271 $ilTabs->activateTab("skills");
272
273 $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
274 $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
275
276 }
277
278
282 function saveAllTitles($a_succ_mess = true)
283 {
284 global $ilCtrl, $lng;
285
286 if (is_array($_POST["title"]))
287 {
288 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
289 foreach($_POST["title"] as $id => $title)
290 {
292 if (is_object($node_obj))
293 {
294 // update title
296 }
297 }
298 if ($a_succ_mess)
299 {
300 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
301 }
302 }
303 $ilCtrl->redirect($this, "editSkills");
304 }
305
309 function saveAllTemplateTitles($a_succ_mess = true)
310 {
311 global $ilCtrl, $lng;
312
313 if (is_array($_POST["title"]))
314 {
315 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
316 foreach($_POST["title"] as $id => $title)
317 {
319 if (is_object($node_obj))
320 {
321 // update title
323 }
324 }
325 if ($a_succ_mess)
326 {
327 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
328 }
329 }
330 $ilCtrl->redirect($this, "editSkillTemplates");
331 }
332
333
337 function expandAll($a_redirect = true)
338 {
339 $_GET["skexpand"] = "";
340 $n_id = ($_GET["obj_id"] > 0)
341 ? $_GET["obj_id"]
342 : $this->skill_tree->readRootId();
343 $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
344 $n_arr = array();
345 foreach ($stree as $n)
346 {
347 $n_arr[] = $n["child"];
348 $_SESSION["skexpand"] = $n_arr;
349 }
350 $this->saveAllTitles(false);
351 }
352
356 function collapseAll($a_redirect = true)
357 {
358 $_GET["skexpand"] = "";
359 $n_id = ($_GET["obj_id"] > 0)
360 ? $_GET["obj_id"]
361 : $this->skill_tree->readRootId();
362 $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
363 $old = $_SESSION["skexpand"];
364 foreach ($stree as $n)
365 {
366 if (in_array($n["child"], $old) && $n["child"] != $n_id)
367 {
368 $k = array_search($n["child"], $old);
369 unset($old[$k]);
370 }
371 }
372 $_SESSION["skexpand"] = $old;
373 $this->saveAllTitles(false);
374 }
375
379 function deleteNodes($a_gui)
380 {
381 global $lng, $tpl, $ilCtrl, $ilTabs, $ilToolbar;
382
383 if(!isset($_POST["id"]))
384 {
385 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
386 }
387
388 $ilTabs->clearTargets();
389
390 // check usages
391 $mode = "";
392 $cskill_ids = array();
393 foreach($_POST["id"] as $id)
394 {
395 if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr")))
396 {
397 if ($mode == "templates")
398 {
399 $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
400 }
401 $mode = "basic";
402 $skill_id = $id;
403 $tref_id = 0;
404 if (ilSkillTreeNode::_lookupType($id) == "sktr")
405 {
406 include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
408 $tref_id = $id;
409 }
410 $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
411 }
412 if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp")))
413 {
414 if ($mode == "basic")
415 {
416 $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
417 }
418 $mode = "templates";
419
421 {
422 $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
423 }
424 }
425 // for cats, skills and template references, get "real" usages
426 // for skill and category templates check usage in references
427 }
428
429 if ($mode == "basic" || $mode == "templates")
430 {
431 include_once("./Services/Skill/classes/class.ilSkillUsage.php");
432 $u = new ilSkillUsage();
433 $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
434 if (count($usages) > 0)
435 {
436 $html = "";
437 foreach ($usages as $k => $usage)
438 {
439 include_once("./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
440 $tab = new ilSkillUsageTableGUI($this, "showUsage", $k, $usage);
441 $html.= $tab->getHTML()."<br/><br/>";
442 }
443 $tpl->setContent($html);
444 $ilCtrl->saveParameter($a_gui, "tmpmode");
445 $ilToolbar->addButton($lng->txt("back"),
446 $ilCtrl->getLinkTarget($a_gui, "cancelDelete"));
447 ilUtil::sendFailure($lng->txt("skmg_cannot_delete_nodes_in_use"));
448 return;
449 }
450 }
451 else
452 {
453 $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
454 }
455
456 // SAVE POST VALUES
457 $_SESSION["saved_post"] = $_POST["id"];
458
459 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
460 $confirmation_gui = new ilConfirmationGUI();
461
462 $ilCtrl->setParameter($a_gui, "tmpmode", $_GET["tmpmode"]);
463 $a_form_action = $this->ctrl->getFormAction($a_gui);
464 $confirmation_gui->setFormAction($a_form_action);
465 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
466
467 // Add items to delete
468 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
469 foreach($_POST["id"] as $id)
470 {
471 if ($id != IL_FIRST_NODE)
472 {
474 $confirmation_gui->addItem("id[]", $node_obj->getId(),
475 $node_obj->getTitle(), ilUtil::getImagePath("icon_".$node_obj->getType().".svg"));
476 }
477 }
478
479 $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
480 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
481
482 $tpl->setContent($confirmation_gui->getHTML());
483 }
484
488 function cancelDelete()
489 {
490 $this->ctrl->redirect($this, "editSkills");
491 }
492
497 {
498 global $ilCtrl;
499
500 // delete all selected objects
501 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
502 foreach ($_POST["id"] as $id)
503 {
504 if ($id != IL_FIRST_NODE)
505 {
507 $node_data = $this->skill_tree->getNodeData($id);
508 if (is_object($obj))
509 {
510 $obj->delete();
511 }
512 if($this->skill_tree->isInTree($id))
513 {
514 $this->skill_tree->deleteTree($node_data);
515 }
516 }
517 }
518
519 // feedback
520 ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
521 }
522
523 //
524 //
525 // Test
526 //
527 //
528
535 function test()
536 {
537 global $tpl, $lng, $ilCtrl, $ilTabs;
538
539 $this->setTestSubTabs("test");
540
541 $ilTabs->activateTab("test");
542
543 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
544
545 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
546 $this->form = new ilPropertyFormGUI();
547
548 $this->form->addCommandButton("test", $lng->txt("execute"));
549
550 $this->form->setTitle("getCompletionDateForTriggerRefId()");
551 $this->form->setFormAction($ilCtrl->getFormAction($this));
552
553 // user id
554 $ti = new ilTextInputGUI("User ID(s)", "user_id");
555 $ti->setMaxLength(200);
556 $ti->setInfo("Separate multiple IDs by :");
557 $ti->setValue($_POST["user_id"]);
558 $this->form->addItem($ti);
559
560 // ref id
561 $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
562 $ti->setMaxLength(200);
563 $ti->setInfo("Separate multiple IDs by :");
564 $ti->setValue($_POST["ref_id"]);
565 $this->form->addItem($ti);
566
567 $result = "";
568 if (isset($_POST["user_id"]))
569 {
570 $user_ids = explode(":", $_POST["user_id"]);
571 $ref_ids = explode(":", $_POST["ref_id"]);
572 if (count($user_ids) <= 1)
573 {
574 $user_ids = $user_ids[0];
575 }
576 if (count($ref_ids) == 1)
577 {
578 $ref_ids = $ref_ids[0];
579 }
580 else if (count($ref_ids) == 0)
581 {
582 $ref_ids = null;
583 }
584
585 $result = ilBasicSkill::getCompletionDateForTriggerRefId($user_ids, $ref_ids);
586 $result = "<br />Result:<br />".var_export($result, true);
587 }
588
589 $tpl->setContent($this->form->getHTML().$result);
590
591 }
592
599 function testCert()
600 {
601 global $tpl, $lng, $ilCtrl, $ilTabs;
602
603 $this->setTestSubTabs("cert");
604 $ilTabs->activateTab("test");
605
606 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
607
608 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
609 $this->form = new ilPropertyFormGUI();
610
611 $this->form->addCommandButton("testCert", $lng->txt("execute"));
612
613 $this->form->setTitle("checkUserCertificateForTriggerRefId()");
614 $this->form->setFormAction($ilCtrl->getFormAction($this));
615
616 // user id
617 $ti = new ilTextInputGUI("User ID(s)", "user_id");
618 $ti->setMaxLength(200);
619 $ti->setInfo("Separate multiple IDs by :");
620 $ti->setValue($_POST["user_id"]);
621 $this->form->addItem($ti);
622
623 // ref id
624 $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
625 $ti->setMaxLength(200);
626 $ti->setInfo("Separate multiple IDs by :");
627 $ti->setValue($_POST["ref_id"]);
628 $this->form->addItem($ti);
629
630 $result = "";
631 if (isset($_POST["user_id"]))
632 {
633 $user_ids = explode(":", $_POST["user_id"]);
634 $ref_ids = explode(":", $_POST["ref_id"]);
635 if (count($user_ids) <= 1)
636 {
637 $user_ids = $user_ids[0];
638 }
639 if (count($ref_ids) == 1)
640 {
641 $ref_ids = $ref_ids[0];
642 }
643 else if (count($ref_ids) == 0)
644 {
645 $ref_ids = null;
646 }
647
648 $result = ilBasicSkill::checkUserCertificateForTriggerRefId($user_ids, $ref_ids);
649 $result = "<br />Result:<br />".var_export($result, true);
650 }
651
652 $tpl->setContent($this->form->getHTML().$result);
653
654 }
655
662 function testAllCert()
663 {
664 global $tpl, $lng, $ilCtrl, $ilTabs;
665
666 $this->setTestSubTabs("all_cert");
667 $ilTabs->activateTab("test");
668
669 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
670
671 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
672 $this->form = new ilPropertyFormGUI();
673
674 $this->form->addCommandButton("testAllCert", $lng->txt("execute"));
675
676 $this->form->setTitle("getTriggerOfAllCertificates()");
677 $this->form->setFormAction($ilCtrl->getFormAction($this));
678
679 // user id
680 $ti = new ilTextInputGUI("User ID(s)", "user_id");
681 $ti->setMaxLength(200);
682 $ti->setInfo("Separate multiple IDs by :");
683 $ti->setValue($_POST["user_id"]);
684 $this->form->addItem($ti);
685
686 $result = "";
687 if (isset($_POST["user_id"]))
688 {
689 $user_ids = explode(":", $_POST["user_id"]);
690 $ref_ids = explode(":", $_POST["ref_id"]);
691 if (count($user_ids) <= 1)
692 {
693 $user_ids = $user_ids[0];
694 }
695
696 $result = ilBasicSkill::getTriggerOfAllCertificates($user_ids);
697 $result = "<br />Result:<br />".var_export($result, true);
698 }
699
700 $tpl->setContent($this->form->getHTML().$result);
701
702 }
703
710 function testLevels()
711 {
712 global $tpl, $lng, $ilCtrl, $ilTabs;
713
714 $this->setTestSubTabs("levels");
715 $ilTabs->activateTab("test");
716
717 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
718
719 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
720 $this->form = new ilPropertyFormGUI();
721
722 $this->form->addCommandButton("testLevels", $lng->txt("execute"));
723
724 $this->form->setTitle("getTriggerOfAllCertificates()");
725 $this->form->setFormAction($ilCtrl->getFormAction($this));
726
727 // user id
728 $ti = new ilTextInputGUI("Ref ID", "ref_id");
729 $ti->setMaxLength(200);
730 $ti->setValue($_POST["ref_id"]);
731 $this->form->addItem($ti);
732
733 $result = "";
734 if (isset($_POST["ref_id"]))
735 {
736 $result = ilBasicSkill::getSkillLevelsForTrigger($_POST["ref_id"]);
737 $result = "<br />Result:<br />".var_export($result, true);
738 }
739
740 $tpl->setContent($this->form->getHTML().$result);
741
742 }
743
744
751 function setTestSubtabs($a_act)
752 {
753 global $ilTabs, $ilCtrl;
754
755 $ilTabs->addSubtab("test",
756 "getCompletionDateForTriggerRefId",
757 $ilCtrl->getLinkTarget($this, "test"));
758
759 $ilTabs->addSubtab("cert",
760 "checkUserCertificateForTriggerRefId",
761 $ilCtrl->getLinkTarget($this, "testCert"));
762
763 $ilTabs->addSubtab("all_cert",
764 "getTriggerOfAllCertificates",
765 $ilCtrl->getLinkTarget($this, "testAllCert"));
766
767 $ilTabs->addSubtab("levels",
768 "getSkillLevelsForTrigger",
769 $ilCtrl->getLinkTarget($this, "testLevels"));
770
771 $ilTabs->activateSubtab($a_act);
772
773 }
774
775 //
776 // Skill Templates
777 //
778
783 {
784 global $tpl, $ilTabs, $lng, $ilCtrl;
785
786 $ilTabs->activateTab("skill_templates");
787 $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
788 $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
789
790 }
791
792 //
793 // Tree
794 //
795
799 function showTree($a_templates, $a_gui = "", $a_gui_cmd = "")
800 {
801 global $ilUser, $tpl, $ilCtrl, $lng;
802
803 if ($a_templates)
804 {
805 if ($_GET["obj_id"] == "" || $_GET["obj_id"] == 1)
806 {
807 return;
808 }
809
810 if ($_GET["obj_id"] > 1)
811 {
812 $path = $this->skill_tree->getPathId($_GET["obj_id"]);
813 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
814 if (ilSkillTreeNode::_lookupType($path[1]) == "sktp")
815 {
816 return;
817 }
818 }
819 }
820
821 $ilCtrl->setParameter($this, "templates_tree", $a_templates);
822
823 if ($a_templates)
824 {
825 include_once("./Services/Skill/classes/class.ilSkillTemplateTreeExplorerGUI.php");
826 $exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree");
827 }
828 else
829 {
830 include_once("./Services/Skill/classes/class.ilSkillTreeExplorerGUI.php");
831 $exp = new ilSkillTreeExplorerGUI($this, "showTree", $a_templates);
832 }
833 if (!$exp->handleCommand())
834 {
835 $tpl->setLeftNavContent($exp->getHTML());
836 }
837 }
838
839}
840?>
$result
$n
Definition: RandomTest.php:80
$path
Definition: aliased.php:25
$_GET["client_id"]
$_POST["username"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Basic skill GUI class.
Basic skill template GUI class.
This class represents a checkbox property in a property form.
Confirmation screen class.
Export User Interface Class.
Skill management main GUI class.
testAllCert()
Test getTriggerOfAllCertificates.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
saveAllTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.
confirmedDelete()
Delete chapters/scos/pages.
setTestSubtabs($a_act)
Set test subtabs.
expandAll($a_redirect=true)
Expand all.
saveSettings()
Save skill management settings.
saveAllTemplateTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.
testLevels()
Test getSkillLevelsForTrigger.
deleteNodes($a_gui)
confirm deletion screen of skill tree nodes
collapseAll($a_redirect=true)
Collapse all.
showTree($a_templates, $a_gui="", $a_gui_cmd="")
Show Editing Tree.
testCert()
Test checkUserCertificateForTriggerRefId.
editSkillTemplates()
Edit skill templates.
test()
Test getCompletionDateForTriggerRefId.
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a property form user interface.
Skill category GUI class.
Skill profile GUI class.
Skill root GUI class.
Skill template category GUI class.
Skill template reference GUI class.
static _lookupTrefIdsForTemplateId($a_tid)
Get all tref ids for a template id.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
Explorer class that works on tree objects (Services/Tree)
Explorer class that works on tree objects (Services/Tree)
static _writeTitle($a_obj_id, $a_title)
Write Title.
static _lookupType($a_obj_id)
Lookup Type.
TableGUI class for skill usages.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file)
$ret
Definition: parser.php:6
global $ilSetting
Definition: privfeed.php:17
global $ilErr
Definition: raiseError.php:16
$old
$cmd
Definition: sahs_server.php:35
$ilUser
Definition: imgupload.php:18