5include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
 
   27        public function __construct($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   32                parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
 
   34                $this->lng->loadLanguageModule(
'skmg');
 
   36                include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
 
   39                $ilCtrl->saveParameter($this, 
"obj_id");
 
   50                global $rbacsystem, 
$ilErr, $ilAccess, $ilTabs;
 
   52                $next_class = $this->ctrl->getNextClass($this);
 
   53                $cmd = $this->ctrl->getCmd();
 
   57                if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
 
   59                        $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
 
   64                        case 'ilskillrootgui':
 
   65                                include_once(
"./Services/Skill/classes/class.ilSkillRootGUI.php");
 
   67                                $skrt_gui->setParentGUI($this);
 
   68                                $ret = $this->ctrl->forwardCommand($skrt_gui);
 
   71                        case 'ilskillcategorygui':
 
   72                                $this->tabs_gui->activateTab(
"skills");
 
   73                                include_once(
"./Services/Skill/classes/class.ilSkillCategoryGUI.php");
 
   75                                $scat_gui->setParentGUI($this);
 
   76                                $this->
showTree(
false, $scat_gui, 
"listItems");
 
   77                                $ret = $this->ctrl->forwardCommand($scat_gui);
 
   80                        case 'ilbasicskillgui':
 
   81                                $this->tabs_gui->activateTab(
"skills");
 
   82                                include_once(
"./Services/Skill/classes/class.ilBasicSkillGUI.php");
 
   84                                $skill_gui->setParentGUI($this);
 
   85                                $this->
showTree(
false, $skill_gui, 
"edit");
 
   86                                $ret = $this->ctrl->forwardCommand($skill_gui);
 
   89                        case 'ilskilltemplatecategorygui':
 
   90                                $this->tabs_gui->activateTab(
"skill_templates");
 
   91                                include_once(
"./Services/Skill/classes/class.ilSkillTemplateCategoryGUI.php");
 
   93                                $sctp_gui->setParentGUI($this);
 
   94                                $this->
showTree(((
int) $_GET[
"tref_id"] == 0), $sctp_gui, 
"listItems");
 
   95                                $ret = $this->ctrl->forwardCommand($sctp_gui);
 
   98                        case 'ilbasicskilltemplategui':
 
   99                                $this->tabs_gui->activateTab(
"skill_templates");
 
  100                                include_once(
"./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php");
 
  102                                $sktp_gui->setParentGUI($this);
 
  103                                $this->
showTree(((
int) $_GET[
"tref_id"] == 0), $sktp_gui, 
"edit");
 
  104                                $ret = $this->ctrl->forwardCommand($sktp_gui);
 
  107                        case 'ilskilltemplatereferencegui':
 
  108                                $this->tabs_gui->activateTab(
"skills");
 
  109                                include_once(
"./Services/Skill/classes/class.ilSkillTemplateReferenceGUI.php");
 
  111                                $sktr_gui->setParentGUI($this);
 
  112                                $this->
showTree(
false, $sktr_gui, 
"listItems");
 
  113                                $ret = $this->ctrl->forwardCommand($sktr_gui);
 
  116                        case "ilskillprofilegui":
 
  117                                $ilTabs->activateTab(
"profiles");
 
  118                                include_once(
"./Services/Skill/classes/class.ilSkillProfileGUI.php");
 
  120                                $ret = $this->ctrl->forwardCommand($skprof_gui);
 
  123                        case 'ilpermissiongui':
 
  124                                $this->tabs_gui->activateTab(
'permissions');
 
  125                                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  127                                $ret = $this->ctrl->forwardCommand($perm_gui);
 
  136                                if (
$cmd == 
"showTree")
 
  138                                        $this->
showTree($_GET[
"templates_tree"]);
 
  157                global $rbacsystem, $ilAccess, 
$lng;
 
  159                if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
  161                        $this->tabs_gui->addTab(
"skills",
 
  162                                $lng->txt(
"skmg_skills"),
 
  163                                $this->ctrl->getLinkTarget($this, 
"editSkills"));
 
  165                        $this->tabs_gui->addTab(
"skill_templates",
 
  166                                $lng->txt(
"skmg_skill_templates"),
 
  167                                $this->ctrl->getLinkTarget($this, 
"editSkillTemplates"));
 
  169                        $this->tabs_gui->addTab(
"settings",
 
  170                                $lng->txt(
"settings"),
 
  171                                $this->ctrl->getLinkTarget($this, 
"editSettings"));
 
  173                        $this->tabs_gui->addTab(
"profiles",
 
  174                                $lng->txt(
"skmg_skill_profiles"),
 
  175                                $this->ctrl->getLinkTargetByClass(
"ilskillprofilegui"));
 
  179                                $this->tabs_gui->addTab(
"test",
 
  181                                        $this->ctrl->getLinkTarget($this, 
"test"));
 
  185                if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
 
  187                        $this->tabs_gui->addTab(
"permissions",
 
  188                                $lng->txt(
"perm_settings"),
 
  189                                $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"));
 
  200                $ilTabs->activateTab(
"settings");
 
  202                include_once(
"./Services/Skill/classes/class.ilSkillManagementSettings.php");
 
  204                $enable_skmg = $skmg_set->isActivated();
 
  206                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  208                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  209                $form->setTitle(
$lng->txt(
"skmg_settings"));
 
  214                $cb_prop->setValue(
"1");
 
  215                $cb_prop->setChecked($enable_skmg);
 
  216                $form->addItem($cb_prop);
 
  221                        $form->addCommandButton(
"saveSettings", 
$lng->txt(
"save"));
 
  224                $this->tpl->setContent($form->getHTML());
 
  239                include_once(
"./Services/Skill/classes/class.ilSkillManagementSettings.php");
 
  241                $skmg_set->activate((
int) 
$_POST[
"enable_skmg"]);
 
  245                $ilCtrl->redirect($this, 
"editSettings");
 
  255                $ilTabs->activateTab(
"skills");
 
  257                $ilCtrl->setParameterByClass(
"ilobjskillmanagementgui", 
"obj_id", $this->skill_tree->getRootId());
 
  258                $ilCtrl->redirectByClass(
"ilskillrootgui", 
"listSkills");
 
  270                if (is_array(
$_POST[
"title"]))
 
  272                        include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
 
  273                        foreach(
$_POST[
"title"] as $id => $title)
 
  276                                if (is_object($node_obj))
 
  287                $ilCtrl->redirect($this, 
"editSkills");
 
  297                if (is_array(
$_POST[
"title"]))
 
  299                        include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
 
  300                        foreach(
$_POST[
"title"] as $id => $title)
 
  303                                if (is_object($node_obj))
 
  314                $ilCtrl->redirect($this, 
"editSkillTemplates");
 
  323                $_GET[
"skexpand"] = 
"";
 
  324                $n_id = (
$_GET[
"obj_id"] > 0)
 
  326                        : $this->skill_tree->readRootId();
 
  327                $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
 
  329                foreach ($stree as 
$n)
 
  331                        $n_arr[] = 
$n[
"child"];
 
  342                $_GET[
"skexpand"] = 
"";
 
  343                $n_id = (
$_GET[
"obj_id"] > 0)
 
  345                        : $this->skill_tree->readRootId();
 
  346                $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
 
  348                foreach ($stree as 
$n)
 
  350                        if (in_array(
$n[
"child"], $old) && 
$n[
"child"] != $n_id)
 
  352                                $k = array_search(
$n[
"child"], $old);
 
  369                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
  372                $ilTabs->clearTargets();
 
  376                $cskill_ids = array();
 
  377                foreach(
$_POST[
"id"] as $id)
 
  381                                if ($mode == 
"templates")
 
  383                                        $this->
ilias->raiseError(
"Skill Deletion - type mismatch.",$this->
ilias->error_obj->MESSAGE);
 
  390                                        include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
 
  394                                $cskill_ids[] = array(
"skill_id" => $skill_id, 
"tref_id" => $tref_id);
 
  398                                if ($mode == 
"basic")
 
  400                                        $this->
ilias->raiseError(
"Skill Deletion - type mismatch.",$this->
ilias->error_obj->MESSAGE);
 
  406                                        $cskill_ids[] = array(
"skill_id" => $id, 
"tref_id" => $tref_id);
 
  413                if ($mode == 
"basic" || $mode == 
"templates")
 
  415                        include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
 
  417                        $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
 
  418                        if (count($usages) > 0)
 
  421                                foreach ($usages as $k => $usage)
 
  423                                        include_once(
"./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
 
  428                                $ilCtrl->saveParameter($a_gui, 
"tmpmode");
 
  429                                $ilToolbar->addButton(
$lng->txt(
"back"),
 
  430                                        $ilCtrl->getLinkTarget($a_gui, 
"cancelDelete"));
 
  437                        $this->
ilias->raiseError(
"Skill Deletion - type mismatch.",$this->
ilias->error_obj->MESSAGE);
 
  443                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  446                $ilCtrl->setParameter($a_gui, 
"tmpmode", 
$_GET[
"tmpmode"]);
 
  447                $a_form_action = $this->ctrl->getFormAction($a_gui);
 
  448                $confirmation_gui->setFormAction($a_form_action);
 
  449                $confirmation_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
  452                include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
 
  453                foreach(
$_POST[
"id"] as $id)
 
  458                                $confirmation_gui->addItem(
"id[]", $node_obj->getId(),
 
  463                $confirmation_gui->setCancel(
$lng->txt(
"cancel"), 
"cancelDelete");
 
  464                $confirmation_gui->setConfirm(
$lng->txt(
"confirm"), 
"confirmedDelete");
 
  466                $tpl->setContent($confirmation_gui->getHTML());
 
  474                $this->ctrl->redirect($this, 
"editSkills");
 
  485                include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
 
  486                foreach (
$_POST[
"id"] as $id)
 
  491                                $node_data = $this->skill_tree->getNodeData($id);
 
  496                                if($this->skill_tree->isInTree($id))
 
  498                                        $this->skill_tree->deleteTree($node_data);
 
  523                $this->setTestSubTabs(
"test");
 
  525                $ilTabs->activateTab(
"test");
 
  527                include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
 
  529                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  532                $this->form->addCommandButton(
"test", 
$lng->txt(
"execute"));
 
  534                $this->form->setTitle(
"getCompletionDateForTriggerRefId()");
 
  535                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  539                $ti->setMaxLength(200);
 
  540                $ti->setInfo(
"Separate multiple IDs by :");
 
  541                $ti->setValue(
$_POST[
"user_id"]);
 
  542                $this->form->addItem($ti);
 
  546                $ti->setMaxLength(200);
 
  547                $ti->setInfo(
"Separate multiple IDs by :");
 
  548                $ti->setValue(
$_POST[
"ref_id"]);
 
  549                $this->form->addItem($ti);
 
  552                if (isset(
$_POST[
"user_id"]))
 
  554                        $user_ids = explode(
":", 
$_POST[
"user_id"]);
 
  555                        $ref_ids = explode(
":", 
$_POST[
"ref_id"]);
 
  556                        if (count($user_ids) <= 1)
 
  558                                $user_ids = $user_ids[0];
 
  560                        if (count($ref_ids) == 1)
 
  562                                $ref_ids = $ref_ids[0];
 
  564                        else if (count($ref_ids) == 0)
 
  573                $tpl->setContent($this->form->getHTML().$result);
 
  587                $this->setTestSubTabs(
"cert");
 
  588                $ilTabs->activateTab(
"test");
 
  590                include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
 
  592                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  595                $this->form->addCommandButton(
"testCert", 
$lng->txt(
"execute"));
 
  597                $this->form->setTitle(
"checkUserCertificateForTriggerRefId()");
 
  598                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  602                $ti->setMaxLength(200);
 
  603                $ti->setInfo(
"Separate multiple IDs by :");
 
  604                $ti->setValue(
$_POST[
"user_id"]);
 
  605                $this->form->addItem($ti);
 
  609                $ti->setMaxLength(200);
 
  610                $ti->setInfo(
"Separate multiple IDs by :");
 
  611                $ti->setValue(
$_POST[
"ref_id"]);
 
  612                $this->form->addItem($ti);
 
  615                if (isset(
$_POST[
"user_id"]))
 
  617                        $user_ids = explode(
":", 
$_POST[
"user_id"]);
 
  618                        $ref_ids = explode(
":", 
$_POST[
"ref_id"]);
 
  619                        if (count($user_ids) <= 1)
 
  621                                $user_ids = $user_ids[0];
 
  623                        if (count($ref_ids) == 1)
 
  625                                $ref_ids = $ref_ids[0];
 
  627                        else if (count($ref_ids) == 0)
 
  636                $tpl->setContent($this->form->getHTML().$result);
 
  650                $this->setTestSubTabs(
"all_cert");
 
  651                $ilTabs->activateTab(
"test");
 
  653                include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
 
  655                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  658                $this->form->addCommandButton(
"testAllCert", 
$lng->txt(
"execute"));
 
  660                $this->form->setTitle(
"getTriggerOfAllCertificates()");
 
  661                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  665                $ti->setMaxLength(200);
 
  666                $ti->setInfo(
"Separate multiple IDs by :");
 
  667                $ti->setValue(
$_POST[
"user_id"]);
 
  668                $this->form->addItem($ti);
 
  671                if (isset(
$_POST[
"user_id"]))
 
  673                        $user_ids = explode(
":", 
$_POST[
"user_id"]);
 
  674                        $ref_ids = explode(
":", 
$_POST[
"ref_id"]);
 
  675                        if (count($user_ids) <= 1)
 
  677                                $user_ids = $user_ids[0];
 
  684                $tpl->setContent($this->form->getHTML().$result);
 
  698                $this->setTestSubTabs(
"levels");
 
  699                $ilTabs->activateTab(
"test");
 
  701                include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
 
  703                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  706                $this->form->addCommandButton(
"testLevels", 
$lng->txt(
"execute"));
 
  708                $this->form->setTitle(
"getTriggerOfAllCertificates()");
 
  709                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  713                $ti->setMaxLength(200);
 
  714                $ti->setValue(
$_POST[
"ref_id"]);
 
  715                $this->form->addItem($ti);
 
  718                if (isset(
$_POST[
"ref_id"]))
 
  724                $tpl->setContent($this->form->getHTML().$result);
 
  739                $ilTabs->addSubtab(
"test",
 
  740                        "getCompletionDateForTriggerRefId",
 
  741                        $ilCtrl->getLinkTarget($this, 
"test"));
 
  743                $ilTabs->addSubtab(
"cert",
 
  744                        "checkUserCertificateForTriggerRefId",
 
  745                        $ilCtrl->getLinkTarget($this, 
"testCert"));
 
  747                $ilTabs->addSubtab(
"all_cert",
 
  748                        "getTriggerOfAllCertificates",
 
  749                        $ilCtrl->getLinkTarget($this, 
"testAllCert"));
 
  751                $ilTabs->addSubtab(
"levels",
 
  752                        "getSkillLevelsForTrigger",
 
  753                        $ilCtrl->getLinkTarget($this, 
"testLevels"));
 
  755                $ilTabs->activateSubtab($a_act);
 
  770                $ilTabs->activateTab(
"skill_templates");
 
  771                $ilCtrl->setParameterByClass(
"ilobjskillmanagementgui", 
"obj_id", $this->skill_tree->getRootId());
 
  772                $ilCtrl->redirectByClass(
"ilskillrootgui", 
"listTemplates");
 
  783        function showTree($a_templates, $a_gui = 
"", $a_gui_cmd = 
"")
 
  789                        if (
$_GET[
"obj_id"] == 
"" || 
$_GET[
"obj_id"] == 1)
 
  794                        if (
$_GET[
"obj_id"] > 1)
 
  796                                $path = $this->skill_tree->getPathId(
$_GET[
"obj_id"]);
 
  797                                include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
 
  805                $ilCtrl->setParameter($this, 
"templates_tree", $a_templates);
 
  809                        include_once(
"./Services/Skill/classes/class.ilSkillTemplateTreeExplorerGUI.php");
 
  814                        include_once(
"./Services/Skill/classes/class.ilSkillTreeExplorerGUI.php");
 
  817                if (!$exp->handleCommand())
 
  819                        $tpl->setLeftNavContent($exp->getHTML());
 
Basic skill template GUI class.
static getCompletionDateForTriggerRefId($a_user_id, $a_ref_id=null, $a_self_eval=0)
Get trigger completion.
static getSkillLevelsForTrigger($a_ref_id)
Get assigned skill levels for trigger.
static getTriggerOfAllCertificates($a_user_id, $a_self_eval=0)
Get trigger completion.
static checkUserCertificateForTriggerRefId($a_user_id, $a_ref_id, $a_self_eval=0)
Get trigger completion.
Confirmation screen class.
Skill management main GUI class.
testAllCert()
Test getTriggerOfAllCertificates.
editSettings()
Edit news settings.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
saveAllTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.
cancelDelete()
cancel delete
confirmedDelete()
Delete chapters/scos/pages.
setTestSubtabs($a_act)
Set test subtabs.
expandAll($a_redirect=true)
Expand all.
saveSettings()
Save skill management settings.
executeCommand()
Execute command.
saveAllTemplateTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.
testLevels()
Test getSkillLevelsForTrigger.
deleteNodes($a_gui)
confirm deletion screen of skill tree nodes
collapseAll($a_redirect=true)
Collapse all.
showTree($a_templates, $a_gui="", $a_gui_cmd="")
Show Editing Tree.
testCert()
Test checkUserCertificateForTriggerRefId.
editSkillTemplates()
Edit skill templates.
test()
Test getCompletionDateForTriggerRefId.
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput()
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Skill category GUI class.
Skill management settings.
Skill template category GUI class.
Skill template reference GUI class.
static _lookupTrefIdsForTemplateId($a_tid)
Get all tref ids for a template id.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
Explorer class that works on tree objects (Services/Tree)
Explorer class that works on tree objects (Services/Tree)
static getInstance($a_id=0)
static _writeTitle($a_obj_id, $a_title)
Write Title.
static _lookupType($a_obj_id)
Lookup Type.
TableGUI class for skill usages.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
redirection script todo: (a better solution should control the processing via a xml file)