ILIAS  Release_5_0_x_branch Revision 61816
 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.
 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.
 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.
 showMountWebfolderIcon ()
 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 ($a_do_not_add_object=false)
 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.
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput())
 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
 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.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

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 463 of file class.ilObjSkillManagementGUI.php.

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

Collapse all.

Definition at line 332 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 471 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 355 of file class.ilObjSkillManagementGUI.php.

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

{
global $lng, $tpl, $ilCtrl, $ilTabs, $ilToolbar;
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
$ilTabs->clearTargets();
// check usages
$mode = "";
$cskill_ids = array();
foreach($_POST["id"] as $id)
{
if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr")))
{
if ($mode == "templates")
{
$this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
}
$mode = "basic";
$skill_id = $id;
$tref_id = 0;
if (ilSkillTreeNode::_lookupType($id) == "sktr")
{
include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
$tref_id = $id;
}
$cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
}
if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp")))
{
if ($mode == "basic")
{
$this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
}
$mode = "templates";
{
$cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
}
}
// for cats, skills and template references, get "real" usages
// for skill and category templates check usage in references
}
if ($mode == "basic" || $mode == "templates")
{
include_once("./Services/Skill/classes/class.ilSkillUsage.php");
$u = new ilSkillUsage();
$usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
if (count($usages) > 0)
{
$html = "";
foreach ($usages as $k => $usage)
{
include_once("./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
$tab = new ilSkillUsageTableGUI($this, "showUsage", $k, $usage);
$html.= $tab->getHTML()."<br/><br/>";
}
$tpl->setContent($html);
$ilToolbar->addButton($lng->txt("back"),
$ilCtrl->getLinkTarget($a_gui, "cancelDelete"));
ilUtil::sendFailure($lng->txt("skmg_cannot_delete_nodes_in_use"));
return;
}
}
else
{
$this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
}
// 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().".svg"));
}
}
$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 196 of file class.ilObjSkillManagementGUI.php.

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

{
global $ilCtrl, $lng, $ilSetting, $ilTabs;
$ilTabs->activateTab("settings");
include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
$skmg_set = new ilSkillManagementSettings();
$enable_skmg = $skmg_set->isActivated();
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.

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

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

{
global $tpl, $ilTabs, $lng, $ilCtrl;
$ilTabs->activateTab("skills");
$ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
$ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
}
ilObjSkillManagementGUI::editSkillTemplates ( )

Edit skill templates.

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

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

{
global $tpl, $ilTabs, $lng, $ilCtrl;
$ilTabs->activateTab("skill_templates");
$ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
$ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
}
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"], (int) $_GET["tref_id"]);
$sctp_gui->setParentGUI($this);
$this->showTree(((int) $_GET["tref_id"] == 0), $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"], (int) $_GET["tref_id"]);
$sktp_gui->setParentGUI($this);
$this->showTree(((int) $_GET["tref_id"] == 0), $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["tref_id"]);
$sktr_gui->setParentGUI($this);
$this->showTree(false, $sktr_gui, "listItems");
$ret = $this->ctrl->forwardCommand($sktr_gui);
break;
case "ilskillprofilegui":
$ilTabs->activateTab("profiles");
include_once("./Services/Skill/classes/class.ilSkillProfileGUI.php");
$skprof_gui = new ilSkillProfileGUI();
$ret = $this->ctrl->forwardCommand($skprof_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";
}
if ($cmd == "showTree")
{
$this->showTree($_GET["templates_tree"]);
}
else
{
$this->$cmd();
}
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjSkillManagementGUI::expandAll (   $a_redirect = true)

Expand all.

Definition at line 313 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 155 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"));
$this->tabs_gui->addTab("profiles",
$lng->txt("skmg_skill_profiles"),
$this->ctrl->getLinkTargetByClass("ilskillprofilegui"));
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::saveAllTemplateTitles (   $a_succ_mess = true)

Save all titles of chapters/scos/pages.

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

References $_POST, $ilCtrl, ilObjectGUI\$lng, 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 258 of file class.ilObjSkillManagementGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, 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 227 of file class.ilObjSkillManagementGUI.php.

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

{
include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
$skmg_set = new ilSkillManagementSettings();
$skmg_set->activate((int) $_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 726 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 774 of file class.ilObjSkillManagementGUI.php.

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

Referenced by executeCommand().

{
global $ilUser, $tpl, $ilCtrl, $lng;
if ($a_templates)
{
if ($_GET["obj_id"] == "" || $_GET["obj_id"] == 1)
{
return;
}
if ($_GET["obj_id"] > 1)
{
$path = $this->skill_tree->getPathId($_GET["obj_id"]);
include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
{
return;
}
}
}
$ilCtrl->setParameter($this, "templates_tree", $a_templates);
if ($a_templates)
{
include_once("./Services/Skill/classes/class.ilSkillTemplateTreeExplorerGUI.php");
$exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree");
}
else
{
include_once("./Services/Skill/classes/class.ilSkillTreeExplorerGUI.php");
$exp = new ilSkillTreeExplorerGUI($this, "showTree", $a_templates);
}
if (!$exp->handleCommand())
{
$tpl->setLeftNavContent($exp->getHTML());
}
}

+ 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 510 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 637 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 574 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 685 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: