ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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
 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] does belong to the parent 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 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)
 
 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 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
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 showLocator ()
 
 getSkillManagementLink ()
 
 create ()
 
 edit ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 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...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 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...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 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...
 
 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...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ilRbacSystem $rbacsystem
 
ilLocatorGUI $locator
 
ilErrorHandling $error
 
ilTabsGUI $tabs
 
ilSkillTree $skill_tree
 
Tree SkillTreeManager $skill_tree_manager
 
Node SkillTreeNodeManager $skill_tree_node_manager
 
Access SkillTreeAccess $skill_tree_access_manager
 
Access SkillManagementAccess $skill_management_access_manager
 
Node SkillDeletionManager $skill_deletion_manager
 
Usage SkillUsageManager $skill_usage_manager
 
ilSkillTreeRepository $skill_tree_repo
 
Tree SkillTreeFactory $skill_tree_factory
 
UIServices $ui
 
ilGlobalTemplateInterface $main_tpl
 
ScreenContext ContextServices $tool_context
 
Service SkillAdminGUIRequest $admin_gui_request
 
Service SkillUIService $skill_ui_service
 
int $requested_node_id = 0
 
int $requested_tref_id = 0
 
int $requested_templates_tree = 0
 
string $requested_skexpand = ""
 
bool $requested_tmpmode = false
 
array $requested_titles = []
 
array $requested_node_ids = []
 
string $requested_table_action = ""
 
array $requested_table_tree_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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
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 87 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().

92  {
93  global $DIC;
94 
95  $this->ctrl = $DIC->ctrl();
96  $this->rbacsystem = $DIC->rbac()->system();
97  $this->error = $DIC["ilErr"];
98  $this->access = $DIC->access();
99  $this->tabs = $DIC->tabs();
100  $this->lng = $DIC->language();
101  $this->settings = $DIC->settings();
102  $this->tpl = $DIC["tpl"];
103  $this->toolbar = $DIC->toolbar();
104  $this->user = $DIC->user();
105  $ilCtrl = $DIC->ctrl();
106  $this->ui = $DIC->ui();
107  $this->main_tpl = $DIC->ui()->mainTemplate();
108  $this->locator = $DIC["ilLocator"];
109  $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
110  $this->skill_ui_service = $DIC->skills()->ui();
111 
112  $this->type = "skee";
113  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
114 
115  $this->lng->loadLanguageModule('skmg');
116 
117  $this->skill_tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
118  $this->skill_tree_factory = $DIC->skills()->internal()->factory()->tree();
119  $this->skill_tree = $this->skill_tree_factory->getTreeById($this->object->getId());
120 
121  $ilCtrl->saveParameter($this, "node_id");
122 
123  $this->tool_context = $DIC->globalScreen()->tool()->context();
124 
125  $this->requested_node_id = $this->admin_gui_request->getNodeId();
126  $this->requested_tref_id = $this->admin_gui_request->getTrefId();
127  $this->requested_templates_tree = $this->admin_gui_request->getTemplatesTree();
128  $this->requested_skexpand = $this->admin_gui_request->getSkillExpand();
129  $this->requested_tmpmode = $this->admin_gui_request->getTemplateMode();
130  $this->requested_titles = $this->admin_gui_request->getTitles();
131  $this->requested_node_ids = $this->admin_gui_request->getNodeIds();
132  $this->requested_table_action = $this->admin_gui_request->getTableTreeAction();
133  $this->requested_table_tree_ids = $this->admin_gui_request->getTableTreeIds();
134  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilObjSkillTreeGUI::cancelDelete ( )

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

References ILIAS\Repository\ctrl().

752  : void
753  {
754  $this->ctrl->redirectByClass("ilobjskillmanagementgui", "");
755  }
+ Here is the call graph for this function:

◆ collapseAll()

ilObjSkillTreeGUI::collapseAll ( bool  $a_redirect = true)

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

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

608  : void
609  {
610  $this->requested_skexpand = "";
611  $n_id = ($this->requested_node_id > 0)
612  ? $this->requested_node_id
613  : $this->skill_tree->readRootId();
614  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
615  $old = ilSession::get("skexpand");
616  foreach ($stree as $n) {
617  if (in_array($n["child"], $old) && $n["child"] != $n_id) {
618  $k = array_search($n["child"], $old);
619  unset($old[$k]);
620  }
621  }
622  ilSession::set("skexpand", $old);
623  $this->saveAllTitles(false);
624  }
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 771 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$id, and ILIAS\Repository\lng().

771  : void
772  {
773  // delete all selected objects
774  foreach ($this->requested_node_ids as $id) {
775  $this->skill_deletion_manager->deleteNode($id, $this->skill_tree);
776  }
777  $this->skill_deletion_manager->updateProfileCompletions($this->skill_tree);
778 
779  // feedback
780  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
781  }
+ Here is the call graph for this function:

◆ confirmedDeleteTrees()

ilObjSkillTreeGUI::confirmedDeleteTrees ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$id, ILIAS\Repository\lng(), and ilCtrl\redirectByClass().

757  : void
758  {
759  $ctrl = $this->ctrl;
760 
761  // delete all selected trees
762  foreach ($this->requested_node_ids as $id) {
763  $this->skill_deletion_manager->deleteTree($id);
764  }
765 
766  // feedback
767  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
768  $ctrl->redirectByClass("ilobjskillmanagementgui", "");
769  }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ create()

ilObjSkillTreeGUI::create ( )
protected

Definition at line 344 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().

344  : void
345  {
346  $lng = $this->lng;
347  $tabs = $this->tabs;
348  $mtpl = $this->main_tpl;
349  $ui = $this->ui;
350 
351  $tabs->clearTargets();
353  $lng->txt("back"),
354  $this->getSkillManagementLink()
355  );
356 
357  $mtpl->setContent($ui->renderer()->render($this->initTreeForm()));
358  }
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:44
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 460 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$tree, deleteNodes(), and ilTree\readRootId().

460  : void
461  {
462  $ctrl = $this->ctrl;
463 
464  if ($this->requested_table_action === "deleteTrees"
465  && !empty($this->requested_table_tree_ids)
466  && $this->requested_table_tree_ids[0] === "ALL_OBJECTS"
467  ) {
468  $all_trees = $this->skill_tree_manager->getTrees();
469  foreach ($all_trees as $tree_obj) {
470  $tree = $this->skill_tree_factory->getTreeById($tree_obj->getId());
471  $this->requested_node_ids[] = $tree->readRootId();
472  }
473  } elseif ($this->requested_table_action === "deleteTrees") {
474  $this->requested_node_ids = array_map("intval", $this->requested_table_tree_ids);
475  }
476 
477  $this->deleteNodes($this);
478  }
+ Here is the call graph for this function:

◆ deleteNodes()

ilObjSkillTreeGUI::deleteNodes ( object  $a_gui)

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

References ilObjectGUI\$ctrl, ilObjectGUI\$id, ilObjectGUI\$lng, $tabs, 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(), ILIAS\UICore\GlobalTemplate\setContent(), ILIAS\UICore\GlobalTemplate\setOnScreenMessage(), and ilLanguage\txt().

Referenced by delete().

626  : void
627  {
628  $lng = $this->lng;
629  $tpl = $this->tpl;
630  $ilCtrl = $this->ctrl;
631  $ilTabs = $this->tabs;
632 
633  if (empty($this->requested_node_ids)) {
634  $tpl->setOnScreenMessage("info", $lng->txt("no_checkbox"), true);
635  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
636  }
637 
638  $ilTabs->clearTargets();
639 
640  // check usages
641  $mode = "";
642  $tree_ids = [];
643  $cskill_ids = [];
644  foreach ($this->requested_node_ids as $id) {
645  if (ilSkillTreeNode::_lookupType($id) == "skrt") {
646  if (!$this->skill_management_access_manager->hasCreateTreePermission()) {
647  return;
648  }
649  $mode = "tree";
650  $tree_node_id = $id;
651  $tree_ids[] = $tree_node_id;
652  }
653  if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr"))) {
654  if ($mode == "templates") {
655  $tpl->setOnScreenMessage("failure", "Skill Deletion - type mismatch.", true);
656  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
657  }
658  $mode = "basic";
659  $skill_id = $id;
660  $tref_id = 0;
661  if (ilSkillTreeNode::_lookupType($id) == "sktr") {
663  $tref_id = $id;
664  }
665  $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
666  }
667  if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp"))) {
668  if ($mode == "basic") {
669  $tpl->setOnScreenMessage("failure", "Skill Deletion - type mismatch.", true);
670  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
671  }
672  $mode = "templates";
673 
674  foreach (ilSkillTemplateReference::_lookupTrefIdsForTemplateId($id) as $tref_id) {
675  $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
676  }
677  }
678  // for cats, skills and template references, get "real" usages
679  // for skill and category templates check usage in references
680  }
681 
682  $usages = [];
683  if ($mode == "tree") {
684  $usages = $this->skill_usage_manager->getAllUsagesInfoOfTrees($tree_ids);
685  } elseif ($mode == "basic" || $mode == "templates") {
686  $usages = $this->skill_usage_manager->getAllUsagesInfoOfSubtrees($cskill_ids);
687  } else {
688  $tpl->setOnScreenMessage("failure", "Skill Deletion - type mismatch.", true);
689  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
690  }
691 
692  $usage_html = "";
693  if (count($usages) > 0) {
694  foreach ($usages as $k => $usage) {
695  $usages_ui = $this->skill_ui_service->getUsagesUI($k, $usage, $mode);
696  $usage_html .= $usages_ui->render() . "<br/><br/>";
697  }
698  $ilCtrl->saveParameter($a_gui, "tmpmode");
699  }
700 
701  // SAVE POST VALUES
702  ilSession::set("saved_post", $this->requested_node_ids);
703 
704  $confirmation_gui = new ilConfirmationGUI();
705 
706  $ilCtrl->setParameter($a_gui, "tmpmode", (int) $this->requested_tmpmode);
707  $a_form_action = $this->ctrl->getFormAction($a_gui);
708  $confirmation_gui->setFormAction($a_form_action);
709  if (count($usages) > 0) {
710  $confirmation_text = $this->lng->txt("skmg_delete_warning");
711  } else {
712  $confirmation_text = $this->lng->txt("info_delete_sure");
713  }
714  $confirmation_gui->setHeaderText($confirmation_text);
715 
716  // Add items to delete
717  foreach ($this->requested_node_ids as $id) {
718  if ($id != ilTree::POS_FIRST_NODE) {
719  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
720  if ($mode == "tree") {
721  $tree_id = $this->skill_tree_repo->getTreeIdForNodeId($id);
722  $tree_obj = $this->skill_tree_manager->getTree($tree_id);
723  $obj_title = $tree_obj->getTitle();
724  } else {
725  $obj_title = (!in_array($node_obj->getType(), ["sktp", "sctp"]))
726  ? $node_obj->getTitle()
727  : $node_obj->getTitle() .
728  " (" .
729  $this->lng->txt("skmg_count_references") . " " .
731  ")";
732  }
733  $confirmation_gui->addItem(
734  "id[]",
735  (string) $node_obj->getId(),
736  $obj_title,
737  ilUtil::getImagePath("standard/icon_" . $node_obj->getType() . ".svg")
738  );
739  }
740  }
741 
742  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
743  if ($mode == "tree") {
744  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDeleteTrees");
745  } else {
746  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
747  }
748 
749  $tpl->setContent($confirmation_gui->getHTML() . $usage_html);
750  }
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
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...
setContent(string $a_html)
Sets content for standard template.
static _lookupType(int $a_obj_id)
const POS_FIRST_NODE
ilLanguage $lng
static _lookupTrefIdsForTopTemplateId(int $a_template_id)
ilGlobalTemplateInterface $tpl
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ edit()

ilObjSkillTreeGUI::edit ( )
protected

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

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

360  : void
361  {
362  $tabs = $this->tabs;
363  $tabs->activateTab("settings");
364  $mtpl = $this->main_tpl;
365  $ui = $this->ui;
366 
367  if (!$this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
368  return;
369  }
370 
371  $mtpl->setContent($ui->renderer()->render($this->initTreeForm(true)));
372  }
initTreeForm(bool $edit=false)
ilGlobalTemplateInterface $main_tpl
renderer()
Get a renderer for UI components.
Definition: UIServices.php:44
activateTab(string $a_id)
+ Here is the call graph for this function:

◆ editSkills()

ilObjSkillTreeGUI::editSkills ( )

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

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

540  : void
541  {
542  $tpl = $this->tpl;
543  $ilTabs = $this->tabs;
544  $lng = $this->lng;
545  $ilCtrl = $this->ctrl;
546 
547  $ilTabs->activateTab("skills");
548 
549  $ilCtrl->setParameterByClass(self::class, "node_id", $this->skill_tree->readRootId());
550  $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
551  }
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 787 of file class.ilObjSkillTreeGUI.php.

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

787  : void
788  {
789  $tpl = $this->tpl;
790  $ilTabs = $this->tabs;
791  $lng = $this->lng;
792  $ilCtrl = $this->ctrl;
793 
794  $ilTabs->activateTab("skill_templates");
795  $ilCtrl->setParameter($this, "node_id", $this->skill_tree->readRootId());
796  $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
797  }
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ executeCommand()

ilObjSkillTreeGUI::executeCommand ( )

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

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

148  : void
149  {
152  $ilTabs = $this->tabs;
153 
154  $next_class = $this->ctrl->getNextClass($this);
155  $cmd = $this->ctrl->getCmd();
156 
157  $this->prepareOutput();
158  $this->showLocator();
159 
160 
161  if (!$this->skill_tree_access_manager->hasReadTreePermission()) {
162  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
163  }
164 
165  switch ($next_class) {
166  case 'ilskillrootgui':
167  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
168  return;
169  }
170  $skrt_gui = new ilSkillRootGUI(
171  $this->skill_tree_node_manager,
172  $this->requested_node_id
173  );
174  $skrt_gui->setParentGUI($this);
175  $ret = $this->ctrl->forwardCommand($skrt_gui);
176  break;
177 
178  case 'ilskillcategorygui':
179  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
180  return;
181  }
182  $this->tabs_gui->activateTab("skills");
183  $scat_gui = new ilSkillCategoryGUI(
184  $this->skill_tree_node_manager,
185  $this->requested_node_id
186  );
187  $scat_gui->setParentGUI($this);
188  $this->showTree(false, $scat_gui, "listItems");
189  $ret = $this->ctrl->forwardCommand($scat_gui);
190  break;
191 
192  case 'ilbasicskillgui':
193  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
194  return;
195  }
196  $this->tabs_gui->activateTab("skills");
197  $skill_gui = new ilBasicSkillGUI(
198  $this->skill_tree_node_manager,
199  $this->requested_node_id
200  );
201  $skill_gui->setParentGUI($this);
202  $this->showTree(false, $skill_gui, "edit");
203  $ret = $this->ctrl->forwardCommand($skill_gui);
204  break;
205 
206  case 'ilskilltemplatecategorygui':
207  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
208  return;
209  }
210  $this->tabs_gui->activateTab("skill_templates");
211  $sctp_gui = new ilSkillTemplateCategoryGUI(
212  $this->skill_tree_node_manager,
213  $this->requested_node_id,
214  $this->requested_tref_id
215  );
216  $sctp_gui->setParentGUI($this);
217  $this->showTree(($this->requested_tref_id == 0), $sctp_gui, "listItems");
218  $ret = $this->ctrl->forwardCommand($sctp_gui);
219  break;
220 
221  case 'ilbasicskilltemplategui':
222  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
223  return;
224  }
225  $this->tabs_gui->activateTab("skill_templates");
226  $sktp_gui = new ilBasicSkillTemplateGUI(
227  $this->skill_tree_node_manager,
228  $this->requested_node_id,
229  $this->requested_tref_id
230  );
231  $sktp_gui->setParentGUI($this);
232  $this->showTree(($this->requested_tref_id == 0), $sktp_gui, "edit");
233  $ret = $this->ctrl->forwardCommand($sktp_gui);
234  break;
235 
236  case 'ilskilltemplatereferencegui':
237  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
238  return;
239  }
240  $this->tabs_gui->activateTab("skills");
241  $sktr_gui = new ilSkillTemplateReferenceGUI(
242  $this->skill_tree_node_manager,
243  $this->requested_tref_id
244  );
245  $sktr_gui->setParentGUI($this);
246  $this->showTree(false, $sktr_gui, "listItems");
247  $ret = $this->ctrl->forwardCommand($sktr_gui);
248  break;
249 
250  case "ilskillprofilegui":
251  if (!$this->skill_tree_access_manager->hasReadProfilesPermission()) {
252  return;
253  }
254  $ilTabs->activateTab("profiles");
255  $skprof_gui = new ilSkillProfileGUI(
256  $this->skill_tree_access_manager,
257  $this->skill_tree->getTreeId()
258  );
259  $ret = $this->ctrl->forwardCommand($skprof_gui);
260  break;
261 
262  case "ilskillprofileuploadhandlergui":
263  $skprof_upl_gui = new ilSkillProfileUploadHandlerGUI();
264  $ret = $this->ctrl->forwardCommand($skprof_upl_gui);
265  break;
266 
267  case 'ilpermissiongui':
268  if (!$this->skill_tree_access_manager->hasEditTreePermissionsPermission()) {
269  return;
270  }
271  $this->tabs_gui->activateTab('permissions');
272  $perm_gui = new ilPermissionGUI($this);
273  $ret = $this->ctrl->forwardCommand($perm_gui);
274  break;
275 
276  case "ilexportgui":
277  if (!$this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
278  return;
279  }
280  $this->tabs_gui->activateTab('export');
281  $exp_gui = new ilExportGUI($this);
282  $exp_gui->addFormat("xml");
283  //$exp_gui->addFormat("html", "", $this, "exportHTML");
284  $this->object->setType("skmg");
285  $ret = $this->ctrl->forwardCommand($exp_gui);
286  $this->object->setType("skee");
287  break;
288 
289  default:
290  if (!$cmd || $cmd == 'view') {
291  $cmd = "editSkills";
292  }
293 
294  if ($cmd == "showTree") {
295  $this->showTree((bool) $this->requested_templates_tree);
296  } else {
297  $this->$cmd();
298  }
299  break;
300  }
301  }
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:33
Skill template reference GUI class.
Skill template category GUI class.
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 593 of file class.ilObjSkillTreeGUI.php.

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

593  : void
594  {
595  $this->requested_skexpand = "";
596  $n_id = ($this->requested_node_id > 0)
597  ? $this->requested_node_id
598  : $this->skill_tree->readRootId();
599  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
600  $n_arr = [];
601  foreach ($stree as $n) {
602  $n_arr[] = $n["child"];
603  ilSession::set("skexpand", $n_arr);
604  }
605  $this->saveAllTitles(false);
606  }
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 480 of file class.ilObjSkillTreeGUI.php.

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

480  : void
481  {
483  $ilAccess = $this->access;
484  $lng = $this->lng;
485 
486 
487  $this->tabs_gui->setBackTarget(
488  $lng->txt("skmg_skill_trees"),
489  $this->getSkillManagementLink()
490  );
491 
492  if ($this->skill_tree_access_manager->hasReadTreePermission()) {
493  if ($this->skill_tree_access_manager->hasReadCompetencesPermission()) {
494  $this->tabs_gui->addTab(
495  "skills",
496  $lng->txt("skmg_skills"),
497  $this->ctrl->getLinkTarget($this, "editSkills")
498  );
499  $this->tabs_gui->addTab(
500  "skill_templates",
501  $lng->txt("skmg_skill_templates"),
502  $this->ctrl->getLinkTarget($this, "editSkillTemplates")
503  );
504  }
505 
506  if ($this->skill_tree_access_manager->hasReadProfilesPermission()) {
507  $this->tabs_gui->addTab(
508  "profiles",
509  $lng->txt("skmg_skill_profiles"),
510  $this->ctrl->getLinkTargetByClass("ilskillprofilegui")
511  );
512  }
513 
514  if ($this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
515  $this->tabs_gui->addTab(
516  "settings",
517  $lng->txt("settings"),
518  $this->ctrl->getLinkTarget($this, "edit")
519  );
520  }
521 
522  if ($this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
523  $this->tabs_gui->addTab(
524  "export",
525  $lng->txt("export"),
526  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
527  );
528  }
529  }
530 
531  if ($this->skill_tree_access_manager->hasEditTreePermissionsPermission()) {
532  $this->tabs_gui->addTab(
533  "permissions",
534  $lng->txt("perm_settings"),
535  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
536  );
537  }
538  }
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 333 of file class.ilObjSkillTreeGUI.php.

References ILIAS\Repository\ctrl().

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

333  : string
334  {
335  $this->ctrl->clearParametersByClass("ilobjskillmanagementgui");
336  $this->ctrl->setParameterByClass(
337  "ilobjskillmanagementgui",
338  "ref_id",
339  $this->skill_tree_manager->getSkillManagementRefId()
340  );
341  return $this->ctrl->getLinkTargetByClass("ilobjskillmanagementgui", "");
342  }
+ 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 136 of file class.ilObjSkillTreeGUI.php.

References ILIAS\Repository\object().

136  : void
137  {
138  $this->skill_tree_manager = $skill_manager->getTreeManager();
139  $this->skill_tree_node_manager = $skill_manager->getTreeNodeManager($this->object->getId());
140  $this->skill_tree_access_manager = $skill_manager->getTreeAccessManager($this->object->getRefId());
141  $this->skill_management_access_manager = $skill_manager->getManagementAccessManager(
142  $this->skill_tree_manager->getSkillManagementRefId()
143  );
144  $this->skill_deletion_manager = $skill_manager->getDeletionManager();
145  $this->skill_usage_manager = $skill_manager->getUsageManager();
146  }
+ Here is the call graph for this function:

◆ initTreeForm()

ilObjSkillTreeGUI::initTreeForm ( bool  $edit = false)

Definition at line 374 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().

374  : Form\Standard
375  {
376  $ui = $this->ui;
377  $f = $ui->factory();
378  $ctrl = $this->ctrl;
379  $lng = $this->lng;
380 
381  $fields["title"] = $f->input()->field()->text($lng->txt("title"))->withRequired(true);
382  if ($edit) {
383  $fields["title"] = $fields["title"]->withValue($this->object->getTitle());
384  }
385 
386  $fields["description"] = $f->input()->field()->textarea($lng->txt("description"));
387  if ($edit) {
388  $fields["description"] = $fields["description"]->withValue($this->object->getDescription());
389  }
390 
391  // section
392  $section1 = $f->input()->field()->section($fields, $lng->txt("skmg_add_skill_tree"));
393 
394  if ($edit) {
395  $form_action = $ctrl->getLinkTarget($this, "update");
396  } else {
397  $form_action = $ctrl->getLinkTarget($this, "save");
398  }
399  return $f->input()->container()->form()->standard($form_action, ["props" => $section1]);
400  }
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...
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
ilLanguage $lng
factory()
Get the factory that crafts UI components.
Definition: UIServices.php:36
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilObjSkillTreeGUI::save ( )

Definition at line 402 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(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

402  : void
403  {
405  $form = $this->initTreeForm();
406  $lng = $this->lng;
407  $ctrl = $this->ctrl;
408  $tabs = $this->tabs;
409  $tpl = $this->tpl;
410  $ui = $this->ui;
411 
412  if ($request->getMethod() == "POST") {
413  $form = $form->withRequest($request);
414  $data = $form->getData();
415  if (isset($data["props"]) && is_array($data["props"])) {
416  $props = $data["props"];
417  $this->skill_tree_manager->createTree(
418  $props["title"],
419  $props["description"]
420  );
421  $this->main_tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
422  } else {
423  $tpl->setContent($ui->renderer()->render($form));
424  $tabs->clearTargets();
426  $lng->txt("back"),
427  $this->getSkillManagementLink()
428  );
429  return;
430  }
431  }
432  $ctrl->redirectByClass("ilskillrootgui", "listSkills");
433  }
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...
setContent(string $a_html)
Sets content for standard template.
initTreeForm(bool $edit=false)
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
ServerRequestInterface $request
renderer()
Get a renderer for UI components.
Definition: UIServices.php:44
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 573 of file class.ilObjSkillTreeGUI.php.

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

573  : void
574  {
575  $ilCtrl = $this->ctrl;
576  $lng = $this->lng;
577 
578  if (!count($this->requested_titles) == 0) {
579  foreach ($this->requested_titles as $id => $title) {
581  if (is_object($node_obj)) {
582  // update title
584  }
585  }
586  if ($a_succ_mess) {
587  $this->main_tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
588  }
589  }
590  $ilCtrl->redirect($this, "editSkillTemplates");
591  }
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 553 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().

553  : void
554  {
555  $ilCtrl = $this->ctrl;
556  $lng = $this->lng;
557 
558  if (!count($this->requested_titles) == 0) {
559  foreach ($this->requested_titles as $id => $title) {
561  if (is_object($node_obj)) {
562  // update title
564  }
565  }
566  if ($a_succ_mess) {
567  $this->main_tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
568  }
569  }
570  $ilCtrl->redirect($this, "editSkills");
571  }
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 303 of file class.ilObjSkillTreeGUI.php.

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

Referenced by executeCommand().

303  : void
304  {
305  $ctrl = $this->ctrl;
307 
308  $locator->clearItems();
309 
311  "ilobjsystemfoldergui",
312  "ref_id",
314  );
315  $locator->addItem(
316  $this->lng->txt("administration"),
317  $this->ctrl->getLinkTargetByClass(array("iladministrationgui", "ilobjsystemfoldergui"), "")
318  );
319  $locator->addItem(
320  $this->lng->txt("obj_skmg"),
321  $this->getSkillManagementLink()
322  );
323 
324  /*
325  if ($this->object && ($this->object->getRefId() != SYSTEM_FOLDER_ID && !$a_do_not_add_object)) {
326  $ilLocator->addItem(
327  $this->object->getTitle(),
328  $this->ctrl->getLinkTarget($this, "view")
329  );
330  }*/
331  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
const SYSTEM_FOLDER_ID
Definition: constants.php:35
+ 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 803 of file class.ilObjSkillTreeGUI.php.

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

Referenced by executeCommand().

803  : void
804  {
805  $ilUser = $this->user;
806  $tpl = $this->tpl;
807  $ilCtrl = $this->ctrl;
808  $lng = $this->lng;
809 
810  if ($a_templates) {
811  if ($this->requested_node_id == 0 || $this->requested_node_id == $this->skill_tree->readRootId()) {
812  return;
813  }
814 
815  if ($this->requested_node_id != $this->skill_tree->readRootId()) {
816  $path = $this->skill_tree->getPathId($this->requested_node_id);
817  if (ilSkillTreeNode::_lookupType($path[1]) == "sktp") {
818  return;
819  }
820  }
821  }
822 
823  $ilCtrl->setParameter($this, "templates_tree", (int) $a_templates);
824 
825  if ($a_templates) {
826  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SHOW_TEMPLATE_TREE, true);
827  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SKILL_TREE_ID, $this->object->getId());
828  $exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree", $this->object->getId());
829  } else {
830  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SHOW_SKILL_TREE, true);
831  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SKILL_TREE_ID, $this->object->getId());
832  $exp = new ilSkillTreeExplorerGUI($this, "showTree", $this->object->getId());
833  }
834  if (!$exp->handleCommand()) {
835  $tpl->setLeftNavContent($exp->getHTML());
836  }
837  }
Explorer class that works on tree objects (Services/Tree)
static _lookupType(int $a_obj_id)
$path
Definition: ltiservices.php:29
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setLeftNavContent(string $a_content)
Sets content of left navigation column.
Explorer class that works on tree objects (Services/Tree)
+ 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 56 of file class.ilObjSkillTreeGUI.php.

◆ $error

ilErrorHandling ilObjSkillTreeGUI::$error
protected

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

Referenced by executeCommand().

◆ $locator

ilLocatorGUI ilObjSkillTreeGUI::$locator
protected

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

Referenced by showLocator().

◆ $main_tpl

ilGlobalTemplateInterface ilObjSkillTreeGUI::$main_tpl
protected

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

Referenced by create(), and edit().

◆ $object

ilObject ilObjSkillTreeGUI::$object

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

Referenced by save().

◆ $rbacsystem

ilRbacSystem ilObjSkillTreeGUI::$rbacsystem
protected

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

Referenced by executeCommand(), and getAdminTabs().

◆ $requested_node_id

int ilObjSkillTreeGUI::$requested_node_id = 0
protected

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

◆ $requested_node_ids

array ilObjSkillTreeGUI::$requested_node_ids = []
protected

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

◆ $requested_skexpand

string ilObjSkillTreeGUI::$requested_skexpand = ""
protected

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

◆ $requested_table_action

string ilObjSkillTreeGUI::$requested_table_action = ""
protected

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

◆ $requested_table_tree_ids

array ilObjSkillTreeGUI::$requested_table_tree_ids = []
protected

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

◆ $requested_templates_tree

int ilObjSkillTreeGUI::$requested_templates_tree = 0
protected

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

◆ $requested_titles

array ilObjSkillTreeGUI::$requested_titles = []
protected

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

◆ $requested_tmpmode

bool ilObjSkillTreeGUI::$requested_tmpmode = false
protected

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

◆ $requested_tref_id

int ilObjSkillTreeGUI::$requested_tref_id = 0
protected

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

◆ $skill_deletion_manager

Node SkillDeletionManager ilObjSkillTreeGUI::$skill_deletion_manager
protected

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

◆ $skill_management_access_manager

Access SkillManagementAccess ilObjSkillTreeGUI::$skill_management_access_manager
protected

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

◆ $skill_tree

ilSkillTree ilObjSkillTreeGUI::$skill_tree
protected

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

◆ $skill_tree_access_manager

Access SkillTreeAccess ilObjSkillTreeGUI::$skill_tree_access_manager
protected

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

◆ $skill_tree_factory

Tree SkillTreeFactory ilObjSkillTreeGUI::$skill_tree_factory
protected

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

◆ $skill_tree_manager

Tree SkillTreeManager ilObjSkillTreeGUI::$skill_tree_manager
protected

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

◆ $skill_tree_node_manager

Node SkillTreeNodeManager ilObjSkillTreeGUI::$skill_tree_node_manager
protected

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

◆ $skill_tree_repo

ilSkillTreeRepository ilObjSkillTreeGUI::$skill_tree_repo
protected

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

◆ $skill_ui_service

Service SkillUIService ilObjSkillTreeGUI::$skill_ui_service
protected

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

◆ $skill_usage_manager

Usage SkillUsageManager ilObjSkillTreeGUI::$skill_usage_manager
protected

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

◆ $tabs

ilTabsGUI ilObjSkillTreeGUI::$tabs
protected

◆ $tool_context

ScreenContext ContextServices ilObjSkillTreeGUI::$tool_context
protected

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

◆ $ui

UIServices ilObjSkillTreeGUI::$ui
protected

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

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


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