ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
 executeCommand ()
 Execute command.
 getAdminTabs ()
 Get tabs.
 editSettings ()
 Edit news settings.
 saveSettings ()
 Save skill management settings.
 editSkills ()
 Edit skills.
 insertBasicSkill ()
 Insert one or multiple basic skills.
 insertBasicSkillTemplate ()
 Insert one or multiple basic skill templates.
 insertSkillCategory ()
 Insert one or multiple skill categories.
 insertSkillTemplateCategory ()
 Insert one or multiple skill template categories.
 saveAllTitles ($a_succ_mess=true)
 Save all titles of chapters/scos/pages.
 saveAllTemplateTitles ($a_succ_mess=true)
 Save all titles of chapters/scos/pages.
 expandAll ($a_redirect=true)
 Expand all.
 collapseAll ($a_redirect=true)
 Collapse all.
 deleteNodes ($a_gui)
 confirm deletion screen of skill tree nodes
 cancelDelete ()
 cancel delete
 confirmedDelete ()
 Delete chapters/scos/pages.
 test ()
 Test getCompletionDateForTriggerRefId.
 testCert ()
 Test checkUserCertificateForTriggerRefId.
 testAllCert ()
 Test getTriggerOfAllCertificates.
 testLevels ()
 Test getSkillLevelsForTrigger.
 setTestSubtabs ($a_act)
 Set test subtabs.
 editSkillTemplates ()
 Edit skill templates.
 insertSkillTemplateReference ()
 Insert skill template reference.
 showTree ($a_templates, $a_gui, $a_gui_cmd)
 Show Editing Tree.
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 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
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Protected Attributes

 $skill_tree

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $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
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 getTabs (&$tabs_gui)
 get tabs abstract method.
 __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
 __showClipboardTable ($a_result_set, $a_from="")
 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
 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.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.

Detailed Description

Constructor & Destructor Documentation

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

Contructor.

public

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

References $ilCtrl, and ilObjectGUI\ilObjectGUI().

{
global $ilCtrl;
$this->type = 'skmg';
parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
$this->lng->loadLanguageModule('skmg');
include_once("./Services/Skill/classes/class.ilSkillTree.php");
$this->skill_tree = new ilSkillTree();
$ilCtrl->saveParameter($this, "obj_id");
}

+ Here is the call graph for this function:

Member Function Documentation

ilObjSkillManagementGUI::cancelDelete ( )

cancel delete

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

{
$this->ctrl->redirect($this, "editSkills");
}
ilObjSkillManagementGUI::collapseAll (   $a_redirect = true)

Collapse all.

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

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

{
$_GET["skexpand"] = "";
$n_id = ($_GET["obj_id"] > 0)
? $_GET["obj_id"]
: $this->skill_tree->readRootId();
$stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
$old = $_SESSION["skexpand"];
foreach ($stree as $n)
{
if (in_array($n["child"], $old) && $n["child"] != $n_id)
{
$k = array_search($n["child"], $old);
unset($old[$k]);
}
}
$_SESSION["skexpand"] = $old;
$this->saveAllTitles(false);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::confirmedDelete ( )

Delete chapters/scos/pages.

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

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

{
global $ilCtrl;
// delete all selected objects
include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
foreach ($_POST["id"] as $id)
{
if ($id != IL_FIRST_NODE)
{
$node_data = $this->skill_tree->getNodeData($id);
if (is_object($obj))
{
$obj->delete();
}
if($this->skill_tree->isInTree($id))
{
$this->skill_tree->deleteTree($node_data);
}
}
}
// feedback
ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::deleteNodes (   $a_gui)

confirm deletion screen of skill tree nodes

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

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilUtil\getImagePath(), ilSkillTreeNodeFactory\getInstance(), and IL_FIRST_NODE.

{
global $lng, $tpl, $ilCtrl, $ilTabs;
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
$ilTabs->clearTargets();
// SAVE POST VALUES
$_SESSION["saved_post"] = $_POST["id"];
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$confirmation_gui = new ilConfirmationGUI();
$ilCtrl->setParameter($a_gui, "tmpmode", $_GET["tmpmode"]);
$a_form_action = $this->ctrl->getFormAction($a_gui);
$confirmation_gui->setFormAction($a_form_action);
$confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
// Add items to delete
include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
foreach($_POST["id"] as $id)
{
if ($id != IL_FIRST_NODE)
{
$confirmation_gui->addItem("id[]", $node_obj->getId(),
$node_obj->getTitle(), ilUtil::getImagePath("icon_".$node_obj->getType().".png"));
}
}
$confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
$confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
$tpl->setContent($confirmation_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::editSettings ( )

Edit news settings.

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

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, and ilCheckboxInputGUI\setValue().

{
global $ilCtrl, $lng, $ilSetting, $ilTabs;
$ilTabs->activateTab("settings");
$skmg_set = new ilSetting("skmg");
$enable_skmg = $skmg_set->get("enable_skmg");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("skmg_settings"));
// Enable skill management
$cb_prop = new ilCheckboxInputGUI($lng->txt("skmg_enable_skmg"),
"enable_skmg");
$cb_prop->setValue("1");
$cb_prop->setChecked($enable_skmg);
$form->addItem($cb_prop);
// command buttons
$form->addCommandButton("saveSettings", $lng->txt("save"));
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::editSkills ( )

Edit skills.

Parameters
@return

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

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and showTree().

{
global $tpl, $ilTabs, $lng, $ilCtrl;
$ilTabs->activateTab("skills");
$ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
$ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
$a_form_action = $ilCtrl->getFormAction($this);
$a_top_node = $this->skill_tree->getRootId();
$a_gui_obj = $this;
$a_gui_cmd = "editSkills";
include_once("./Services/Skill/classes/class.ilSkillHFormGUI.php");
$form_gui = new ilSkillHFormGUI();
$form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
$form_gui->setFormAction($a_form_action);
$form_gui->setTitle($lng->txt("skmg_skill_hierarchie"));
$form_gui->setTree($this->skill_tree);
$form_gui->setCurrentTopNodeId($a_top_node);
$form_gui->addMultiCommand($lng->txt("delete"), "deleteNodes");
$form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
$form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
$form_gui->addCommand($lng->txt("skmg_save_all_titles"), "saveAllTitles");
$form_gui->addCommand($lng->txt("expand_all"), "expandAll");
$form_gui->addCommand($lng->txt("collapse_all"), "collapseAll");
$form_gui->setTriggeredUpdateCommand("saveAllTitles");
// highlighted nodes
if ($_GET["highlight"] != "")
{
$hl = explode(":", $_GET["highlight"]);
$form_gui->setHighlightedNodes($hl);
$form_gui->setFocusId($hl[0]);
}
$tpl->setContent($form_gui->getHTML());
// show left handed tree
$this->showTree();
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::editSkillTemplates ( )

Edit skill templates.

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

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and showTree().

{
global $tpl, $ilTabs, $lng, $ilCtrl;
$ilTabs->activateTab("skill_templates");
$ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
$ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
$a_form_action = $ilCtrl->getFormAction($this);
$a_top_node = $this->skill_tree->getRootId();
$a_gui_obj = $this;
$a_gui_cmd = "editSkillTemplates";
include_once("./Services/Skill/classes/class.ilSkillTemplateHFormGUI.php");
$form_gui = new ilSkillTemplateHFormGUI();
$form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
$form_gui->setFormAction($a_form_action);
$form_gui->setTitle($lng->txt("skmg_skill_templates"));
$form_gui->setTree($this->skill_tree);
$form_gui->setCurrentTopNodeId($a_top_node);
$form_gui->addMultiCommand($lng->txt("delete"), "deleteNodes");
$form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
$form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
$form_gui->addCommand($lng->txt("skmg_save_all_titles"), "saveAllTemplateTitles");
$form_gui->addCommand($lng->txt("expand_all"), "expandAllTemplates");
$form_gui->addCommand($lng->txt("collapse_all"), "collapseAllTemplates");
$form_gui->setTriggeredUpdateCommand("saveAllTemplateTitles");
// highlighted nodes
if ($_GET["highlight"] != "")
{
$hl = explode(":", $_GET["highlight"]);
$form_gui->setHighlightedNodes($hl);
$form_gui->setFocusId($hl[0]);
}
$ilCtrl->setParameter($this, "active_node", $_GET["obj_id"]);
$tpl->setContent($form_gui->getHTML());
// show left handed tree
$this->showTree(true);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::executeCommand ( )

Execute command.

public

Reimplemented from ilObjectGUI.

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

References $_GET, $cmd, $ilErr, $ret, ilObjectGUI\prepareOutput(), and showTree().

{
global $rbacsystem, $ilErr, $ilAccess, $ilTabs;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
}
switch($next_class)
{
case 'ilskillrootgui':
include_once("./Services/Skill/classes/class.ilSkillRootGUI.php");
$skrt_gui = new ilSkillRootGUI((int) $_GET["obj_id"], $this);
$skrt_gui->setParentGUI($this);
$ret = $this->ctrl->forwardCommand($skrt_gui);
break;
case 'ilskillcategorygui':
$this->tabs_gui->activateTab("skills");
include_once("./Services/Skill/classes/class.ilSkillCategoryGUI.php");
$scat_gui = new ilSkillCategoryGUI((int) $_GET["obj_id"]);
$scat_gui->setParentGUI($this);
$this->showTree(false, $scat_gui, "listItems");
$ret = $this->ctrl->forwardCommand($scat_gui);
break;
case 'ilbasicskillgui':
$this->tabs_gui->activateTab("skills");
include_once("./Services/Skill/classes/class.ilBasicSkillGUI.php");
$skill_gui = new ilBasicSkillGUI((int) $_GET["obj_id"]);
$skill_gui->setParentGUI($this);
$this->showTree(false, $skill_gui, "edit");
$ret = $this->ctrl->forwardCommand($skill_gui);
break;
case 'ilskilltemplatecategorygui':
$this->tabs_gui->activateTab("skill_templates");
include_once("./Services/Skill/classes/class.ilSkillTemplateCategoryGUI.php");
$sctp_gui = new ilSkillTemplateCategoryGUI((int) $_GET["obj_id"]);
$sctp_gui->setParentGUI($this);
$this->showTree(true, $sctp_gui, "listItems");
$ret = $this->ctrl->forwardCommand($sctp_gui);
break;
case 'ilbasicskilltemplategui':
$this->tabs_gui->activateTab("skill_templates");
include_once("./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php");
$sktp_gui = new ilBasicSkillTemplateGUI((int) $_GET["obj_id"]);
$sktp_gui->setParentGUI($this);
$this->showTree(true, $sktp_gui, "edit");
$ret = $this->ctrl->forwardCommand($sktp_gui);
break;
case 'ilskilltemplatereferencegui':
$this->tabs_gui->activateTab("skills");
include_once("./Services/Skill/classes/class.ilSkillTemplateReferenceGUI.php");
$sktr_gui = new ilSkillTemplateReferenceGUI((int) $_GET["obj_id"]);
$sktr_gui->setParentGUI($this);
$this->showTree(false, $sktr_gui, "listItems");
$ret = $this->ctrl->forwardCommand($sktr_gui);
break;
case 'ilpermissiongui':
$this->tabs_gui->activateTab('permissions');
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret = $this->ctrl->forwardCommand($perm_gui);
break;
default:
if(!$cmd || $cmd == 'view')
{
$cmd = "editSkills";
}
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::expandAll (   $a_redirect = true)

Expand all.

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

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

{
$_GET["skexpand"] = "";
$n_id = ($_GET["obj_id"] > 0)
? $_GET["obj_id"]
: $this->skill_tree->readRootId();
$stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
$n_arr = array();
foreach ($stree as $n)
{
$n_arr[] = $n["child"];
$_SESSION["skexpand"] = $n_arr;
}
$this->saveAllTitles(false);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::getAdminTabs ( )

Get tabs.

public

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

References ilObjectGUI\$lng.

{
global $rbacsystem, $ilAccess, $lng;
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->tabs_gui->addTab("skills",
$lng->txt("skmg_skills"),
$this->ctrl->getLinkTarget($this, "editSkills"));
$this->tabs_gui->addTab("skill_templates",
$lng->txt("skmg_skill_templates"),
$this->ctrl->getLinkTarget($this, "editSkillTemplates"));
$this->tabs_gui->addTab("settings",
$lng->txt("settings"),
$this->ctrl->getLinkTarget($this, "editSettings"));
if (DEVMODE == 1)
{
$this->tabs_gui->addTab("test",
"Test (DEVMODE)",
$this->ctrl->getLinkTarget($this, "test"));
}
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$this->tabs_gui->addTab("permissions",
$lng->txt("perm_settings"),
$this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"));
}
}
ilObjSkillManagementGUI::insertBasicSkill ( )

Insert one or multiple basic skills.

Parameters
@return

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

References $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilSkillTreeNode\putInTree().

{
global $ilCtrl, $lng;
include_once("./Services/Skill/classes/class.ilSkillHFormGUI.php");
include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
if (!ilSkillHFormGUI::getPostFirstChild()) // insert after node id
{
$parent_id = $this->skill_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
include_once("./Services/Skill/classes/class.ilBasicSkill.php");
$skill_ids = array();
for ($i = 1; $i <= $num; $i++)
{
$skill = new ilBasicSkill();
$skill->setTitle($lng->txt("skmg_new_skill"));
$skill->create();
ilSkillTreeNode::putInTree($skill, $parent_id, $target);
$skill_ids[] = $skill->getId();
}
$skill_ids = array_reverse($skill_ids);
$skill_ids = implode($skill_ids, ":");
$ilCtrl->setParameter($this, "highlight", $skill_ids);
$ilCtrl->redirect($this, "editSkills", "node_".$node_id);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::insertBasicSkillTemplate ( )

Insert one or multiple basic skill templates.

Parameters
@return

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

References $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilSkillTreeNode\putInTree().

{
global $ilCtrl, $lng;
include_once("./Services/Skill/classes/class.ilSkillHFormGUI.php");
include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
if (!ilSkillHFormGUI::getPostFirstChild()) // insert after node id
{
$parent_id = $this->skill_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
include_once("./Services/Skill/classes/class.ilBasicSkillTemplate.php");
$skill_ids = array();
for ($i = 1; $i <= $num; $i++)
{
$skill = new ilBasicSkillTemplate();
$skill->setTitle($lng->txt("skmg_new_skill_template"));
$skill->create();
ilSkillTreeNode::putInTree($skill, $parent_id, $target);
$skill_ids[] = $skill->getId();
}
$skill_ids = array_reverse($skill_ids);
$skill_ids = implode($skill_ids, ":");
$ilCtrl->setParameter($this, "highlight", $skill_ids);
$ilCtrl->redirect($this, "editSkillTemplates", "node_".$node_id);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::insertSkillCategory ( )

Insert one or multiple skill categories.

Parameters
@return

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

References $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilSkillTreeNode\putInTree().

{
global $ilCtrl, $lng;
include_once("./Services/Skill/classes/class.ilSkillHFormGUI.php");
include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
if (!ilSkillHFormGUI::getPostFirstChild()) // insert after node id
{
$parent_id = $this->skill_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
include_once("./Services/Skill/classes/class.ilSkillCategory.php");
$skill_ids = array();
for ($i = 1; $i <= $num; $i++)
{
$skill = new ilSkillCategory();
$skill->setTitle($lng->txt("skmg_new_skill_category"));
$skill->create();
ilSkillTreeNode::putInTree($skill, $parent_id, $target);
$skill_ids[] = $skill->getId();
}
$skill_ids = array_reverse($skill_ids);
$skill_ids = implode($skill_ids, ":");
$ilCtrl->setParameter($this, "highlight", $skill_ids);
$ilCtrl->redirect($this, "editSkills", "node_".$node_id);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::insertSkillTemplateCategory ( )

Insert one or multiple skill template categories.

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

References $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilSkillTreeNode\putInTree().

{
global $ilCtrl, $lng;
include_once("./Services/Skill/classes/class.ilSkillHFormGUI.php");
include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
if (!ilSkillHFormGUI::getPostFirstChild()) // insert after node id
{
$parent_id = $this->skill_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
include_once("./Services/Skill/classes/class.ilSkillTemplateCategory.php");
$skill_ids = array();
for ($i = 1; $i <= $num; $i++)
{
$skill = new ilSkillTemplateCategory();
$skill->setTitle($lng->txt("skmg_new_skill_template_category"));
$skill->create();
ilSkillTreeNode::putInTree($skill, $parent_id, $target);
$skill_ids[] = $skill->getId();
}
$skill_ids = array_reverse($skill_ids);
$skill_ids = implode($skill_ids, ":");
$ilCtrl->setParameter($this, "highlight", $skill_ids);
$ilCtrl->redirect($this, "editSkillTemplates", "node_".$node_id);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::insertSkillTemplateReference ( )

Insert skill template reference.

Parameters
@return

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

References $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostNodeId(), and IL_FIRST_NODE.

{
global $ilCtrl, $lng;
include_once("./Services/Skill/classes/class.ilSkillHFormGUI.php");
include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
if (!ilSkillHFormGUI::getPostFirstChild()) // insert after node id
{
$parent_id = $this->skill_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
include_once("./Services/Skill/classes/class.ilSkillTemplateReferenceGUI.php");
$ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "parent_id", $parent_id);
$ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "target", $target);
$ilCtrl->redirectByClass("ilskilltemplatereferencegui", "insert");
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::saveAllTemplateTitles (   $a_succ_mess = true)

Save all titles of chapters/scos/pages.

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

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

{
global $ilCtrl, $lng;
if (is_array($_POST["title"]))
{
include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
foreach($_POST["title"] as $id => $title)
{
if (is_object($node_obj))
{
// update title
}
}
if ($a_succ_mess)
{
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
}
$ilCtrl->redirect($this, "editSkillTemplates");
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::saveAllTitles (   $a_succ_mess = true)

Save all titles of chapters/scos/pages.

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

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

Referenced by collapseAll(), and expandAll().

{
global $ilCtrl, $lng;
if (is_array($_POST["title"]))
{
include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
foreach($_POST["title"] as $id => $title)
{
if (is_object($node_obj))
{
// update title
}
}
if ($a_succ_mess)
{
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
}
$ilCtrl->redirect($this, "editSkills");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSkillManagementGUI::saveSettings ( )

Save skill management settings.

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

References $_POST, $ilCtrl, $ilSetting, and ilUtil\sendSuccess().

{
$skmg_set = new ilSetting("skmg");
$skmg_set->set("enable_skmg", $_POST["enable_skmg"]);
ilUtil::sendSuccess($this->lng->txt("settings_saved"),true);
$ilCtrl->redirect($this, "editSettings");
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::setTestSubtabs (   $a_act)

Set test subtabs.

Parameters
@return

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

References $ilCtrl.

{
global $ilTabs, $ilCtrl;
$ilTabs->addSubtab("test",
"getCompletionDateForTriggerRefId",
$ilCtrl->getLinkTarget($this, "test"));
$ilTabs->addSubtab("cert",
"checkUserCertificateForTriggerRefId",
$ilCtrl->getLinkTarget($this, "testCert"));
$ilTabs->addSubtab("all_cert",
"getTriggerOfAllCertificates",
$ilCtrl->getLinkTarget($this, "testAllCert"));
$ilTabs->addSubtab("levels",
"getSkillLevelsForTrigger",
$ilCtrl->getLinkTarget($this, "testLevels"));
$ilTabs->activateSubtab($a_act);
}
ilObjSkillManagementGUI::showTree (   $a_templates,
  $a_gui,
  $a_gui_cmd 
)

Show Editing Tree.

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

References $_GET, $ilCtrl, $ilUser, ilObjectGUI\$lng, $path, ilObjectGUI\$tpl, exit, and ilExplorer\setTargetGet().

Referenced by editSkills(), editSkillTemplates(), and executeCommand().

{
global $ilUser, $tpl, $ilCtrl, $lng;
// $ilCtrl->setParameter($this, "active_node", $_GET["active_node"]);
// $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
// $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
require_once ("./Services/Skill/classes/class.ilSkillExplorer.php");
$exp = new ilSkillExplorer($ilCtrl->getLinkTarget($a_gui, $a_gui_cmd),
$a_templates);
// $exp->setFrameUpdater("content", "ilHierarchyFormUpdater");
$exp->setTargetGet("obj_id");
if ($a_templates)
{
$exp->setExpandTarget($this->ctrl->getLinkTarget($a_gui, $a_gui_cmd));
}
else
{
$exp->setExpandTarget($this->ctrl->getLinkTarget($a_gui, $a_gui_cmd));
}
if ($_GET["skexpand"] == "")
{
$expanded = $this->skill_tree->readRootId();
}
else
{
$expanded = $_GET["skexpand"];
}
if ($_GET["obj_id"] > 0)
{
$path = $this->skill_tree->getPathId($_GET["obj_id"]);
$exp->setForceOpenPath($path);
$exp->highlightNode($_GET["obj_id"]);
}
else
{
$exp->highlightNode($this->skill_tree->readRootId());
}
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
// asynchronous output
if ($ilCtrl->isAsynch())
{
echo $output; exit;
}
// $this->tpl->setCurrentBlock("content");
// $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("sahs_organization"));
// $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
// $this->tpl->setVariable("EXPLORER",$output);
// $this->ctrl->setParameter($this, "scexpand", $_GET["scexpand"]);
// $this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "showTree"));
// $this->tpl->parseCurrentBlock();
// $this->tpl->show(false);
$tpl->setLeftNavContent($output);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSkillManagementGUI::test ( )

Test getCompletionDateForTriggerRefId.

Parameters
@return

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

References $_POST, $ilCtrl, ilObjectGUI\$lng, $result, ilObjectGUI\$tpl, and ilBasicSkill\getCompletionDateForTriggerRefId().

{
global $tpl, $lng, $ilCtrl, $ilTabs;
$this->setTestSubTabs("test");
$ilTabs->activateTab("test");
include_once("./Services/Skill/classes/class.ilBasicSkill.php");
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->addCommandButton("test", $lng->txt("execute"));
$this->form->setTitle("getCompletionDateForTriggerRefId()");
$this->form->setFormAction($ilCtrl->getFormAction($this));
// user id
$ti = new ilTextInputGUI("User ID(s)", "user_id");
$ti->setMaxLength(200);
$ti->setInfo("Separate multiple IDs by :");
$ti->setValue($_POST["user_id"]);
$this->form->addItem($ti);
// ref id
$ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
$ti->setMaxLength(200);
$ti->setInfo("Separate multiple IDs by :");
$ti->setValue($_POST["ref_id"]);
$this->form->addItem($ti);
$result = "";
if (isset($_POST["user_id"]))
{
$user_ids = explode(":", $_POST["user_id"]);
$ref_ids = explode(":", $_POST["ref_id"]);
if (count($user_ids) <= 1)
{
$user_ids = $user_ids[0];
}
if (count($ref_ids) == 1)
{
$ref_ids = $ref_ids[0];
}
else if (count($ref_ids) == 0)
{
$ref_ids = null;
}
$result = "<br />Result:<br />".var_export($result, true);
}
$tpl->setContent($this->form->getHTML().$result);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::testAllCert ( )

Test getTriggerOfAllCertificates.

Parameters
@return

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

References $_POST, $ilCtrl, ilObjectGUI\$lng, $result, ilObjectGUI\$tpl, and ilBasicSkill\getTriggerOfAllCertificates().

{
global $tpl, $lng, $ilCtrl, $ilTabs;
$this->setTestSubTabs("all_cert");
$ilTabs->activateTab("test");
include_once("./Services/Skill/classes/class.ilBasicSkill.php");
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->addCommandButton("testAllCert", $lng->txt("execute"));
$this->form->setTitle("getTriggerOfAllCertificates()");
$this->form->setFormAction($ilCtrl->getFormAction($this));
// user id
$ti = new ilTextInputGUI("User ID(s)", "user_id");
$ti->setMaxLength(200);
$ti->setInfo("Separate multiple IDs by :");
$ti->setValue($_POST["user_id"]);
$this->form->addItem($ti);
$result = "";
if (isset($_POST["user_id"]))
{
$user_ids = explode(":", $_POST["user_id"]);
$ref_ids = explode(":", $_POST["ref_id"]);
if (count($user_ids) <= 1)
{
$user_ids = $user_ids[0];
}
$result = "<br />Result:<br />".var_export($result, true);
}
$tpl->setContent($this->form->getHTML().$result);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::testCert ( )

Test checkUserCertificateForTriggerRefId.

Parameters
@return

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

References $_POST, $ilCtrl, ilObjectGUI\$lng, $result, ilObjectGUI\$tpl, and ilBasicSkill\checkUserCertificateForTriggerRefId().

{
global $tpl, $lng, $ilCtrl, $ilTabs;
$this->setTestSubTabs("cert");
$ilTabs->activateTab("test");
include_once("./Services/Skill/classes/class.ilBasicSkill.php");
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->addCommandButton("testCert", $lng->txt("execute"));
$this->form->setTitle("checkUserCertificateForTriggerRefId()");
$this->form->setFormAction($ilCtrl->getFormAction($this));
// user id
$ti = new ilTextInputGUI("User ID(s)", "user_id");
$ti->setMaxLength(200);
$ti->setInfo("Separate multiple IDs by :");
$ti->setValue($_POST["user_id"]);
$this->form->addItem($ti);
// ref id
$ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
$ti->setMaxLength(200);
$ti->setInfo("Separate multiple IDs by :");
$ti->setValue($_POST["ref_id"]);
$this->form->addItem($ti);
$result = "";
if (isset($_POST["user_id"]))
{
$user_ids = explode(":", $_POST["user_id"]);
$ref_ids = explode(":", $_POST["ref_id"]);
if (count($user_ids) <= 1)
{
$user_ids = $user_ids[0];
}
if (count($ref_ids) == 1)
{
$ref_ids = $ref_ids[0];
}
else if (count($ref_ids) == 0)
{
$ref_ids = null;
}
$result = "<br />Result:<br />".var_export($result, true);
}
$tpl->setContent($this->form->getHTML().$result);
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::testLevels ( )

Test getSkillLevelsForTrigger.

Parameters
@return

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

References $_POST, $ilCtrl, ilObjectGUI\$lng, $result, ilObjectGUI\$tpl, and ilBasicSkill\getSkillLevelsForTrigger().

{
global $tpl, $lng, $ilCtrl, $ilTabs;
$this->setTestSubTabs("levels");
$ilTabs->activateTab("test");
include_once("./Services/Skill/classes/class.ilBasicSkill.php");
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->addCommandButton("testLevels", $lng->txt("execute"));
$this->form->setTitle("getTriggerOfAllCertificates()");
$this->form->setFormAction($ilCtrl->getFormAction($this));
// user id
$ti = new ilTextInputGUI("Ref ID", "ref_id");
$ti->setMaxLength(200);
$ti->setValue($_POST["ref_id"]);
$this->form->addItem($ti);
$result = "";
if (isset($_POST["ref_id"]))
{
$result = "<br />Result:<br />".var_export($result, true);
}
$tpl->setContent($this->form->getHTML().$result);
}

+ Here is the call graph for this function:

Field Documentation

ilObjSkillManagementGUI::$skill_tree
protected

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


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