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

Skill management main GUI class. More...

+ Inheritance diagram for ilObjSkillManagementGUI:
+ Collaboration diagram for ilObjSkillManagementGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 getAdminTabs ()
 
 editSettings ()
 
 listTrees ()
 
 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 ()
 
 confirmedDelete ()
 
 editSkillTemplates ()
 
 showTree (bool $a_templates, $a_gui=null, string $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)
 

Protected Attributes

ilRbacSystem $rbacsystem
 
ilErrorHandling $error
 
ilTabsGUI $tabs
 
Factory $ui_fac
 
Renderer $ui_ren
 
SkillAdminGUIRequest $admin_gui_request
 
ContextServices $tool_context
 
ilPropertyFormGUI $form
 
ilSkillTree $skill_tree
 
Tree SkillTreeNodeManager $skill_tree_node_manager
 
SkillInternalManagerService $skill_manager
 
SkillManagementAccess $management_access_manager
 
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)
 
- 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 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...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjSkillManagementGUI::__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 71 of file class.ilObjSkillManagementGUI.php.

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

76  {
77  global $DIC;
78 
79  $this->ctrl = $DIC->ctrl();
80  $this->rbacsystem = $DIC->rbac()->system();
81  $this->error = $DIC["ilErr"];
82  $this->access = $DIC->access();
83  $this->tabs = $DIC->tabs();
84  $this->lng = $DIC->language();
85  $this->settings = $DIC->settings();
86  $this->tpl = $DIC["tpl"];
87  $this->toolbar = $DIC->toolbar();
88  $this->user = $DIC->user();
89  $this->ui_fac = $DIC->ui()->factory();
90  $this->ui_ren = $DIC->ui()->renderer();
91  $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
92  $ilCtrl = $DIC->ctrl();
93 
94  $this->tool_context = $DIC->globalScreen()->tool()->context();
95 
96  $this->type = 'skmg';
97  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
98 
99  $this->lng->loadLanguageModule('skmg');
100 
101  $ilCtrl->saveParameter($this, "node_id");
102  $this->skill_manager = $DIC->skills()->internal()->manager();
103  $this->skill_tree_node_manager = $this->skill_manager->getTreeNodeManager($this->object->getId());
104  $this->management_access_manager = $this->skill_manager->getManagementAccessManager($this->object->getRefId());
105 
106  $this->requested_node_id = $this->admin_gui_request->getNodeId();
107  $this->requested_tref_id = $this->admin_gui_request->getTrefId();
108  $this->requested_templates_tree = $this->admin_gui_request->getTemplatesTree();
109  $this->requested_skexpand = $this->admin_gui_request->getSkillExpand();
110  $this->requested_tmpmode = $this->admin_gui_request->getTemplateMode();
111  $this->requested_titles = $this->admin_gui_request->getTitles();
112  $this->requested_node_ids = $this->admin_gui_request->getNodeIds();
113  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilObjSkillManagementGUI::cancelDelete ( )

Definition at line 434 of file class.ilObjSkillManagementGUI.php.

References ILIAS\Repository\ctrl().

434  : void
435  {
436  $this->ctrl->redirect($this, "editSkills");
437  }
+ Here is the call graph for this function:

◆ collapseAll()

ilObjSkillManagementGUI::collapseAll ( bool  $a_redirect = true)

Definition at line 320 of file class.ilObjSkillManagementGUI.php.

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

320  : void
321  {
322  $this->requested_skexpand = "";
323  $n_id = ($this->requested_node_id > 0)
324  ? $this->requested_node_id
325  : $this->skill_tree->readRootId();
326  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
327  $old = ilSession::get("skexpand");
328  foreach ($stree as $n) {
329  if (in_array($n["child"], $old) && $n["child"] != $n_id) {
330  $k = array_search($n["child"], $old);
331  unset($old[$k]);
332  }
333  }
334  ilSession::set("skexpand", $old);
335  $this->saveAllTitles(false);
336  }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjSkillManagementGUI::confirmedDelete ( )

Definition at line 439 of file class.ilObjSkillManagementGUI.php.

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

439  : void
440  {
441  $ilCtrl = $this->ctrl;
442 
443  // delete all selected objects
444  foreach ($this->requested_node_ids as $id) {
445  if ($id != ilTree::POS_FIRST_NODE) {
447  $node_data = $this->skill_tree->getNodeData($id);
448  if (is_object($obj)) {
449  $obj->delete();
450  }
451  if ($this->skill_tree->isInTree($id)) {
452  $this->skill_tree->deleteTree($node_data);
453  }
454  }
455  }
456 
457  // feedback
458  $this->tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
459  }
const POS_FIRST_NODE
+ Here is the call graph for this function:

◆ deleteNodes()

ilObjSkillManagementGUI::deleteNodes ( object  $a_gui)

Definition at line 338 of file class.ilObjSkillManagementGUI.php.

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

338  : void
339  {
340  $lng = $this->lng;
341  $tpl = $this->tpl;
342  $ilCtrl = $this->ctrl;
343  $ilTabs = $this->tabs;
344  $ilToolbar = $this->toolbar;
345 
346  if (empty($this->requested_node_ids)) {
347  $this->ilias->raiseError($this->lng->txt("no_checkbox"), $this->ilias->error_obj->MESSAGE);
348  }
349 
350  $ilTabs->clearTargets();
351 
352  // check usages
353  $mode = "";
354  $cskill_ids = [];
355  foreach ($this->requested_node_ids as $id) {
356  if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr"))) {
357  if ($mode == "templates") {
358  $this->ilias->raiseError("Skill Deletion - type mismatch.", $this->ilias->error_obj->MESSAGE);
359  }
360  $mode = "basic";
361  $skill_id = $id;
362  $tref_id = 0;
363  if (ilSkillTreeNode::_lookupType($id) == "sktr") {
365  $tref_id = $id;
366  }
367  $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
368  }
369  if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp"))) {
370  if ($mode == "basic") {
371  $this->ilias->raiseError("Skill Deletion - type mismatch.", $this->ilias->error_obj->MESSAGE);
372  }
373  $mode = "templates";
374 
375  foreach (ilSkillTemplateReference::_lookupTrefIdsForTemplateId($id) as $tref_id) {
376  $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
377  }
378  }
379  // for cats, skills and template references, get "real" usages
380  // for skill and category templates check usage in references
381  }
382 
383  if ($mode == "basic" || $mode == "templates") {
384  $u = new ilSkillUsage();
385  $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
386  if (count($usages) > 0) {
387  $html = "";
388  foreach ($usages as $k => $usage) {
389  $tab = new ilSkillUsageTableGUI($this, "showUsage", $k, $usage);
390  $html .= $tab->getHTML() . "<br/><br/>";
391  }
393  $ilCtrl->saveParameter($a_gui, "tmpmode");
394  $ilToolbar->addButton(
395  $lng->txt("back"),
396  $ilCtrl->getLinkTarget($a_gui, "cancelDelete")
397  );
398  $this->tpl->setOnScreenMessage('failure', $lng->txt("skmg_cannot_delete_nodes_in_use"));
399  return;
400  }
401  } else {
402  $this->ilias->raiseError("Skill Deletion - type mismatch.", $this->ilias->error_obj->MESSAGE);
403  }
404 
405  // SAVE POST VALUES
406  ilSession::set("saved_post", $this->requested_node_ids);
407 
408  $confirmation_gui = new ilConfirmationGUI();
409 
410  $ilCtrl->setParameter($a_gui, "tmpmode", $this->requested_tmpmode);
411  $a_form_action = $this->ctrl->getFormAction($a_gui);
412  $confirmation_gui->setFormAction($a_form_action);
413  $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
414 
415  // Add items to delete
416  foreach ($this->requested_node_ids as $id) {
417  if ($id != ilTree::POS_FIRST_NODE) {
418  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
419  $confirmation_gui->addItem(
420  "id[]",
421  $node_obj->getId(),
422  $node_obj->getTitle(),
423  ilUtil::getImagePath("icon_" . $node_obj->getType() . ".svg")
424  );
425  }
426  }
427 
428  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
429  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
430 
431  $tpl->setContent($confirmation_gui->getHTML());
432  }
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 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
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
ilToolbarGUI $toolbar
header include for all ilias files.
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:

◆ editSettings()

ilObjSkillManagementGUI::editSettings ( )

Definition at line 187 of file class.ilObjSkillManagementGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilTabsGUI\activateTab(), ILIAS\Repository\lng(), ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\withValue().

187  : void
188  {
189  $ilCtrl = $this->ctrl;
190  $lng = $this->lng;
191  $ilTabs = $this->tabs;
192 
193  $ilTabs->activateTab("settings");
194 
195  $skmg_set = new ilSkillManagementSettings();
196 
197  // Enable skill management
198  $check_enable = $this->ui_fac->input()->field()->checkbox($lng->txt("skmg_enable_skmg"))
199  ->withValue($skmg_set->isActivated());
200 
201  // Hide Competence Profile Data before Self-Assessment
202  $check_hide_prof = $this->ui_fac->input()->field()->checkbox(
203  $lng->txt("skmg_hide_profile_self_eval"),
204  $lng->txt("skmg_hide_profile_self_eval_info")
205  )->withValue($skmg_set->getHideProfileBeforeSelfEval());
206 
207  // Allow local assignment of global profiles
208  $check_loc_ass_prof = $this->ui_fac->input()->field()->checkbox($lng->txt("skmg_local_assignment_profiles"))
209  ->withValue($skmg_set->getLocalAssignmentOfProfiles());
210 
211  // Allow creation of local profiles
212  $check_create_loc_prof = $this->ui_fac->input()->field()->checkbox(
213  $lng->txt("skmg_allow_local_profiles"),
214  $lng->txt("skmg_allow_local_profiles_info")
215  )->withValue($skmg_set->getAllowLocalProfiles());
216 
217  //section
218  $section_settings = $this->ui_fac->input()->field()->section(
219  ["check_enable" => $check_enable,
220  "check_hide_prof" => $check_hide_prof,
221  "check_loc_ass_prof" => $check_loc_ass_prof,
222  "check_create_loc_prof" => $check_create_loc_prof],
223  $lng->txt("skmg_settings")
224  );
225 
226  // form and form action handling
227  $ilCtrl->setParameterByClass(
228  'ilobjskillmanagementgui',
229  'skill_settings',
230  'skill_settings_config'
231  );
232 
233  $form = $this->ui_fac->input()->container()->form()->standard(
234  $ilCtrl->getFormAction($this, "editSettings"),
235  ["section_settings" => $section_settings]
236  );
237 
238  if ($this->request->getMethod() == "POST"
239  && $this->request->getQueryParams()["skill_settings"] == "skill_settings_config") {
240  if (!$this->management_access_manager->hasEditManagementSettingsPermission()) {
241  return;
242  }
243 
244  $form = $form->withRequest($this->request);
245  $result = $form->getData();
246 
247  $skmg_set->activate($result["section_settings"]["check_enable"]);
248  $skmg_set->setHideProfileBeforeSelfEval($result["section_settings"]["check_hide_prof"]);
249  $skmg_set->setLocalAssignmentOfProfiles($result["section_settings"]["check_loc_ass_prof"]);
250  $skmg_set->setAllowLocalProfiles($result["section_settings"]["check_create_loc_prof"]);
251 
252  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
253  $ilCtrl->redirect($this, "editSettings");
254  }
255 
256  $this->tpl->setContent($this->ui_ren->render([$form]));
257  }
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLanguage $lng
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:59
activateTab(string $a_id)
+ Here is the call graph for this function:

◆ editSkillTemplates()

ilObjSkillManagementGUI::editSkillTemplates ( )

Definition at line 465 of file class.ilObjSkillManagementGUI.php.

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

465  : void
466  {
467  $tpl = $this->tpl;
468  $ilTabs = $this->tabs;
469  $lng = $this->lng;
470  $ilCtrl = $this->ctrl;
471 
472  $ilTabs->activateTab("skill_templates");
473  $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "node_id", $this->skill_tree->readRootId());
474  $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
475  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ executeCommand()

ilObjSkillManagementGUI::executeCommand ( )

Definition at line 115 of file class.ilObjSkillManagementGUI.php.

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

115  : void
116  {
119  $ilTabs = $this->tabs;
120 
121  $next_class = $this->ctrl->getNextClass($this);
122  $cmd = $this->ctrl->getCmd();
123 
124  if (!$this->management_access_manager->hasReadManagementPermission()) {
125  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
126  }
127 
128  switch ($next_class) {
129  case "ilskilltreeadmingui":
130  $this->prepareOutput();
131  $ilTabs->activateTab("skill_trees");
132  $gui = new ilSkillTreeAdminGUI($this->skill_manager);
133  $this->ctrl->forwardCommand($gui);
134  break;
135 
136  case 'ilpermissiongui':
137  $this->prepareOutput();
138  $this->tabs_gui->activateTab('permissions');
139  $perm_gui = new ilPermissionGUI($this);
140  $ret = $this->ctrl->forwardCommand($perm_gui);
141  break;
142 
143  default:
144  $this->prepareOutput();
145  if (!$cmd || $cmd == 'view') {
146  $cmd = "listTrees";
147  }
148 
149  if ($cmd == "showTree") {
150  $this->showTree((bool) $this->requested_templates_tree);
151  } else {
152  $this->$cmd();
153  }
154  break;
155  }
156  }
Skill tree administration.
showTree(bool $a_templates, $a_gui=null, string $a_gui_cmd="")
prepareOutput(bool $show_sub_objects=true)
$ilErr
Definition: raiseError.php:17
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ expandAll()

ilObjSkillManagementGUI::expandAll ( bool  $a_redirect = true)

Definition at line 305 of file class.ilObjSkillManagementGUI.php.

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

305  : void
306  {
307  $this->requested_skexpand = "";
308  $n_id = ($this->requested_node_id > 0)
309  ? $this->requested_node_id
310  : $this->skill_tree->readRootId();
311  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
312  $n_arr = [];
313  foreach ($stree as $n) {
314  $n_arr[] = $n["child"];
315  ilSession::set("skexpand", $n_arr);
316  }
317  $this->saveAllTitles(false);
318  }
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjSkillManagementGUI::getAdminTabs ( )

Definition at line 158 of file class.ilObjSkillManagementGUI.php.

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

158  : void
159  {
161  $ilAccess = $this->access;
162  $lng = $this->lng;
163 
164  if ($this->management_access_manager->hasReadManagementPermission()) {
165  $this->tabs_gui->addTab(
166  "skill_trees",
167  $lng->txt("skmg_skill_trees"),
168  $this->ctrl->getLinkTargetByClass("ilskilltreeadmingui", "")
169  );
170 
171  $this->tabs_gui->addTab(
172  "settings",
173  $lng->txt("settings"),
174  $this->ctrl->getLinkTarget($this, "editSettings")
175  );
176  }
177 
178  if ($this->management_access_manager->hasEditManagementPermissionsPermission()) {
179  $this->tabs_gui->addTab(
180  "permissions",
181  $lng->txt("perm_settings"),
182  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
183  );
184  }
185  }
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:

◆ listTrees()

ilObjSkillManagementGUI::listTrees ( )

Definition at line 259 of file class.ilObjSkillManagementGUI.php.

References ILIAS\Repository\ctrl().

259  : void
260  {
261  $this->ctrl->clearParameterByClass(get_class($this), "node_id");
262  $this->ctrl->redirectByClass("ilskilltreeadmingui", "listTrees");
263  }
+ Here is the call graph for this function:

◆ saveAllTemplateTitles()

ilObjSkillManagementGUI::saveAllTemplateTitles ( bool  $a_succ_mess = true)

Definition at line 285 of file class.ilObjSkillManagementGUI.php.

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

285  : void
286  {
287  $ilCtrl = $this->ctrl;
288  $lng = $this->lng;
289 
290  if (!count($this->requested_titles) == 0) {
291  foreach ($this->requested_titles as $id => $title) {
293  if (is_object($node_obj)) {
294  // update title
296  }
297  }
298  if ($a_succ_mess) {
299  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
300  }
301  }
302  $ilCtrl->redirect($this, "editSkillTemplates");
303  }
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()

ilObjSkillManagementGUI::saveAllTitles ( bool  $a_succ_mess = true)

Definition at line 265 of file class.ilObjSkillManagementGUI.php.

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

Referenced by collapseAll(), and expandAll().

265  : void
266  {
267  $ilCtrl = $this->ctrl;
268  $lng = $this->lng;
269 
270  if (!count($this->requested_titles) == 0) {
271  foreach ($this->requested_titles as $id => $title) {
273  if (is_object($node_obj)) {
274  // update title
276  }
277  }
278  if ($a_succ_mess) {
279  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
280  }
281  }
282  $ilCtrl->redirect($this, "editSkills");
283  }
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:

◆ showTree()

ilObjSkillManagementGUI::showTree ( bool  $a_templates,
  $a_gui = null,
string  $a_gui_cmd = "" 
)

Definition at line 481 of file class.ilObjSkillManagementGUI.php.

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

Referenced by executeCommand().

481  : void
482  {
484  $tpl = $this->tpl;
485  $ilCtrl = $this->ctrl;
486  $lng = $this->lng;
487 
488  if ($a_templates) {
489  if ($this->requested_node_id == 0 || $this->requested_node_id == 1) {
490  return;
491  }
492 
493  if ($this->requested_node_id > 1) {
494  $path = $this->skill_tree->getPathId($this->requested_node_id);
495  if (ilSkillTreeNode::_lookupType($path[1]) == "sktp") {
496  return;
497  }
498  }
499  }
500 
501  $ilCtrl->setParameter($this, "templates_tree", (int) $a_templates);
502 
503  if ($a_templates) {
504  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SHOW_TEMPLATE_TREE, true);
505  $exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree", $this->skill_tree->getTreeId());
506  } else {
507  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SHOW_SKILL_TREE, true);
508  $exp = new ilSkillTreeExplorerGUI($this, "showTree", $this->skill_tree->getTreeId());
509  }
510  if (!$exp->handleCommand()) {
511  $tpl->setLeftNavContent($exp->getHTML());
512  }
513  }
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

SkillAdminGUIRequest ilObjSkillManagementGUI::$admin_gui_request
protected

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

◆ $error

ilErrorHandling ilObjSkillManagementGUI::$error
protected

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

Referenced by executeCommand().

◆ $form

ilPropertyFormGUI ilObjSkillManagementGUI::$form
protected

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

◆ $management_access_manager

SkillManagementAccess ilObjSkillManagementGUI::$management_access_manager
protected

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

◆ $rbacsystem

ilRbacSystem ilObjSkillManagementGUI::$rbacsystem
protected

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

Referenced by executeCommand(), and getAdminTabs().

◆ $requested_node_id

int ilObjSkillManagementGUI::$requested_node_id = 0
protected

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

◆ $requested_node_ids

array ilObjSkillManagementGUI::$requested_node_ids = []
protected

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

◆ $requested_skexpand

string ilObjSkillManagementGUI::$requested_skexpand = ""
protected

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

◆ $requested_templates_tree

int ilObjSkillManagementGUI::$requested_templates_tree = 0
protected

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

◆ $requested_titles

array ilObjSkillManagementGUI::$requested_titles = []
protected

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

◆ $requested_tmpmode

int ilObjSkillManagementGUI::$requested_tmpmode = 0
protected

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

◆ $requested_tref_id

int ilObjSkillManagementGUI::$requested_tref_id = 0
protected

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

◆ $skill_manager

SkillInternalManagerService ilObjSkillManagementGUI::$skill_manager
protected

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

◆ $skill_tree

ilSkillTree ilObjSkillManagementGUI::$skill_tree
protected

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

◆ $skill_tree_node_manager

Tree SkillTreeNodeManager ilObjSkillManagementGUI::$skill_tree_node_manager
protected

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

◆ $tabs

ilTabsGUI ilObjSkillManagementGUI::$tabs
protected

◆ $tool_context

ContextServices ilObjSkillManagementGUI::$tool_context
protected

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

◆ $ui_fac

Factory ilObjSkillManagementGUI::$ui_fac
protected

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

◆ $ui_ren

Renderer ilObjSkillManagementGUI::$ui_ren
protected

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


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