ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjSkillManagementGUI Class Reference

Skill management main GUI class. More...

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

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editSettings ()
 Edit news settings. More...
 
 saveSettings ()
 Save skill management settings. More...
 
 editSkills ()
 Edit skills. More...
 
 saveAllTitles ($a_succ_mess=true)
 Save all titles of chapters/scos/pages. More...
 
 saveAllTemplateTitles ($a_succ_mess=true)
 Save all titles of chapters/scos/pages. More...
 
 expandAll ($a_redirect=true)
 Expand all. More...
 
 collapseAll ($a_redirect=true)
 Collapse all. More...
 
 deleteNodes ($a_gui)
 confirm deletion screen of skill tree nodes More...
 
 cancelDelete ()
 cancel delete More...
 
 confirmedDelete ()
 Delete chapters/scos/pages. More...
 
 test ()
 Test getCompletionDateForTriggerRefId. More...
 
 testCert ()
 Test checkUserCertificateForTriggerRefId. More...
 
 testAllCert ()
 Test getTriggerOfAllCertificates. More...
 
 testLevels ()
 Test getSkillLevelsForTrigger. More...
 
 setTestSubtabs ($a_act)
 Set test subtabs. More...
 
 editSkillTemplates ()
 Edit skill templates. More...
 
 showTree ($a_templates, $a_gui="", $a_gui_cmd="")
 Show Editing Tree. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Protected Attributes

 $rbacsystem
 
 $error
 
 $tabs
 
 $skill_tree
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Detailed Description

Skill management main GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilObjSkillManagementGUI: ilPermissionGUI, ilSkillProfileGUI, ilExportGUI @ilCtrl_isCalledBy ilObjSkillManagementGUI: ilAdministrationGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilObjSkillManagementGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Contructor.

@access public

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

43 {
44 global $DIC;
45
46 $this->ctrl = $DIC->ctrl();
47 $this->rbacsystem = $DIC->rbac()->system();
48 $this->error = $DIC["ilErr"];
49 $this->access = $DIC->access();
50 $this->tabs = $DIC->tabs();
51 $this->lng = $DIC->language();
52 $this->settings = $DIC->settings();
53 $this->tpl = $DIC["tpl"];
54 $this->toolbar = $DIC->toolbar();
55 $this->user = $DIC->user();
56 $ilCtrl = $DIC->ctrl();
57
58 $this->type = 'skmg';
59 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
60
61 $this->lng->loadLanguageModule('skmg');
62
63 include_once("./Services/Skill/classes/class.ilSkillTree.php");
64 $this->skill_tree = new ilSkillTree();
65
66 $ilCtrl->saveParameter($this, "obj_id");
67 }
user()
Definition: user.php:4
error($a_errmsg)
set error message @access public
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $DIC, $ilCtrl, error(), settings(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilObjSkillManagementGUI::cancelDelete ( )

cancel delete

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

528 {
529 $this->ctrl->redirect($this, "editSkills");
530 }

◆ collapseAll()

ilObjSkillManagementGUI::collapseAll (   $a_redirect = true)

Collapse all.

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

403 {
404 $_GET["skexpand"] = "";
405 $n_id = ($_GET["obj_id"] > 0)
406 ? $_GET["obj_id"]
407 : $this->skill_tree->readRootId();
408 $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
409 $old = $_SESSION["skexpand"];
410 foreach ($stree as $n) {
411 if (in_array($n["child"], $old) && $n["child"] != $n_id) {
412 $k = array_search($n["child"], $old);
413 unset($old[$k]);
414 }
415 }
416 $_SESSION["skexpand"] = $old;
417 $this->saveAllTitles(false);
418 }
$n
Definition: RandomTest.php:85
$_GET["client_id"]
$_SESSION["AccountId"]
saveAllTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.

References $_GET, $_SESSION, $n, and saveAllTitles().

+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjSkillManagementGUI::confirmedDelete ( )

Delete chapters/scos/pages.

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

536 {
538
539 // delete all selected objects
540 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
541 foreach ($_POST["id"] as $id) {
542 if ($id != IL_FIRST_NODE) {
544 $node_data = $this->skill_tree->getNodeData($id);
545 if (is_object($obj)) {
546 $obj->delete();
547 }
548 if ($this->skill_tree->isInTree($id)) {
549 $this->skill_tree->deleteTree($node_data);
550 }
551 }
552 }
553
554 // feedback
555 ilUtil::sendInfo($this->lng->txt("info_deleted"), true);
556 }
$_POST["username"]
const IL_FIRST_NODE
Definition: class.ilTree.php:5
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id

References $_POST, ilObjectGUI\$ctrl, $id, $ilCtrl, ilSkillTreeNodeFactory\getInstance(), IL_FIRST_NODE, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ deleteNodes()

ilObjSkillManagementGUI::deleteNodes (   $a_gui)

confirm deletion screen of skill tree nodes

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

424 {
428 $ilTabs = $this->tabs;
429 $ilToolbar = $this->toolbar;
430
431 if (!isset($_POST["id"])) {
432 $this->ilias->raiseError($this->lng->txt("no_checkbox"), $this->ilias->error_obj->MESSAGE);
433 }
434
435 $ilTabs->clearTargets();
436
437 // check usages
438 $mode = "";
439 $cskill_ids = array();
440 foreach ($_POST["id"] as $id) {
441 if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr"))) {
442 if ($mode == "templates") {
443 $this->ilias->raiseError("Skill Deletion - type mismatch.", $this->ilias->error_obj->MESSAGE);
444 }
445 $mode = "basic";
446 $skill_id = $id;
447 $tref_id = 0;
448 if (ilSkillTreeNode::_lookupType($id) == "sktr") {
449 include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
451 $tref_id = $id;
452 }
453 $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
454 }
455 if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp"))) {
456 if ($mode == "basic") {
457 $this->ilias->raiseError("Skill Deletion - type mismatch.", $this->ilias->error_obj->MESSAGE);
458 }
459 $mode = "templates";
460
462 $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
463 }
464 }
465 // for cats, skills and template references, get "real" usages
466 // for skill and category templates check usage in references
467 }
468
469 if ($mode == "basic" || $mode == "templates") {
470 include_once("./Services/Skill/classes/class.ilSkillUsage.php");
471 $u = new ilSkillUsage();
472 $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
473 if (count($usages) > 0) {
474 $html = "";
475 foreach ($usages as $k => $usage) {
476 include_once("./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
477 $tab = new ilSkillUsageTableGUI($this, "showUsage", $k, $usage);
478 $html .= $tab->getHTML() . "<br/><br/>";
479 }
480 $tpl->setContent($html);
481 $ilCtrl->saveParameter($a_gui, "tmpmode");
482 $ilToolbar->addButton(
483 $lng->txt("back"),
484 $ilCtrl->getLinkTarget($a_gui, "cancelDelete")
485 );
486 ilUtil::sendFailure($lng->txt("skmg_cannot_delete_nodes_in_use"));
487 return;
488 }
489 } else {
490 $this->ilias->raiseError("Skill Deletion - type mismatch.", $this->ilias->error_obj->MESSAGE);
491 }
492
493 // SAVE POST VALUES
494 $_SESSION["saved_post"] = $_POST["id"];
495
496 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
497 $confirmation_gui = new ilConfirmationGUI();
498
499 $ilCtrl->setParameter($a_gui, "tmpmode", $_GET["tmpmode"]);
500 $a_form_action = $this->ctrl->getFormAction($a_gui);
501 $confirmation_gui->setFormAction($a_form_action);
502 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
503
504 // Add items to delete
505 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
506 foreach ($_POST["id"] as $id) {
507 if ($id != IL_FIRST_NODE) {
509 $confirmation_gui->addItem(
510 "id[]",
511 $node_obj->getId(),
512 $node_obj->getTitle(),
513 ilUtil::getImagePath("icon_" . $node_obj->getType() . ".svg")
514 );
515 }
516 }
517
518 $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
519 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
520
521 $tpl->setContent($confirmation_gui->getHTML());
522 }
Confirmation screen class.
static _lookupTrefIdsForTemplateId($a_tid)
Get all tref ids for a template id.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static _lookupType($a_obj_id)
Lookup Type.
TableGUI class for skill usages.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$html
Definition: example_001.php:87
redirection script todo: (a better solution should control the processing via a xml file)

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ctrl, $html, $id, $ilCtrl, ilObjectGUI\$lng, $tab, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTemplateReference\_lookupTrefIdsForTemplateId(), ilSkillTreeNode\_lookupType(), ilUtil\getImagePath(), ilSkillTreeNodeFactory\getInstance(), IL_FIRST_NODE, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ editSettings()

ilObjSkillManagementGUI::editSettings ( )

Edit news settings.

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

249 {
253 $ilTabs = $this->tabs;
254
255 $ilTabs->activateTab("settings");
256
257 include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
258 $skmg_set = new ilSkillManagementSettings();
259 $enable_skmg = $skmg_set->isActivated();
260
261 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
262 $form = new ilPropertyFormGUI();
263 $form->setFormAction($ilCtrl->getFormAction($this));
264 $form->setTitle($lng->txt("skmg_settings"));
265
266 // Enable skill management
267 $cb_prop = new ilCheckboxInputGUI(
268 $lng->txt("skmg_enable_skmg"),
269 "enable_skmg"
270 );
271 $cb_prop->setValue("1");
272 $cb_prop->setChecked($enable_skmg);
273 $form->addItem($cb_prop);
274
275 // Hide Competence Profile Data before Self-Assessment
276 $cb_prop = new ilCheckboxInputGUI(
277 $lng->txt("skmg_hide_profile_self_eval"),
278 "hide_profile_self_eval"
279 );
280 $cb_prop->setValue("1");
281 $cb_prop->setInfo($lng->txt("skmg_hide_profile_self_eval_info"));
282 $cb_prop->setChecked($skmg_set->getHideProfileBeforeSelfEval());
283 $form->addItem($cb_prop);
284
285 // command buttons
286 if ($this->checkPermissionBool("write")) {
287 $form->addCommandButton("saveSettings", $lng->txt("save"));
288 }
289
290 $this->tpl->setContent($form->getHTML());
291 }
This class represents a checkbox property in a property form.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
This class represents a property form user interface.
global $ilSetting
Definition: privfeed.php:17
if(isset($_POST['submit'])) $form

References ilObjectGUI\$ctrl, $form, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, $tabs, and ilObjectGUI\checkPermissionBool().

+ Here is the call graph for this function:

◆ editSkills()

ilObjSkillManagementGUI::editSkills ( )

Edit skills.

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

319 {
321 $ilTabs = $this->tabs;
324
325 $ilTabs->activateTab("skills");
326
327 $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
328 $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
329 }

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

◆ editSkillTemplates()

ilObjSkillManagementGUI::editSkillTemplates ( )

Edit skill templates.

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

821 {
823 $ilTabs = $this->tabs;
826
827 $ilTabs->activateTab("skill_templates");
828 $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
829 $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
830 }

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

◆ executeCommand()

ilObjSkillManagementGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

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

76 {
79 $ilAccess = $this->access;
80 $ilTabs = $this->tabs;
81
82 $next_class = $this->ctrl->getNextClass($this);
83 $cmd = $this->ctrl->getCmd();
84
85 $this->prepareOutput();
86
87 if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
88 $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
89 }
90
91 switch ($next_class) {
92 case 'ilskillrootgui':
93 include_once("./Services/Skill/classes/class.ilSkillRootGUI.php");
94 $skrt_gui = new ilSkillRootGUI((int) $_GET["obj_id"], $this);
95 $skrt_gui->setParentGUI($this);
96 $ret = $this->ctrl->forwardCommand($skrt_gui);
97 break;
98
99 case 'ilskillcategorygui':
100 $this->tabs_gui->activateTab("skills");
101 include_once("./Services/Skill/classes/class.ilSkillCategoryGUI.php");
102 $scat_gui = new ilSkillCategoryGUI((int) $_GET["obj_id"]);
103 $scat_gui->setParentGUI($this);
104 $this->showTree(false, $scat_gui, "listItems");
105 $ret = $this->ctrl->forwardCommand($scat_gui);
106 break;
107
108 case 'ilbasicskillgui':
109 $this->tabs_gui->activateTab("skills");
110 include_once("./Services/Skill/classes/class.ilBasicSkillGUI.php");
111 $skill_gui = new ilBasicSkillGUI((int) $_GET["obj_id"]);
112 $skill_gui->setParentGUI($this);
113 $this->showTree(false, $skill_gui, "edit");
114 $ret = $this->ctrl->forwardCommand($skill_gui);
115 break;
116
117 case 'ilskilltemplatecategorygui':
118 $this->tabs_gui->activateTab("skill_templates");
119 include_once("./Services/Skill/classes/class.ilSkillTemplateCategoryGUI.php");
120 $sctp_gui = new ilSkillTemplateCategoryGUI((int) $_GET["obj_id"], (int) $_GET["tref_id"]);
121 $sctp_gui->setParentGUI($this);
122 $this->showTree(((int) $_GET["tref_id"] == 0), $sctp_gui, "listItems");
123 $ret = $this->ctrl->forwardCommand($sctp_gui);
124 break;
125
126 case 'ilbasicskilltemplategui':
127 $this->tabs_gui->activateTab("skill_templates");
128 include_once("./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php");
129 $sktp_gui = new ilBasicSkillTemplateGUI((int) $_GET["obj_id"], (int) $_GET["tref_id"]);
130 $sktp_gui->setParentGUI($this);
131 $this->showTree(((int) $_GET["tref_id"] == 0), $sktp_gui, "edit");
132 $ret = $this->ctrl->forwardCommand($sktp_gui);
133 break;
134
135 case 'ilskilltemplatereferencegui':
136 $this->tabs_gui->activateTab("skills");
137 include_once("./Services/Skill/classes/class.ilSkillTemplateReferenceGUI.php");
138 $sktr_gui = new ilSkillTemplateReferenceGUI((int) $_GET["tref_id"]);
139 $sktr_gui->setParentGUI($this);
140 $this->showTree(false, $sktr_gui, "listItems");
141 $ret = $this->ctrl->forwardCommand($sktr_gui);
142 break;
143
144 case "ilskillprofilegui":
145 $ilTabs->activateTab("profiles");
146 include_once("./Services/Skill/classes/class.ilSkillProfileGUI.php");
147 $skprof_gui = new ilSkillProfileGUI();
148 $ret = $this->ctrl->forwardCommand($skprof_gui);
149 break;
150
151 case 'ilpermissiongui':
152 $this->tabs_gui->activateTab('permissions');
153 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
154 $perm_gui = new ilPermissionGUI($this);
155 $ret = $this->ctrl->forwardCommand($perm_gui);
156 break;
157
158 case "ilexportgui":
159 $this->tabs_gui->activateTab('export');
160 include_once("./Services/Export/classes/class.ilExportGUI.php");
161 $exp_gui = new ilExportGUI($this);
162 $exp_gui->addFormat("xml");
163 //$exp_gui->addFormat("html", "", $this, "exportHTML");
164 $ret = $this->ctrl->forwardCommand($exp_gui);
165 break;
166
167 default:
168 if (!$cmd || $cmd == 'view') {
169 $cmd = "editSkills";
170 }
171
172 if ($cmd == "showTree") {
173 $this->showTree($_GET["templates_tree"]);
174 } else {
175 $this->$cmd();
176 }
177 break;
178 }
179 return true;
180 }
Basic skill GUI class.
Basic skill template GUI class.
Export User Interface Class.
showTree($a_templates, $a_gui="", $a_gui_cmd="")
Show Editing Tree.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Skill category GUI class.
Skill profile GUI class.
Skill root GUI class.
Skill template category GUI class.
Skill template reference GUI class.
$ret
Definition: parser.php:6

References $_GET, ilObjectGUI\$access, $error, ilObjectGUI\$ilErr, $rbacsystem, $ret, $tabs, ilObjectGUI\prepareOutput(), and showTree().

+ Here is the call graph for this function:

◆ expandAll()

ilObjSkillManagementGUI::expandAll (   $a_redirect = true)

Expand all.

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

385 {
386 $_GET["skexpand"] = "";
387 $n_id = ($_GET["obj_id"] > 0)
388 ? $_GET["obj_id"]
389 : $this->skill_tree->readRootId();
390 $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
391 $n_arr = array();
392 foreach ($stree as $n) {
393 $n_arr[] = $n["child"];
394 $_SESSION["skexpand"] = $n_arr;
395 }
396 $this->saveAllTitles(false);
397 }

References $_GET, $_SESSION, $n, and saveAllTitles().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjSkillManagementGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

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

189 {
191 $ilAccess = $this->access;
193
194 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
195 $this->tabs_gui->addTab(
196 "skills",
197 $lng->txt("skmg_skills"),
198 $this->ctrl->getLinkTarget($this, "editSkills")
199 );
200
201 $this->tabs_gui->addTab(
202 "skill_templates",
203 $lng->txt("skmg_skill_templates"),
204 $this->ctrl->getLinkTarget($this, "editSkillTemplates")
205 );
206
207 $this->tabs_gui->addTab(
208 "settings",
209 $lng->txt("settings"),
210 $this->ctrl->getLinkTarget($this, "editSettings")
211 );
212
213 $this->tabs_gui->addTab(
214 "profiles",
215 $lng->txt("skmg_skill_profiles"),
216 $this->ctrl->getLinkTargetByClass("ilskillprofilegui")
217 );
218
219 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
220 $this->tabs_gui->addTab(
221 "export",
222 $lng->txt("export"),
223 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
224 );
225 }
226
227 if (DEVMODE == 1) {
228 $this->tabs_gui->addTab(
229 "test",
230 "Test (DEVMODE)",
231 $this->ctrl->getLinkTarget($this, "test")
232 );
233 }
234 }
235
236 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
237 $this->tabs_gui->addTab(
238 "permissions",
239 $lng->txt("perm_settings"),
240 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
241 );
242 }
243 }

References ilObjectGUI\$access, ilObjectGUI\$lng, and $rbacsystem.

◆ saveAllTemplateTitles()

ilObjSkillManagementGUI::saveAllTemplateTitles (   $a_succ_mess = true)

Save all titles of chapters/scos/pages.

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

360 {
363
364 if (is_array($_POST["title"])) {
365 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
366 foreach ($_POST["title"] as $id => $title) {
368 if (is_object($node_obj)) {
369 // update title
371 }
372 }
373 if ($a_succ_mess) {
374 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
375 }
376 }
377 $ilCtrl->redirect($this, "editSkillTemplates");
378 }
static _writeTitle($a_obj_id, $a_title)
Write Title.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, ilObjectGUI\$ctrl, $id, $ilCtrl, ilObjectGUI\$lng, $title, ilSkillTreeNode\_writeTitle(), ilSkillTreeNodeFactory\getInstance(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveAllTitles()

ilObjSkillManagementGUI::saveAllTitles (   $a_succ_mess = true)

Save all titles of chapters/scos/pages.

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

336 {
339
340 if (is_array($_POST["title"])) {
341 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
342 foreach ($_POST["title"] as $id => $title) {
344 if (is_object($node_obj)) {
345 // update title
347 }
348 }
349 if ($a_succ_mess) {
350 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
351 }
352 }
353 $ilCtrl->redirect($this, "editSkills");
354 }

References $_POST, ilObjectGUI\$ctrl, $id, $ilCtrl, ilObjectGUI\$lng, $title, ilSkillTreeNode\_writeTitle(), ilSkillTreeNodeFactory\getInstance(), and ilUtil\stripSlashes().

Referenced by collapseAll(), and expandAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjSkillManagementGUI::saveSettings ( )

Save skill management settings.

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

297 {
300
301 if (!$this->checkPermissionBool("write")) {
302 return;
303 }
304
305 include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
306 $skmg_set = new ilSkillManagementSettings();
307 $skmg_set->activate((int) $_POST["enable_skmg"]);
308 $skmg_set->setHideProfileBeforeSelfEval((int) $_POST["hide_profile_self_eval"]);
309
310 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
311
312 $ilCtrl->redirect($this, "editSettings");
313 }

References $_POST, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$settings, and ilObjectGUI\checkPermissionBool().

+ Here is the call graph for this function:

◆ setTestSubtabs()

ilObjSkillManagementGUI::setTestSubtabs (   $a_act)

Set test subtabs.

Parameters

return

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

782 {
783 $ilTabs = $this->tabs;
785
786 $ilTabs->addSubtab(
787 "test",
788 "getCompletionDateForTriggerRefId",
789 $ilCtrl->getLinkTarget($this, "test")
790 );
791
792 $ilTabs->addSubtab(
793 "cert",
794 "checkUserCertificateForTriggerRefId",
795 $ilCtrl->getLinkTarget($this, "testCert")
796 );
797
798 $ilTabs->addSubtab(
799 "all_cert",
800 "getTriggerOfAllCertificates",
801 $ilCtrl->getLinkTarget($this, "testAllCert")
802 );
803
804 $ilTabs->addSubtab(
805 "levels",
806 "getSkillLevelsForTrigger",
807 $ilCtrl->getLinkTarget($this, "testLevels")
808 );
809
810 $ilTabs->activateSubtab($a_act);
811 }

References ilObjectGUI\$ctrl, $ilCtrl, and $tabs.

◆ showTree()

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

Show Editing Tree.

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

840 {
845
846 if ($a_templates) {
847 if ($_GET["obj_id"] == "" || $_GET["obj_id"] == 1) {
848 return;
849 }
850
851 if ($_GET["obj_id"] > 1) {
852 $path = $this->skill_tree->getPathId($_GET["obj_id"]);
853 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
854 if (ilSkillTreeNode::_lookupType($path[1]) == "sktp") {
855 return;
856 }
857 }
858 }
859
860 $ilCtrl->setParameter($this, "templates_tree", $a_templates);
861
862 if ($a_templates) {
863 include_once("./Services/Skill/classes/class.ilSkillTemplateTreeExplorerGUI.php");
864 $exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree");
865 } else {
866 include_once("./Services/Skill/classes/class.ilSkillTreeExplorerGUI.php");
867 $exp = new ilSkillTreeExplorerGUI($this, "showTree", $a_templates);
868 }
869 if (!$exp->handleCommand()) {
870 $tpl->setLeftNavContent($exp->getHTML());
871 }
872 }
$path
Definition: aliased.php:25
Explorer class that works on tree objects (Services/Tree)
Explorer class that works on tree objects (Services/Tree)
$ilUser
Definition: imgupload.php:18

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, $ilUser, ilObjectGUI\$lng, $path, ilObjectGUI\$tpl, ilObjectGUI\$user, and ilSkillTreeNode\_lookupType().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ test()

ilObjSkillManagementGUI::test ( )

Test getCompletionDateForTriggerRefId.

Parameters

return

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

571 {
575 $ilTabs = $this->tabs;
576
577 $this->setTestSubTabs("test");
578
579 $ilTabs->activateTab("test");
580
581 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
582
583 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
584 $this->form = new ilPropertyFormGUI();
585
586 $this->form->addCommandButton("test", $lng->txt("execute"));
587
588 $this->form->setTitle("getCompletionDateForTriggerRefId()");
589 $this->form->setFormAction($ilCtrl->getFormAction($this));
590
591 // user id
592 $ti = new ilTextInputGUI("User ID(s)", "user_id");
593 $ti->setMaxLength(200);
594 $ti->setInfo("Separate multiple IDs by :");
595 $ti->setValue($_POST["user_id"]);
596 $this->form->addItem($ti);
597
598 // ref id
599 $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
600 $ti->setMaxLength(200);
601 $ti->setInfo("Separate multiple IDs by :");
602 $ti->setValue($_POST["ref_id"]);
603 $this->form->addItem($ti);
604
605 $result = "";
606 if (isset($_POST["user_id"])) {
607 $user_ids = explode(":", $_POST["user_id"]);
608 $ref_ids = explode(":", $_POST["ref_id"]);
609 if (count($user_ids) <= 1) {
610 $user_ids = $user_ids[0];
611 }
612 if (count($ref_ids) == 1) {
613 $ref_ids = $ref_ids[0];
614 } elseif (count($ref_ids) == 0) {
615 $ref_ids = null;
616 }
617
618 $result = ilBasicSkill::getCompletionDateForTriggerRefId($user_ids, $ref_ids);
619 $result = "<br />Result:<br />" . var_export($result, true);
620 }
621
622 $tpl->setContent($this->form->getHTML() . $result);
623 }
$result
This class represents a text property in a property form.

References $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $result, $tabs, and ilObjectGUI\$tpl.

◆ testAllCert()

ilObjSkillManagementGUI::testAllCert ( )

Test getTriggerOfAllCertificates.

Parameters

return

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

692 {
696 $ilTabs = $this->tabs;
697
698 $this->setTestSubTabs("all_cert");
699 $ilTabs->activateTab("test");
700
701 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
702
703 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
704 $this->form = new ilPropertyFormGUI();
705
706 $this->form->addCommandButton("testAllCert", $lng->txt("execute"));
707
708 $this->form->setTitle("getTriggerOfAllCertificates()");
709 $this->form->setFormAction($ilCtrl->getFormAction($this));
710
711 // user id
712 $ti = new ilTextInputGUI("User ID(s)", "user_id");
713 $ti->setMaxLength(200);
714 $ti->setInfo("Separate multiple IDs by :");
715 $ti->setValue($_POST["user_id"]);
716 $this->form->addItem($ti);
717
718 $result = "";
719 if (isset($_POST["user_id"])) {
720 $user_ids = explode(":", $_POST["user_id"]);
721 $ref_ids = explode(":", $_POST["ref_id"]);
722 if (count($user_ids) <= 1) {
723 $user_ids = $user_ids[0];
724 }
725
726 $result = ilBasicSkill::getTriggerOfAllCertificates($user_ids);
727 $result = "<br />Result:<br />" . var_export($result, true);
728 }
729
730 $tpl->setContent($this->form->getHTML() . $result);
731 }

References $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $result, $tabs, and ilObjectGUI\$tpl.

◆ testCert()

ilObjSkillManagementGUI::testCert ( )

Test checkUserCertificateForTriggerRefId.

Parameters

return

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

632 {
636 $ilTabs = $this->tabs;
637
638 $this->setTestSubTabs("cert");
639 $ilTabs->activateTab("test");
640
641 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
642
643 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
644 $this->form = new ilPropertyFormGUI();
645
646 $this->form->addCommandButton("testCert", $lng->txt("execute"));
647
648 $this->form->setTitle("checkUserCertificateForTriggerRefId()");
649 $this->form->setFormAction($ilCtrl->getFormAction($this));
650
651 // user id
652 $ti = new ilTextInputGUI("User ID(s)", "user_id");
653 $ti->setMaxLength(200);
654 $ti->setInfo("Separate multiple IDs by :");
655 $ti->setValue($_POST["user_id"]);
656 $this->form->addItem($ti);
657
658 // ref id
659 $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
660 $ti->setMaxLength(200);
661 $ti->setInfo("Separate multiple IDs by :");
662 $ti->setValue($_POST["ref_id"]);
663 $this->form->addItem($ti);
664
665 $result = "";
666 if (isset($_POST["user_id"])) {
667 $user_ids = explode(":", $_POST["user_id"]);
668 $ref_ids = explode(":", $_POST["ref_id"]);
669 if (count($user_ids) <= 1) {
670 $user_ids = $user_ids[0];
671 }
672 if (count($ref_ids) == 1) {
673 $ref_ids = $ref_ids[0];
674 } elseif (count($ref_ids) == 0) {
675 $ref_ids = null;
676 }
677
678 $result = ilBasicSkill::checkUserCertificateForTriggerRefId($user_ids, $ref_ids);
679 $result = "<br />Result:<br />" . var_export($result, true);
680 }
681
682 $tpl->setContent($this->form->getHTML() . $result);
683 }

References $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $result, $tabs, and ilObjectGUI\$tpl.

◆ testLevels()

ilObjSkillManagementGUI::testLevels ( )

Test getSkillLevelsForTrigger.

Parameters

return

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

740 {
744 $ilTabs = $this->tabs;
745
746 $this->setTestSubTabs("levels");
747 $ilTabs->activateTab("test");
748
749 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
750
751 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
752 $this->form = new ilPropertyFormGUI();
753
754 $this->form->addCommandButton("testLevels", $lng->txt("execute"));
755
756 $this->form->setTitle("getTriggerOfAllCertificates()");
757 $this->form->setFormAction($ilCtrl->getFormAction($this));
758
759 // user id
760 $ti = new ilTextInputGUI("Ref ID", "ref_id");
761 $ti->setMaxLength(200);
762 $ti->setValue($_POST["ref_id"]);
763 $this->form->addItem($ti);
764
765 $result = "";
766 if (isset($_POST["ref_id"])) {
767 $result = ilBasicSkill::getSkillLevelsForTrigger($_POST["ref_id"]);
768 $result = "<br />Result:<br />" . var_export($result, true);
769 }
770
771 $tpl->setContent($this->form->getHTML() . $result);
772 }

References $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $result, $tabs, and ilObjectGUI\$tpl.

Field Documentation

◆ $error

ilObjSkillManagementGUI::$error
protected

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

Referenced by executeCommand().

◆ $rbacsystem

ilObjSkillManagementGUI::$rbacsystem
protected

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

Referenced by executeCommand(), and getAdminTabs().

◆ $skill_tree

ilObjSkillManagementGUI::$skill_tree
protected

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

◆ $tabs


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