ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 
5 include_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::ilObjectGUI($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  default:
131  if(!$cmd || $cmd == 'view')
132  {
133  $cmd = "editSkills";
134  }
135 
136  if ($cmd == "showTree")
137  {
138  $this->showTree($_GET["templates_tree"]);
139  }
140  else
141  {
142  $this->$cmd();
143  }
144  break;
145  }
146  return true;
147  }
148 
155  public function getAdminTabs()
156  {
157  global $rbacsystem, $ilAccess, $lng;
158 
159  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
160  {
161  $this->tabs_gui->addTab("skills",
162  $lng->txt("skmg_skills"),
163  $this->ctrl->getLinkTarget($this, "editSkills"));
164 
165  $this->tabs_gui->addTab("skill_templates",
166  $lng->txt("skmg_skill_templates"),
167  $this->ctrl->getLinkTarget($this, "editSkillTemplates"));
168 
169  $this->tabs_gui->addTab("settings",
170  $lng->txt("settings"),
171  $this->ctrl->getLinkTarget($this, "editSettings"));
172 
173  $this->tabs_gui->addTab("profiles",
174  $lng->txt("skmg_skill_profiles"),
175  $this->ctrl->getLinkTargetByClass("ilskillprofilegui"));
176 
177  if (DEVMODE == 1)
178  {
179  $this->tabs_gui->addTab("test",
180  "Test (DEVMODE)",
181  $this->ctrl->getLinkTarget($this, "test"));
182  }
183  }
184 
185  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
186  {
187  $this->tabs_gui->addTab("permissions",
188  $lng->txt("perm_settings"),
189  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"));
190  }
191  }
192 
196  public function editSettings()
197  {
198  global $ilCtrl, $lng, $ilSetting, $ilTabs;
199 
200  $ilTabs->activateTab("settings");
201 
202  include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
203  $skmg_set = new ilSkillManagementSettings();
204  $enable_skmg = $skmg_set->isActivated();
205 
206  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
207  $form = new ilPropertyFormGUI();
208  $form->setFormAction($ilCtrl->getFormAction($this));
209  $form->setTitle($lng->txt("skmg_settings"));
210 
211  // Enable skill management
212  $cb_prop = new ilCheckboxInputGUI($lng->txt("skmg_enable_skmg"),
213  "enable_skmg");
214  $cb_prop->setValue("1");
215  $cb_prop->setChecked($enable_skmg);
216  $form->addItem($cb_prop);
217 
218  // command buttons
219  if ($this->checkPermissionBool("write"))
220  {
221  $form->addCommandButton("saveSettings", $lng->txt("save"));
222  }
223 
224  $this->tpl->setContent($form->getHTML());
225  }
226 
230  public function saveSettings()
231  {
232  global $ilCtrl, $ilSetting;
233 
234  if (!$this->checkPermissionBool("write"))
235  {
236  return;
237  }
238 
239  include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
240  $skmg_set = new ilSkillManagementSettings();
241  $skmg_set->activate((int) $_POST["enable_skmg"]);
242 
243  ilUtil::sendSuccess($this->lng->txt("settings_saved"),true);
244 
245  $ilCtrl->redirect($this, "editSettings");
246  }
247 
251  function editSkills()
252  {
253  global $tpl, $ilTabs, $lng, $ilCtrl;
254 
255  $ilTabs->activateTab("skills");
256 
257  $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
258  $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
259 
260  }
261 
262 
266  function saveAllTitles($a_succ_mess = true)
267  {
268  global $ilCtrl, $lng;
269 
270  if (is_array($_POST["title"]))
271  {
272  include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
273  foreach($_POST["title"] as $id => $title)
274  {
275  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
276  if (is_object($node_obj))
277  {
278  // update title
280  }
281  }
282  if ($a_succ_mess)
283  {
284  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
285  }
286  }
287  $ilCtrl->redirect($this, "editSkills");
288  }
289 
293  function saveAllTemplateTitles($a_succ_mess = true)
294  {
295  global $ilCtrl, $lng;
296 
297  if (is_array($_POST["title"]))
298  {
299  include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
300  foreach($_POST["title"] as $id => $title)
301  {
302  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
303  if (is_object($node_obj))
304  {
305  // update title
307  }
308  }
309  if ($a_succ_mess)
310  {
311  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
312  }
313  }
314  $ilCtrl->redirect($this, "editSkillTemplates");
315  }
316 
317 
321  function expandAll($a_redirect = true)
322  {
323  $_GET["skexpand"] = "";
324  $n_id = ($_GET["obj_id"] > 0)
325  ? $_GET["obj_id"]
326  : $this->skill_tree->readRootId();
327  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
328  $n_arr = array();
329  foreach ($stree as $n)
330  {
331  $n_arr[] = $n["child"];
332  $_SESSION["skexpand"] = $n_arr;
333  }
334  $this->saveAllTitles(false);
335  }
336 
340  function collapseAll($a_redirect = true)
341  {
342  $_GET["skexpand"] = "";
343  $n_id = ($_GET["obj_id"] > 0)
344  ? $_GET["obj_id"]
345  : $this->skill_tree->readRootId();
346  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
347  $old = $_SESSION["skexpand"];
348  foreach ($stree as $n)
349  {
350  if (in_array($n["child"], $old) && $n["child"] != $n_id)
351  {
352  $k = array_search($n["child"], $old);
353  unset($old[$k]);
354  }
355  }
356  $_SESSION["skexpand"] = $old;
357  $this->saveAllTitles(false);
358  }
359 
363  function deleteNodes($a_gui)
364  {
365  global $lng, $tpl, $ilCtrl, $ilTabs, $ilToolbar;
366 
367  if(!isset($_POST["id"]))
368  {
369  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
370  }
371 
372  $ilTabs->clearTargets();
373 
374  // check usages
375  $mode = "";
376  $cskill_ids = array();
377  foreach($_POST["id"] as $id)
378  {
379  if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr")))
380  {
381  if ($mode == "templates")
382  {
383  $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
384  }
385  $mode = "basic";
386  $skill_id = $id;
387  $tref_id = 0;
388  if (ilSkillTreeNode::_lookupType($id) == "sktr")
389  {
390  include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
392  $tref_id = $id;
393  }
394  $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
395  }
396  if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp")))
397  {
398  if ($mode == "basic")
399  {
400  $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
401  }
402  $mode = "templates";
403 
405  {
406  $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
407  }
408  }
409  // for cats, skills and template references, get "real" usages
410  // for skill and category templates check usage in references
411  }
412 
413  if ($mode == "basic" || $mode == "templates")
414  {
415  include_once("./Services/Skill/classes/class.ilSkillUsage.php");
416  $u = new ilSkillUsage();
417  $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
418  if (count($usages) > 0)
419  {
420  $html = "";
421  foreach ($usages as $k => $usage)
422  {
423  include_once("./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
424  $tab = new ilSkillUsageTableGUI($this, "showUsage", $k, $usage);
425  $html.= $tab->getHTML()."<br/><br/>";
426  }
427  $tpl->setContent($html);
428  $ilCtrl->saveParameter($a_gui, "tmpmode");
429  $ilToolbar->addButton($lng->txt("back"),
430  $ilCtrl->getLinkTarget($a_gui, "cancelDelete"));
431  ilUtil::sendFailure($lng->txt("skmg_cannot_delete_nodes_in_use"));
432  return;
433  }
434  }
435  else
436  {
437  $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
438  }
439 
440  // SAVE POST VALUES
441  $_SESSION["saved_post"] = $_POST["id"];
442 
443  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
444  $confirmation_gui = new ilConfirmationGUI();
445 
446  $ilCtrl->setParameter($a_gui, "tmpmode", $_GET["tmpmode"]);
447  $a_form_action = $this->ctrl->getFormAction($a_gui);
448  $confirmation_gui->setFormAction($a_form_action);
449  $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
450 
451  // Add items to delete
452  include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
453  foreach($_POST["id"] as $id)
454  {
455  if ($id != IL_FIRST_NODE)
456  {
457  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
458  $confirmation_gui->addItem("id[]", $node_obj->getId(),
459  $node_obj->getTitle(), ilUtil::getImagePath("icon_".$node_obj->getType().".svg"));
460  }
461  }
462 
463  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
464  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
465 
466  $tpl->setContent($confirmation_gui->getHTML());
467  }
468 
472  function cancelDelete()
473  {
474  $this->ctrl->redirect($this, "editSkills");
475  }
476 
480  function confirmedDelete()
481  {
482  global $ilCtrl;
483 
484  // delete all selected objects
485  include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
486  foreach ($_POST["id"] as $id)
487  {
488  if ($id != IL_FIRST_NODE)
489  {
491  $node_data = $this->skill_tree->getNodeData($id);
492  if (is_object($obj))
493  {
494  $obj->delete();
495  }
496  if($this->skill_tree->isInTree($id))
497  {
498  $this->skill_tree->deleteTree($node_data);
499  }
500  }
501  }
502 
503  // feedback
504  ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
505  }
506 
507  //
508  //
509  // Test
510  //
511  //
512 
519  function test()
520  {
521  global $tpl, $lng, $ilCtrl, $ilTabs;
522 
523  $this->setTestSubTabs("test");
524 
525  $ilTabs->activateTab("test");
526 
527  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
528 
529  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
530  $this->form = new ilPropertyFormGUI();
531 
532  $this->form->addCommandButton("test", $lng->txt("execute"));
533 
534  $this->form->setTitle("getCompletionDateForTriggerRefId()");
535  $this->form->setFormAction($ilCtrl->getFormAction($this));
536 
537  // user id
538  $ti = new ilTextInputGUI("User ID(s)", "user_id");
539  $ti->setMaxLength(200);
540  $ti->setInfo("Separate multiple IDs by :");
541  $ti->setValue($_POST["user_id"]);
542  $this->form->addItem($ti);
543 
544  // ref id
545  $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
546  $ti->setMaxLength(200);
547  $ti->setInfo("Separate multiple IDs by :");
548  $ti->setValue($_POST["ref_id"]);
549  $this->form->addItem($ti);
550 
551  $result = "";
552  if (isset($_POST["user_id"]))
553  {
554  $user_ids = explode(":", $_POST["user_id"]);
555  $ref_ids = explode(":", $_POST["ref_id"]);
556  if (count($user_ids) <= 1)
557  {
558  $user_ids = $user_ids[0];
559  }
560  if (count($ref_ids) == 1)
561  {
562  $ref_ids = $ref_ids[0];
563  }
564  else if (count($ref_ids) == 0)
565  {
566  $ref_ids = null;
567  }
568 
570  $result = "<br />Result:<br />".var_export($result, true);
571  }
572 
573  $tpl->setContent($this->form->getHTML().$result);
574 
575  }
576 
583  function testCert()
584  {
585  global $tpl, $lng, $ilCtrl, $ilTabs;
586 
587  $this->setTestSubTabs("cert");
588  $ilTabs->activateTab("test");
589 
590  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
591 
592  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
593  $this->form = new ilPropertyFormGUI();
594 
595  $this->form->addCommandButton("testCert", $lng->txt("execute"));
596 
597  $this->form->setTitle("checkUserCertificateForTriggerRefId()");
598  $this->form->setFormAction($ilCtrl->getFormAction($this));
599 
600  // user id
601  $ti = new ilTextInputGUI("User ID(s)", "user_id");
602  $ti->setMaxLength(200);
603  $ti->setInfo("Separate multiple IDs by :");
604  $ti->setValue($_POST["user_id"]);
605  $this->form->addItem($ti);
606 
607  // ref id
608  $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
609  $ti->setMaxLength(200);
610  $ti->setInfo("Separate multiple IDs by :");
611  $ti->setValue($_POST["ref_id"]);
612  $this->form->addItem($ti);
613 
614  $result = "";
615  if (isset($_POST["user_id"]))
616  {
617  $user_ids = explode(":", $_POST["user_id"]);
618  $ref_ids = explode(":", $_POST["ref_id"]);
619  if (count($user_ids) <= 1)
620  {
621  $user_ids = $user_ids[0];
622  }
623  if (count($ref_ids) == 1)
624  {
625  $ref_ids = $ref_ids[0];
626  }
627  else if (count($ref_ids) == 0)
628  {
629  $ref_ids = null;
630  }
631 
633  $result = "<br />Result:<br />".var_export($result, true);
634  }
635 
636  $tpl->setContent($this->form->getHTML().$result);
637 
638  }
639 
646  function testAllCert()
647  {
648  global $tpl, $lng, $ilCtrl, $ilTabs;
649 
650  $this->setTestSubTabs("all_cert");
651  $ilTabs->activateTab("test");
652 
653  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
654 
655  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
656  $this->form = new ilPropertyFormGUI();
657 
658  $this->form->addCommandButton("testAllCert", $lng->txt("execute"));
659 
660  $this->form->setTitle("getTriggerOfAllCertificates()");
661  $this->form->setFormAction($ilCtrl->getFormAction($this));
662 
663  // user id
664  $ti = new ilTextInputGUI("User ID(s)", "user_id");
665  $ti->setMaxLength(200);
666  $ti->setInfo("Separate multiple IDs by :");
667  $ti->setValue($_POST["user_id"]);
668  $this->form->addItem($ti);
669 
670  $result = "";
671  if (isset($_POST["user_id"]))
672  {
673  $user_ids = explode(":", $_POST["user_id"]);
674  $ref_ids = explode(":", $_POST["ref_id"]);
675  if (count($user_ids) <= 1)
676  {
677  $user_ids = $user_ids[0];
678  }
679 
681  $result = "<br />Result:<br />".var_export($result, true);
682  }
683 
684  $tpl->setContent($this->form->getHTML().$result);
685 
686  }
687 
694  function testLevels()
695  {
696  global $tpl, $lng, $ilCtrl, $ilTabs;
697 
698  $this->setTestSubTabs("levels");
699  $ilTabs->activateTab("test");
700 
701  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
702 
703  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
704  $this->form = new ilPropertyFormGUI();
705 
706  $this->form->addCommandButton("testLevels", $lng->txt("execute"));
707 
708  $this->form->setTitle("getTriggerOfAllCertificates()");
709  $this->form->setFormAction($ilCtrl->getFormAction($this));
710 
711  // user id
712  $ti = new ilTextInputGUI("Ref ID", "ref_id");
713  $ti->setMaxLength(200);
714  $ti->setValue($_POST["ref_id"]);
715  $this->form->addItem($ti);
716 
717  $result = "";
718  if (isset($_POST["ref_id"]))
719  {
721  $result = "<br />Result:<br />".var_export($result, true);
722  }
723 
724  $tpl->setContent($this->form->getHTML().$result);
725 
726  }
727 
728 
735  function setTestSubtabs($a_act)
736  {
737  global $ilTabs, $ilCtrl;
738 
739  $ilTabs->addSubtab("test",
740  "getCompletionDateForTriggerRefId",
741  $ilCtrl->getLinkTarget($this, "test"));
742 
743  $ilTabs->addSubtab("cert",
744  "checkUserCertificateForTriggerRefId",
745  $ilCtrl->getLinkTarget($this, "testCert"));
746 
747  $ilTabs->addSubtab("all_cert",
748  "getTriggerOfAllCertificates",
749  $ilCtrl->getLinkTarget($this, "testAllCert"));
750 
751  $ilTabs->addSubtab("levels",
752  "getSkillLevelsForTrigger",
753  $ilCtrl->getLinkTarget($this, "testLevels"));
754 
755  $ilTabs->activateSubtab($a_act);
756 
757  }
758 
759  //
760  // Skill Templates
761  //
762 
767  {
768  global $tpl, $ilTabs, $lng, $ilCtrl;
769 
770  $ilTabs->activateTab("skill_templates");
771  $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
772  $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
773 
774  }
775 
776  //
777  // Tree
778  //
779 
783  function showTree($a_templates, $a_gui = "", $a_gui_cmd = "")
784  {
785  global $ilUser, $tpl, $ilCtrl, $lng;
786 
787  if ($a_templates)
788  {
789  if ($_GET["obj_id"] == "" || $_GET["obj_id"] == 1)
790  {
791  return;
792  }
793 
794  if ($_GET["obj_id"] > 1)
795  {
796  $path = $this->skill_tree->getPathId($_GET["obj_id"]);
797  include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
798  if (ilSkillTreeNode::_lookupType($path[1]) == "sktp")
799  {
800  return;
801  }
802  }
803  }
804 
805  $ilCtrl->setParameter($this, "templates_tree", $a_templates);
806 
807  if ($a_templates)
808  {
809  include_once("./Services/Skill/classes/class.ilSkillTemplateTreeExplorerGUI.php");
810  $exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree");
811  }
812  else
813  {
814  include_once("./Services/Skill/classes/class.ilSkillTreeExplorerGUI.php");
815  $exp = new ilSkillTreeExplorerGUI($this, "showTree", $a_templates);
816  }
817  if (!$exp->handleCommand())
818  {
819  $tpl->setLeftNavContent($exp->getHTML());
820  }
821  }
822 
823 }
824 ?>
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Skill category GUI class.
$_POST['username']
Definition: cron.php:12
Skill root GUI class.
Skill profile GUI class.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
showTree($a_templates, $a_gui="", $a_gui_cmd="")
Show Editing Tree.
static _writeTitle($a_obj_id, $a_title)
Write Title.
$_SESSION["AccountId"]
$result
This class represents a property form user interface.
Skill tree.
$_GET["client_id"]
static _lookupTrefIdsForTemplateId($a_tid)
Get all tref ids for a template id.
static getTriggerOfAllCertificates($a_user_id, $a_self_eval=0)
Get trigger completion.
$cmd
Definition: sahs_server.php:35
This class represents a checkbox property in a property form.
Explorer class that works on tree objects (Services/Tree)
static _lookupType($a_obj_id)
Lookup Type.
global $ilCtrl
Definition: ilias.php:18
setTestSubtabs($a_act)
Set test subtabs.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
confirmedDelete()
Delete chapters/scos/pages.
expandAll($a_redirect=true)
Expand all.
editSkillTemplates()
Edit skill templates.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Class ilObjectGUI Basic methods of all Output classes.
Skill template reference GUI class.
const IL_FIRST_NODE
Definition: class.ilTree.php:5
setValue($a_value)
Set Value.
static checkUserCertificateForTriggerRefId($a_user_id, $a_ref_id, $a_self_eval=0)
Get trigger completion.
This class represents a text property in a property form.
saveAllTemplateTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.
redirection script todo: (a better solution should control the processing via a xml file) ...
static _lookupTemplateId($a_obj_id)
Lookup template ID.
$n
Definition: RandomTest.php:80
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
test()
Test getCompletionDateForTriggerRefId.
testAllCert()
Test getTriggerOfAllCertificates.
TableGUI class for skill usages.
prepareOutput()
prepare output
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
saveSettings()
Save skill management settings.
testLevels()
Test getSkillLevelsForTrigger.
Skill template category GUI class.
collapseAll($a_redirect=true)
Collapse all.
testCert()
Test checkUserCertificateForTriggerRefId.
static getSkillLevelsForTrigger($a_ref_id)
Get assigned skill levels for trigger.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
$path
Definition: index.php:22
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Explorer class that works on tree objects (Services/Tree)
Basic skill GUI class.
saveAllTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.
static getCompletionDateForTriggerRefId($a_user_id, $a_ref_id=null, $a_self_eval=0)
Get trigger completion.
Skill usage.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$html
Definition: example_001.php:87
Basic skill template GUI class.
deleteNodes($a_gui)
confirm deletion screen of skill tree nodes
Skill management main GUI class.
Confirmation screen class.