ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjSkillTreeGUI Class Reference

Skill tree gui class. More...

+ Inheritance diagram for ilObjSkillTreeGUI:
+ Collaboration diagram for ilObjSkillTreeGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 init (Service\SkillInternalManagerService $skill_manager)
 
 executeCommand ()
 
 initTreeForm (bool $edit=false)
 
 save ()
 
 delete ()
 
 getAdminTabs ()
 
 editSkills ()
 
 saveAllTitles (bool $a_succ_mess=true)
 
 saveAllTemplateTitles (bool $a_succ_mess=true)
 
 expandAll (bool $a_redirect=true)
 
 collapseAll (bool $a_redirect=true)
 
 deleteNodes (object $a_gui)
 
 cancelDelete ()
 
 confirmedDeleteTrees ()
 
 confirmedDelete ()
 
 editSkillTemplates ()
 
 showTree (bool $a_templates, $a_gui="", $a_gui_cmd="")
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Data Fields

ilObject $object
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 showLocator ()
 
 getSkillManagementLink ()
 
 create ()
 
 edit ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilRbacSystem $rbacsystem
 
ilLocatorGUI $locator
 
ilErrorHandling $error
 
ilTabsGUI $tabs
 
ilSkillTree $skill_tree
 
Tree SkillTreeManager $skill_tree_manager
 
Tree SkillTreeNodeManager $skill_tree_node_manager
 
Access SkillTreeAccess $skill_tree_access_manager
 
Access SkillManagementAccess $skill_management_access_manager
 
Profile SkillProfileManager $profile_manager
 
Profile SkillProfileCompletionManager $profile_completion_manager
 
ilSkillTreeRepository $skill_tree_repo
 
Tree SkillTreeFactory $skill_tree_factory
 
UIServices $ui
 
ilGlobalTemplateInterface $main_tpl
 
ScreenContext ContextServices $tool_context
 
Service SkillAdminGUIRequest $admin_gui_request
 
int $requested_node_id = 0
 
int $requested_tref_id = 0
 
int $requested_templates_tree = 0
 
string $requested_skexpand = ""
 
int $requested_tmpmode = 0
 
array $requested_titles = []
 
array $requested_node_ids = []
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjSkillTreeGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference = true,
bool  $a_prepare_output = true 
)
Parameters
string | array$a_data
int$a_id
bool$a_call_by_reference
bool$a_prepare_output

Definition at line 76 of file class.ilObjSkillTreeGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), ILIAS\Repository\object(), ILIAS\Repository\settings(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

81  {
82  global $DIC;
83 
84  $this->ctrl = $DIC->ctrl();
85  $this->rbacsystem = $DIC->rbac()->system();
86  $this->error = $DIC["ilErr"];
87  $this->access = $DIC->access();
88  $this->tabs = $DIC->tabs();
89  $this->lng = $DIC->language();
90  $this->settings = $DIC->settings();
91  $this->tpl = $DIC["tpl"];
92  $this->toolbar = $DIC->toolbar();
93  $this->user = $DIC->user();
94  $ilCtrl = $DIC->ctrl();
95  $this->ui = $DIC->ui();
96  $this->main_tpl = $DIC->ui()->mainTemplate();
97  $this->locator = $DIC["ilLocator"];
98  $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
99 
100  $this->type = "skee";
101  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
102 
103  $this->lng->loadLanguageModule('skmg');
104 
105  $this->skill_tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
106  $this->skill_tree_factory = $DIC->skills()->internal()->factory()->tree();
107  $this->skill_tree = $this->skill_tree_factory->getTreeById($this->object->getId());
108 
109  $ilCtrl->saveParameter($this, "node_id");
110 
111  $this->tool_context = $DIC->globalScreen()->tool()->context();
112 
113  $this->requested_node_id = $this->admin_gui_request->getNodeId();
114  $this->requested_tref_id = $this->admin_gui_request->getTrefId();
115  $this->requested_templates_tree = $this->admin_gui_request->getTemplatesTree();
116  $this->requested_skexpand = $this->admin_gui_request->getSkillExpand();
117  $this->requested_tmpmode = $this->admin_gui_request->getTemplateMode();
118  $this->requested_titles = $this->admin_gui_request->getTitles();
119  $this->requested_node_ids = $this->admin_gui_request->getNodeIds();
120  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilObjSkillTreeGUI::cancelDelete ( )

Definition at line 729 of file class.ilObjSkillTreeGUI.php.

References ILIAS\Repository\ctrl().

729  : void
730  {
731  $this->ctrl->redirectByClass("ilobjskillmanagementgui", "");
732  }
+ Here is the call graph for this function:

◆ collapseAll()

ilObjSkillTreeGUI::collapseAll ( bool  $a_redirect = true)

Definition at line 581 of file class.ilObjSkillTreeGUI.php.

References ilSession\get(), saveAllTitles(), and ilSession\set().

581  : void
582  {
583  $this->requested_skexpand = "";
584  $n_id = ($this->requested_node_id > 0)
585  ? $this->requested_node_id
586  : $this->skill_tree->readRootId();
587  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
588  $old = ilSession::get("skexpand");
589  foreach ($stree as $n) {
590  if (in_array($n["child"], $old) && $n["child"] != $n_id) {
591  $k = array_search($n["child"], $old);
592  unset($old[$k]);
593  }
594  }
595  ilSession::set("skexpand", $old);
596  $this->saveAllTitles(false);
597  }
static get(string $a_var)
saveAllTitles(bool $a_succ_mess=true)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjSkillTreeGUI::confirmedDelete ( )

Definition at line 768 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$id, ilSkillTreeNodeFactory\getInstance(), ILIAS\Repository\lng(), and ilTree\POS_FIRST_NODE.

768  : void
769  {
770  // delete all selected objects
771  foreach ($this->requested_node_ids as $id) {
772  if ($id != ilTree::POS_FIRST_NODE) {
774  $node_data = $this->skill_tree->getNodeData($id);
775  if (is_object($obj)) {
776  $obj->delete();
777  }
778  if ($this->skill_tree->isInTree($id)) {
779  $this->skill_tree->deleteTree($node_data);
780  }
781  }
782  }
783 
784  // feedback
785  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
786  }
const POS_FIRST_NODE
+ Here is the call graph for this function:

◆ confirmedDeleteTrees()

ilObjSkillTreeGUI::confirmedDeleteTrees ( )

Definition at line 734 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$id, ilObjectGUI\$tree, ilTree\deleteTree(), ilSkillTreeNodeFactory\getInstance(), ilTree\getNodeData(), ilTree\getTreeId(), ilTree\isInTree(), ILIAS\Repository\lng(), ilTree\POS_FIRST_NODE, and ilCtrl\redirectByClass().

734  : void
735  {
736  $ctrl = $this->ctrl;
737 
738  // delete all selected trees
739  foreach ($this->requested_node_ids as $id) {
740  if ($id != ilTree::POS_FIRST_NODE) {
742  $tree = $this->skill_tree_repo->getTreeForNodeId($id);
743  $tree_obj = $this->skill_tree_manager->getTree($tree->getTreeId());
744  $node_data = $tree->getNodeData($id);
745 
746  // delete competence profiles of tree
747  $tree_profiles = $this->profile_manager->getProfilesForSkillTree($tree->getTreeId());
748  foreach ($tree_profiles as $profile) {
749  $this->profile_manager->delete((int) $profile["id"]);
750  $this->profile_completion_manager->deleteEntriesForProfile((int) $profile["id"]);
751  }
752 
753  if (is_object($obj)) {
754  $obj->delete();
755  }
756  if ($tree->isInTree($id)) {
757  $tree->deleteTree($node_data);
758  }
759  $this->skill_tree_manager->deleteTree($tree_obj);
760  }
761  }
762 
763  // feedback
764  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
765  $ctrl->redirectByClass("ilobjskillmanagementgui", "");
766  }
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
isInTree(?int $a_node_id)
get all information of a node.
deleteTree(array $a_node)
delete node and the whole subtree under this node
const POS_FIRST_NODE
+ Here is the call graph for this function:

◆ create()

ilObjSkillTreeGUI::create ( )
protected

Definition at line 330 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$lng, $main_tpl, $tabs, $ui, ilTabsGUI\clearTargets(), getSkillManagementLink(), initTreeForm(), ILIAS\DI\UIServices\renderer(), ilTabsGUI\setBackTarget(), and ilLanguage\txt().

330  : void
331  {
332  $lng = $this->lng;
333  $tabs = $this->tabs;
334  $mtpl = $this->main_tpl;
335  $ui = $this->ui;
336 
337  $tabs->clearTargets();
339  $lng->txt("back"),
340  $this->getSkillManagementLink()
341  );
342 
343  $mtpl->setContent($ui->renderer()->render($this->initTreeForm()));
344  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
initTreeForm(bool $edit=false)
ilLanguage $lng
ilGlobalTemplateInterface $main_tpl
renderer()
Get a renderer for UI components.
Definition: UIServices.php:43
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
+ Here is the call graph for this function:

◆ delete()

ilObjSkillTreeGUI::delete ( )

Definition at line 446 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, and deleteNodes().

446  : void
447  {
448  $ctrl = $this->ctrl;
449 
450  $this->deleteNodes($this);
451  }
+ Here is the call graph for this function:

◆ deleteNodes()

ilObjSkillTreeGUI::deleteNodes ( object  $a_gui)

Definition at line 599 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$html, ilObjectGUI\$id, ilObjectGUI\$lng, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTemplateReference\_lookupTrefIdsForTemplateId(), ilSkillTemplateReference\_lookupTrefIdsForTopTemplateId(), ilSkillTreeNode\_lookupType(), ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilSkillTreeNodeFactory\getInstance(), ILIAS\Repository\lng(), ilTree\POS_FIRST_NODE, ilSession\set(), ilGlobalTemplateInterface\setContent(), ilGlobalTemplateInterface\setOnScreenMessage(), and ilLanguage\txt().

Referenced by delete().

599  : void
600  {
601  $lng = $this->lng;
602  $tpl = $this->tpl;
603  $ilCtrl = $this->ctrl;
604  $ilTabs = $this->tabs;
605  $ilToolbar = $this->toolbar;
606 
607  if (empty($this->requested_node_ids)) {
608  $tpl->setOnScreenMessage("info", $lng->txt("no_checkbox"), true);
609  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
610  }
611 
612  $ilTabs->clearTargets();
613 
614  // check usages
615  $mode = "";
616  $tree_ids = [];
617  $cskill_ids = [];
618  foreach ($this->requested_node_ids as $id) {
619  if (ilSkillTreeNode::_lookupType($id) == "skrt") {
620  if (!$this->skill_management_access_manager->hasCreateTreePermission()) {
621  return;
622  }
623  $mode = "tree";
624  $tree_node_id = $id;
625  $tree_ids[] = $tree_node_id;
626  }
627  if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr"))) {
628  if ($mode == "templates") {
629  $tpl->setOnScreenMessage("failure", "Skill Deletion - type mismatch.", true);
630  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
631  }
632  $mode = "basic";
633  $skill_id = $id;
634  $tref_id = 0;
635  if (ilSkillTreeNode::_lookupType($id) == "sktr") {
637  $tref_id = $id;
638  }
639  $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
640  }
641  if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp"))) {
642  if ($mode == "basic") {
643  $tpl->setOnScreenMessage("failure", "Skill Deletion - type mismatch.", true);
644  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
645  }
646  $mode = "templates";
647 
648  foreach (ilSkillTemplateReference::_lookupTrefIdsForTemplateId($id) as $tref_id) {
649  $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
650  }
651  }
652  // for cats, skills and template references, get "real" usages
653  // for skill and category templates check usage in references
654  }
655 
656  $u = new ilSkillUsage();
657  $usages = [];
658  if ($mode == "tree") {
659  $usages = $u->getAllUsagesInfoOfTrees($tree_ids);
660  } elseif ($mode == "basic" || $mode == "templates") {
661  $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
662  } else {
663  $tpl->setOnScreenMessage("failure", "Skill Deletion - type mismatch.", true);
664  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
665  }
666 
667  if (count($usages) > 0) {
668  $html = "";
669  foreach ($usages as $k => $usage) {
670  $tab = new ilSkillUsageTableGUI($this, "showUsage", $k, $usage, $mode);
671  $html .= $tab->getHTML() . "<br/><br/>";
672  }
674  $ilCtrl->saveParameter($a_gui, "tmpmode");
675  $ilToolbar->addButton(
676  $lng->txt("back"),
677  $ilCtrl->getLinkTarget($a_gui, "cancelDelete")
678  );
679  $this->main_tpl->setOnScreenMessage('failure', $lng->txt("skmg_cannot_delete_nodes_in_use"));
680  return;
681  }
682 
683  // SAVE POST VALUES
684  ilSession::set("saved_post", $this->requested_node_ids);
685 
686  $confirmation_gui = new ilConfirmationGUI();
687 
688  $ilCtrl->setParameter($a_gui, "tmpmode", $this->requested_tmpmode);
689  $a_form_action = $this->ctrl->getFormAction($a_gui);
690  $confirmation_gui->setFormAction($a_form_action);
691  $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
692 
693  // Add items to delete
694  foreach ($this->requested_node_ids as $id) {
695  if ($id != ilTree::POS_FIRST_NODE) {
696  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
697  if ($mode == "tree") {
698  $tree_id = $this->skill_tree_repo->getTreeIdForNodeId($id);
699  $tree_obj = $this->skill_tree_manager->getTree($tree_id);
700  $obj_title = $tree_obj->getTitle();
701  } else {
702  $obj_title = (!in_array($node_obj->getType(), ["sktp", "sctp"]))
703  ? $node_obj->getTitle()
704  : $node_obj->getTitle() .
705  " (" .
706  $this->lng->txt("skmg_count_references") . " " .
708  ")";
709  }
710  $confirmation_gui->addItem(
711  "id[]",
712  $node_obj->getId(),
713  $obj_title,
714  ilUtil::getImagePath("icon_" . $node_obj->getType() . ".svg")
715  );
716  }
717  }
718 
719  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
720  if ($mode == "tree") {
721  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDeleteTrees");
722  } else {
723  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
724  }
725 
726  $tpl->setContent($confirmation_gui->getHTML());
727  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _lookupType(int $a_obj_id)
const POS_FIRST_NODE
ilLanguage $lng
static _lookupTrefIdsForTopTemplateId(int $a_template_id)
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
ilToolbarGUI $toolbar
TableGUI class for skill usages.
Skill usage.
static set(string $a_var, $a_val)
Set a value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ edit()

ilObjSkillTreeGUI::edit ( )
protected

Definition at line 346 of file class.ilObjSkillTreeGUI.php.

References $main_tpl, $tabs, $ui, ilTabsGUI\activateTab(), initTreeForm(), and ILIAS\DI\UIServices\renderer().

346  : void
347  {
348  $tabs = $this->tabs;
349  $tabs->activateTab("settings");
350  $mtpl = $this->main_tpl;
351  $ui = $this->ui;
352 
353  if (!$this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
354  return;
355  }
356 
357  $mtpl->setContent($ui->renderer()->render($this->initTreeForm(true)));
358  }
initTreeForm(bool $edit=false)
ilGlobalTemplateInterface $main_tpl
renderer()
Get a renderer for UI components.
Definition: UIServices.php:43
activateTab(string $a_id)
+ Here is the call graph for this function:

◆ editSkills()

ilObjSkillTreeGUI::editSkills ( )

Definition at line 513 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, and ilCtrl\setParameterByClass().

513  : void
514  {
515  $tpl = $this->tpl;
516  $ilTabs = $this->tabs;
517  $lng = $this->lng;
518  $ilCtrl = $this->ctrl;
519 
520  $ilTabs->activateTab("skills");
521 
522  $ilCtrl->setParameterByClass("ilobjskilltreegui", "node_id", $this->skill_tree->readRootId());
523  $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
524  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ editSkillTemplates()

ilObjSkillTreeGUI::editSkillTemplates ( )

Definition at line 792 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, and ilCtrl\setParameterByClass().

792  : void
793  {
794  $tpl = $this->tpl;
795  $ilTabs = $this->tabs;
796  $lng = $this->lng;
797  $ilCtrl = $this->ctrl;
798 
799  $ilTabs->activateTab("skill_templates");
800  $ilCtrl->setParameterByClass("ilobjskilltreegui", "node_id", $this->skill_tree->readRootId());
801  $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
802  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ executeCommand()

ilObjSkillTreeGUI::executeCommand ( )

Definition at line 134 of file class.ilObjSkillTreeGUI.php.

References $error, $ilErr, $rbacsystem, $tabs, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilObjectGUI\prepareOutput(), showLocator(), and showTree().

134  : void
135  {
138  $ilTabs = $this->tabs;
139 
140  $next_class = $this->ctrl->getNextClass($this);
141  $cmd = $this->ctrl->getCmd();
142 
143  $this->prepareOutput();
144  $this->showLocator();
145 
146 
147  if (!$this->skill_tree_access_manager->hasReadTreePermission()) {
148  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
149  }
150 
151  switch ($next_class) {
152  case 'ilskillrootgui':
153  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
154  return;
155  }
156  $skrt_gui = new ilSkillRootGUI(
157  $this->skill_tree_node_manager,
158  $this->requested_node_id
159  );
160  $skrt_gui->setParentGUI($this);
161  $ret = $this->ctrl->forwardCommand($skrt_gui);
162  break;
163 
164  case 'ilskillcategorygui':
165  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
166  return;
167  }
168  $this->tabs_gui->activateTab("skills");
169  $scat_gui = new ilSkillCategoryGUI(
170  $this->skill_tree_node_manager,
171  $this->requested_node_id
172  );
173  $scat_gui->setParentGUI($this);
174  $this->showTree(false, $scat_gui, "listItems");
175  $ret = $this->ctrl->forwardCommand($scat_gui);
176  break;
177 
178  case 'ilbasicskillgui':
179  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
180  return;
181  }
182  $this->tabs_gui->activateTab("skills");
183  $skill_gui = new ilBasicSkillGUI(
184  $this->skill_tree_node_manager,
185  $this->requested_node_id
186  );
187  $skill_gui->setParentGUI($this);
188  $this->showTree(false, $skill_gui, "edit");
189  $ret = $this->ctrl->forwardCommand($skill_gui);
190  break;
191 
192  case 'ilskilltemplatecategorygui':
193  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
194  return;
195  }
196  $this->tabs_gui->activateTab("skill_templates");
197  $sctp_gui = new ilSkillTemplateCategoryGUI(
198  $this->skill_tree_node_manager,
199  $this->requested_node_id,
200  $this->requested_tref_id
201  );
202  $sctp_gui->setParentGUI($this);
203  $this->showTree(($this->requested_tref_id == 0), $sctp_gui, "listItems");
204  $ret = $this->ctrl->forwardCommand($sctp_gui);
205  break;
206 
207  case 'ilbasicskilltemplategui':
208  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
209  return;
210  }
211  $this->tabs_gui->activateTab("skill_templates");
212  $sktp_gui = new ilBasicSkillTemplateGUI(
213  $this->skill_tree_node_manager,
214  $this->requested_node_id,
215  $this->requested_tref_id
216  );
217  $sktp_gui->setParentGUI($this);
218  $this->showTree(($this->requested_tref_id == 0), $sktp_gui, "edit");
219  $ret = $this->ctrl->forwardCommand($sktp_gui);
220  break;
221 
222  case 'ilskilltemplatereferencegui':
223  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
224  return;
225  }
226  $this->tabs_gui->activateTab("skills");
227  $sktr_gui = new ilSkillTemplateReferenceGUI(
228  $this->skill_tree_node_manager,
229  $this->requested_tref_id
230  );
231  $sktr_gui->setParentGUI($this);
232  $this->showTree(false, $sktr_gui, "listItems");
233  $ret = $this->ctrl->forwardCommand($sktr_gui);
234  break;
235 
236  case "ilskillprofilegui":
237  if (!$this->skill_tree_access_manager->hasReadProfilesPermission()) {
238  return;
239  }
240  $ilTabs->activateTab("profiles");
241  $skprof_gui = new ilSkillProfileGUI(
242  $this->skill_tree_access_manager,
243  $this->skill_tree->getTreeId()
244  );
245  $ret = $this->ctrl->forwardCommand($skprof_gui);
246  break;
247 
248  case "ilskillprofileuploadhandlergui":
249  $skprof_upl_gui = new ilSkillProfileUploadHandlerGUI();
250  $ret = $this->ctrl->forwardCommand($skprof_upl_gui);
251  break;
252 
253  case 'ilpermissiongui':
254  if (!$this->skill_tree_access_manager->hasEditTreePermissionsPermission()) {
255  return;
256  }
257  $this->tabs_gui->activateTab('permissions');
258  $perm_gui = new ilPermissionGUI($this);
259  $ret = $this->ctrl->forwardCommand($perm_gui);
260  break;
261 
262  case "ilexportgui":
263  if (!$this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
264  return;
265  }
266  $this->tabs_gui->activateTab('export');
267  $exp_gui = new ilExportGUI($this);
268  $exp_gui->addFormat("xml");
269  //$exp_gui->addFormat("html", "", $this, "exportHTML");
270  $this->object->setType("skmg");
271  $ret = $this->ctrl->forwardCommand($exp_gui);
272  $this->object->setType("skee");
273  break;
274 
275  default:
276  if (!$cmd || $cmd == 'view') {
277  $cmd = "editSkills";
278  }
279 
280  if ($cmd == "showTree") {
281  $this->showTree((bool) $this->requested_templates_tree);
282  } else {
283  $this->$cmd();
284  }
285  break;
286  }
287  }
Skill category GUI class.
Skill root GUI class.
Skill profile GUI class.
Class ilSkillProfileUploadHandlerGUI.
prepareOutput(bool $show_sub_objects=true)
showTree(bool $a_templates, $a_gui="", $a_gui_cmd="")
$ilErr
Definition: raiseError.php:17
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Skill template reference GUI class.
Skill template category GUI class.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Basic skill GUI class.
Basic skill template GUI class.
+ Here is the call graph for this function:

◆ expandAll()

ilObjSkillTreeGUI::expandAll ( bool  $a_redirect = true)

Definition at line 566 of file class.ilObjSkillTreeGUI.php.

References saveAllTitles(), and ilSession\set().

566  : void
567  {
568  $this->requested_skexpand = "";
569  $n_id = ($this->requested_node_id > 0)
570  ? $this->requested_node_id
571  : $this->skill_tree->readRootId();
572  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
573  $n_arr = [];
574  foreach ($stree as $n) {
575  $n_arr[] = $n["child"];
576  ilSession::set("skexpand", $n_arr);
577  }
578  $this->saveAllTitles(false);
579  }
saveAllTitles(bool $a_succ_mess=true)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjSkillTreeGUI::getAdminTabs ( )

Definition at line 453 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$access, ilObjectGUI\$lng, $rbacsystem, ILIAS\Repository\ctrl(), getSkillManagementLink(), and ilLanguage\txt().

453  : void
454  {
456  $ilAccess = $this->access;
457  $lng = $this->lng;
458 
459 
460  $this->tabs_gui->setBackTarget(
461  $lng->txt("skmg_skill_trees"),
462  $this->getSkillManagementLink()
463  );
464 
465  if ($this->skill_tree_access_manager->hasReadTreePermission()) {
466  if ($this->skill_tree_access_manager->hasReadCompetencesPermission()) {
467  $this->tabs_gui->addTab(
468  "skills",
469  $lng->txt("skmg_skills"),
470  $this->ctrl->getLinkTarget($this, "editSkills")
471  );
472  $this->tabs_gui->addTab(
473  "skill_templates",
474  $lng->txt("skmg_skill_templates"),
475  $this->ctrl->getLinkTarget($this, "editSkillTemplates")
476  );
477  }
478 
479  if ($this->skill_tree_access_manager->hasReadProfilesPermission()) {
480  $this->tabs_gui->addTab(
481  "profiles",
482  $lng->txt("skmg_skill_profiles"),
483  $this->ctrl->getLinkTargetByClass("ilskillprofilegui")
484  );
485  }
486 
487  if ($this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
488  $this->tabs_gui->addTab(
489  "settings",
490  $lng->txt("settings"),
491  $this->ctrl->getLinkTarget($this, "edit")
492  );
493  }
494 
495  if ($this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
496  $this->tabs_gui->addTab(
497  "export",
498  $lng->txt("export"),
499  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
500  );
501  }
502  }
503 
504  if ($this->skill_tree_access_manager->hasEditTreePermissionsPermission()) {
505  $this->tabs_gui->addTab(
506  "permissions",
507  $lng->txt("perm_settings"),
508  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
509  );
510  }
511  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng
ilAccessHandler $access
+ Here is the call graph for this function:

◆ getSkillManagementLink()

ilObjSkillTreeGUI::getSkillManagementLink ( )
protected

Definition at line 319 of file class.ilObjSkillTreeGUI.php.

References ILIAS\Repository\ctrl().

Referenced by create(), getAdminTabs(), save(), and showLocator().

319  : string
320  {
321  $this->ctrl->clearParametersByClass("ilobjskillmanagementgui");
322  $this->ctrl->setParameterByClass(
323  "ilobjskillmanagementgui",
324  "ref_id",
325  $this->skill_tree_manager->getSkillManagementRefId()
326  );
327  return $this->ctrl->getLinkTargetByClass("ilobjskillmanagementgui", "");
328  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

ilObjSkillTreeGUI::init ( Service\SkillInternalManagerService  $skill_manager)

Definition at line 122 of file class.ilObjSkillTreeGUI.php.

References ILIAS\Repository\object().

122  : void
123  {
124  $this->skill_tree_manager = $skill_manager->getTreeManager();
125  $this->skill_tree_node_manager = $skill_manager->getTreeNodeManager($this->object->getId());
126  $this->skill_tree_access_manager = $skill_manager->getTreeAccessManager($this->object->getRefId());
127  $this->skill_management_access_manager = $skill_manager->getManagementAccessManager(
128  $this->skill_tree_manager->getSkillManagementRefId()
129  );
130  $this->profile_manager = $skill_manager->getProfileManager();
131  $this->profile_completion_manager = $skill_manager->getProfileCompletionManager();
132  }
+ Here is the call graph for this function:

◆ initTreeForm()

ilObjSkillTreeGUI::initTreeForm ( bool  $edit = false)

Definition at line 360 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, Vendor\Package\$f, ilObjectGUI\$form_action, ilObjectGUI\$lng, $ui, ILIAS\DI\UIServices\factory(), ilCtrl\getLinkTarget(), ILIAS\Repository\object(), and ilLanguage\txt().

Referenced by create(), edit(), and save().

360  : Form\Standard
361  {
362  $ui = $this->ui;
363  $f = $ui->factory();
364  $ctrl = $this->ctrl;
365  $lng = $this->lng;
366 
367  $fields["title"] = $f->input()->field()->text($lng->txt("title"))->withRequired(true);
368  if ($edit) {
369  $fields["title"] = $fields["title"]->withValue($this->object->getTitle());
370  }
371 
372  $fields["description"] = $f->input()->field()->textarea($lng->txt("description"));
373  if ($edit) {
374  $fields["description"] = $fields["description"]->withValue($this->object->getDescription());
375  }
376 
377  // section
378  $section1 = $f->input()->field()->section($fields, $lng->txt("skmg_add_skill_tree"));
379 
380  if ($edit) {
381  $form_action = $ctrl->getLinkTarget($this, "update");
382  } else {
383  $form_action = $ctrl->getLinkTarget($this, "save");
384  }
385  return $f->input()->container()->form()->standard($form_action, ["props" => $section1]);
386  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
factory()
Get the factory that crafts UI components.
Definition: UIServices.php:35
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilObjSkillTreeGUI::save ( )

Definition at line 388 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$data, ilObjectGUI\$lng, $object, ilObjectGUI\$request, $tabs, ilObjectGUI\$tpl, $ui, ilTabsGUI\clearTargets(), getSkillManagementLink(), initTreeForm(), ilCtrl\redirect(), ilCtrl\redirectByClass(), ILIAS\DI\UIServices\renderer(), ilTabsGUI\setBackTarget(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

388  : void
389  {
391  $form = $this->initTreeForm();
392  $lng = $this->lng;
393  $ctrl = $this->ctrl;
394  $tabs = $this->tabs;
395  $tpl = $this->tpl;
396  $ui = $this->ui;
397 
398  if ($request->getMethod() == "POST") {
399  $form = $form->withRequest($request);
400  $data = $form->getData();
401  if (isset($data["props"]) && is_array($data["props"])) {
402  $props = $data["props"];
403  $this->skill_tree_manager->createTree(
404  $props["title"],
405  $props["description"]
406  );
407  $this->main_tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
408  } else {
409  $tpl->setContent($ui->renderer()->render($form));
410  $tabs->clearTargets();
412  $lng->txt("back"),
413  $this->getSkillManagementLink()
414  );
415  return;
416  }
417  }
418  $ctrl->redirectByClass("ilskillrootgui", "listSkills");
419  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
initTreeForm(bool $edit=false)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
ServerRequestInterface $request
renderer()
Get a renderer for UI components.
Definition: UIServices.php:43
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
+ Here is the call graph for this function:

◆ saveAllTemplateTitles()

ilObjSkillTreeGUI::saveAllTemplateTitles ( bool  $a_succ_mess = true)

Definition at line 546 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$id, ilObjectGUI\$lng, ilSkillTreeNode\_writeTitle(), ilSkillTreeNodeFactory\getInstance(), ilUtil\stripSlashes(), and ilLanguage\txt().

546  : void
547  {
548  $ilCtrl = $this->ctrl;
549  $lng = $this->lng;
550 
551  if (!count($this->requested_titles) == 0) {
552  foreach ($this->requested_titles as $id => $title) {
554  if (is_object($node_obj)) {
555  // update title
557  }
558  }
559  if ($a_succ_mess) {
560  $this->main_tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
561  }
562  }
563  $ilCtrl->redirect($this, "editSkillTemplates");
564  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
ilLanguage $lng
static _writeTitle(int $a_obj_id, string $a_title)
+ Here is the call graph for this function:

◆ saveAllTitles()

ilObjSkillTreeGUI::saveAllTitles ( bool  $a_succ_mess = true)

Definition at line 526 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$id, ilObjectGUI\$lng, ilSkillTreeNode\_writeTitle(), ilSkillTreeNodeFactory\getInstance(), ilUtil\stripSlashes(), and ilLanguage\txt().

Referenced by collapseAll(), and expandAll().

526  : void
527  {
528  $ilCtrl = $this->ctrl;
529  $lng = $this->lng;
530 
531  if (!count($this->requested_titles) == 0) {
532  foreach ($this->requested_titles as $id => $title) {
534  if (is_object($node_obj)) {
535  // update title
537  }
538  }
539  if ($a_succ_mess) {
540  $this->main_tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
541  }
542  }
543  $ilCtrl->redirect($this, "editSkills");
544  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
ilLanguage $lng
static _writeTitle(int $a_obj_id, string $a_title)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLocator()

ilObjSkillTreeGUI::showLocator ( )
protected

Definition at line 289 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, $locator, ilLocatorGUI\addItem(), ilLocatorGUI\clearItems(), ILIAS\Repository\ctrl(), getSkillManagementLink(), ILIAS\Repository\lng(), ilCtrl\setParameterByClass(), and SYSTEM_FOLDER_ID.

Referenced by executeCommand().

289  : void
290  {
291  $ctrl = $this->ctrl;
293 
294  $locator->clearItems();
295 
297  "ilobjsystemfoldergui",
298  "ref_id",
300  );
301  $locator->addItem(
302  $this->lng->txt("administration"),
303  $this->ctrl->getLinkTargetByClass(array("iladministrationgui", "ilobjsystemfoldergui"), "")
304  );
305  $locator->addItem(
306  $this->lng->txt("obj_skmg"),
307  $this->getSkillManagementLink()
308  );
309 
310  /*
311  if ($this->object && ($this->object->getRefId() != SYSTEM_FOLDER_ID && !$a_do_not_add_object)) {
312  $ilLocator->addItem(
313  $this->object->getTitle(),
314  $this->ctrl->getLinkTarget($this, "view")
315  );
316  }*/
317  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
const SYSTEM_FOLDER_ID
Definition: constants.php:35
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTree()

ilObjSkillTreeGUI::showTree ( bool  $a_templates,
  $a_gui = "",
  $a_gui_cmd = "" 
)

Definition at line 808 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, $ilUser, ilObjectGUI\$lng, $path, ilObjectGUI\$tpl, ilObjectGUI\$user, ilSkillTreeNode\_lookupType(), ILIAS\Repository\object(), ilGlobalTemplateInterface\setLeftNavContent(), ilSkillGSToolProvider\SHOW_SKILL_TREE, ilSkillGSToolProvider\SHOW_TEMPLATE_TREE, and ilSkillGSToolProvider\SKILL_TREE_ID.

Referenced by executeCommand().

808  : void
809  {
811  $tpl = $this->tpl;
812  $ilCtrl = $this->ctrl;
813  $lng = $this->lng;
814 
815  if ($a_templates) {
816  if ($this->requested_node_id == 0 || $this->requested_node_id == $this->skill_tree->readRootId()) {
817  return;
818  }
819 
820  if ($this->requested_node_id != $this->skill_tree->readRootId()) {
821  $path = $this->skill_tree->getPathId($this->requested_node_id);
822  if (ilSkillTreeNode::_lookupType($path[1]) == "sktp") {
823  return;
824  }
825  }
826  }
827 
828  $ilCtrl->setParameter($this, "templates_tree", (int) $a_templates);
829 
830  if ($a_templates) {
831  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SHOW_TEMPLATE_TREE, true);
832  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SKILL_TREE_ID, $this->object->getId());
833  $exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree", $this->object->getId());
834  } else {
835  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SHOW_SKILL_TREE, true);
836  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SKILL_TREE_ID, $this->object->getId());
837  $exp = new ilSkillTreeExplorerGUI($this, "showTree", $this->object->getId());
838  }
839  if (!$exp->handleCommand()) {
840  $tpl->setLeftNavContent($exp->getHTML());
841  }
842  }
Explorer class that works on tree objects (Services/Tree)
static _lookupType(int $a_obj_id)
$path
Definition: ltiservices.php:32
ilLanguage $lng
ilGlobalTemplateInterface $tpl
$ilUser
Definition: imgupload.php:34
Explorer class that works on tree objects (Services/Tree)
setLeftNavContent(string $a_content)
Sets content of left navigation column.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $admin_gui_request

Service SkillAdminGUIRequest ilObjSkillTreeGUI::$admin_gui_request
protected

Definition at line 53 of file class.ilObjSkillTreeGUI.php.

◆ $error

ilErrorHandling ilObjSkillTreeGUI::$error
protected

Definition at line 39 of file class.ilObjSkillTreeGUI.php.

Referenced by executeCommand().

◆ $locator

ilLocatorGUI ilObjSkillTreeGUI::$locator
protected

Definition at line 38 of file class.ilObjSkillTreeGUI.php.

Referenced by showLocator().

◆ $main_tpl

ilGlobalTemplateInterface ilObjSkillTreeGUI::$main_tpl
protected

Definition at line 51 of file class.ilObjSkillTreeGUI.php.

Referenced by create(), and edit().

◆ $object

ilObject ilObjSkillTreeGUI::$object

Definition at line 36 of file class.ilObjSkillTreeGUI.php.

Referenced by save().

◆ $profile_completion_manager

Profile SkillProfileCompletionManager ilObjSkillTreeGUI::$profile_completion_manager
protected

Definition at line 47 of file class.ilObjSkillTreeGUI.php.

◆ $profile_manager

Profile SkillProfileManager ilObjSkillTreeGUI::$profile_manager
protected

Definition at line 46 of file class.ilObjSkillTreeGUI.php.

◆ $rbacsystem

ilRbacSystem ilObjSkillTreeGUI::$rbacsystem
protected

Definition at line 37 of file class.ilObjSkillTreeGUI.php.

Referenced by executeCommand(), and getAdminTabs().

◆ $requested_node_id

int ilObjSkillTreeGUI::$requested_node_id = 0
protected

Definition at line 54 of file class.ilObjSkillTreeGUI.php.

◆ $requested_node_ids

array ilObjSkillTreeGUI::$requested_node_ids = []
protected

Definition at line 68 of file class.ilObjSkillTreeGUI.php.

◆ $requested_skexpand

string ilObjSkillTreeGUI::$requested_skexpand = ""
protected

Definition at line 57 of file class.ilObjSkillTreeGUI.php.

◆ $requested_templates_tree

int ilObjSkillTreeGUI::$requested_templates_tree = 0
protected

Definition at line 56 of file class.ilObjSkillTreeGUI.php.

◆ $requested_titles

array ilObjSkillTreeGUI::$requested_titles = []
protected

Definition at line 63 of file class.ilObjSkillTreeGUI.php.

◆ $requested_tmpmode

int ilObjSkillTreeGUI::$requested_tmpmode = 0
protected

Definition at line 58 of file class.ilObjSkillTreeGUI.php.

◆ $requested_tref_id

int ilObjSkillTreeGUI::$requested_tref_id = 0
protected

Definition at line 55 of file class.ilObjSkillTreeGUI.php.

◆ $skill_management_access_manager

Access SkillManagementAccess ilObjSkillTreeGUI::$skill_management_access_manager
protected

Definition at line 45 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree

ilSkillTree ilObjSkillTreeGUI::$skill_tree
protected

Definition at line 41 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree_access_manager

Access SkillTreeAccess ilObjSkillTreeGUI::$skill_tree_access_manager
protected

Definition at line 44 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree_factory

Tree SkillTreeFactory ilObjSkillTreeGUI::$skill_tree_factory
protected

Definition at line 49 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree_manager

Tree SkillTreeManager ilObjSkillTreeGUI::$skill_tree_manager
protected

Definition at line 42 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree_node_manager

Tree SkillTreeNodeManager ilObjSkillTreeGUI::$skill_tree_node_manager
protected

Definition at line 43 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree_repo

ilSkillTreeRepository ilObjSkillTreeGUI::$skill_tree_repo
protected

Definition at line 48 of file class.ilObjSkillTreeGUI.php.

◆ $tabs

ilTabsGUI ilObjSkillTreeGUI::$tabs
protected

◆ $tool_context

ScreenContext ContextServices ilObjSkillTreeGUI::$tool_context
protected

Definition at line 52 of file class.ilObjSkillTreeGUI.php.

◆ $ui

UIServices ilObjSkillTreeGUI::$ui
protected

Definition at line 50 of file class.ilObjSkillTreeGUI.php.

Referenced by create(), edit(), initTreeForm(), and save().


The documentation for this class was generated from the following file: