ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilBasicSkillGUI Class Reference

Basic skill GUI class. More...

+ Inheritance diagram for ilBasicSkillGUI:
+ Collaboration diagram for ilBasicSkillGUI:

Public Member Functions

 __construct ($a_node_id=0)
 Constructor.
 getType ()
 Get Node Type.
 executeCommand ()
 Execute command.
 showProperties ()
 Show properties.
 proceedDragDrop ()
 Perform drag and drop action.
 saveItem ()
 Save item.
 afterSave ()
 After saving.
 updateItem ()
 Update item.
 edit ()
 Edit skill.
 initForm ($a_mode="edit")
 Init form.
 editProperties ()
 Edit properties.
 addLevel ()
 Add new level.
 editLevel ()
 Edit level.
 saveLevel ()
 Save level form.
 updateLevel ()
 Update level form.
 initLevelForm ($a_mode="edit")
 Init level form.
 getLevelValues ()
 Get current values for level from.
 updateLevelOrder ()
 Update level order.
 confirmLevelDeletion ()
 Confirm level deletion.
 deleteLevel ()
 Delete levels.
 setLevelHead ()
 Set header for level.
 setTabs ($a_tab="levels")
 Set header for skill.
 editLevelTrigger ()
 Edit level trigger.
 selectLevelTrigger ()
 Select skill level trigger.
 saveLevelTrigger ()
 Save level trigger.
 removeLevelTrigger ()
 Remove trigger.
 redirectToParent ()
 Redirect to parent (identified by current obj_id)
 showLevelResources ()
 Show level resources.
 addLevelResource ()
 Add level resource.
 saveLevelResource ()
 Save level resource.
 confirmLevelResourcesRemoval ()
 Confirm level resources removal.
 removeLevelResources ()
 Remove level resource.
- Public Member Functions inherited from ilSkillTreeNodeGUI
 ilSkillTreeNodeGUI ($a_node_id=0)
 constructor
 setParentGUI ($a_parentgui)
 Set Parent GUI class.
 getParentGUI ()
 Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
 readNodeObject ($a_node_id)
 Get node object instance.
 saveAllTitles ()
 Save Titles.
 deleteNodes ()
 Delete nodes in the hierarchy.
 cutItems ()
 Copy items to clipboard, then cut them from the current tree.
 copyItems ()
 Copy items to clipboard.
 cancelDelete ()
 cancel delete
 confirmedDelete ()
 confirmed delete
 setLocator ()
 Set Locator Items.
 setSkillNodeDescription ()
 Set skill node description.
 create ()
 Create skill tree node.
 addStatusInput (ilPropertyFormGUI $a_form)
 Add status input.
 getPropertyValues ()
 Get property values for edit form.
 save ()
 Save skill tree node.
 update ()
 Update skill tree node.
 afterUpdate ()
 After update.
 cancelSave ()
 Cancel saving.
 redirectToParent ($a_tmp_mode=false)
 Redirect to parent (identified by current obj_id)
 saveOrder ()
 Save order.
 insertBasicSkillClip ()
 Insert basic skills from clipboard.
 insertSkillCategoryClip ()
 Insert skill categories from clipboard.
 insertTemplateReferenceClip ()
 Insert skill template references from clipboard.
 insertSkillTemplateClip ()
 Insert skill template from clipboard.
 insertTemplateCategoryClip ()
 Insert skill template category from clipboard.
 setTitleIcon ()
 Set title icon.
 addUsageTab ($a_tabs)
 Add usage tab.
 showUsage ()
 Show skill usage.

Protected Attributes

 $tref_id = 0
 $base_skill_id

Additional Inherited Members

- Data Fields inherited from ilSkillTreeNodeGUI
 $node_object

Detailed Description

Constructor & Destructor Documentation

ilBasicSkillGUI::__construct (   $a_node_id = 0)

Constructor.

Reimplemented in ilSkillTemplateReferenceGUI.

Definition at line 26 of file class.ilBasicSkillGUI.php.

References $ilCtrl, and ilSkillTreeNodeGUI\ilSkillTreeNodeGUI().

{
global $ilCtrl;
$ilCtrl->saveParameter($this, array("obj_id", "level_id"));
$this->base_skill_id = $a_node_id;
}

+ Here is the call graph for this function:

Member Function Documentation

ilBasicSkillGUI::addLevel ( )

Add new level.

Definition at line 225 of file class.ilBasicSkillGUI.php.

References $tpl, and initLevelForm().

{
global $tpl;
$this->initLevelForm("create");
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilBasicSkillGUI::addLevelResource ( )

Add level resource.

Definition at line 665 of file class.ilBasicSkillGUI.php.

References $ilCtrl, $lng, $tpl, and setLevelHead().

{
global $ilCtrl, $ilTabs, $lng, $tree, $tpl;
$this->setLevelHead();
$ilTabs->activateTab("level_resources");
include_once("./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
$exp = new ilRepositorySelectorExplorerGUI($this, "addLevelResource",
$this, "saveLevelResource", "root_id");
if (!$exp->handleCommand())
{
$tpl->setContent($exp->getHTML());
}
}

+ Here is the call graph for this function:

ilBasicSkillGUI::afterSave ( )

After saving.

Reimplemented from ilSkillTreeNodeGUI.

Reimplemented in ilSkillTemplateReferenceGUI, and ilBasicSkillTemplateGUI.

Definition at line 117 of file class.ilBasicSkillGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->setParameterByClass("ilbasicskillgui", "obj_id",
$this->node_object->getId());
$ilCtrl->redirectByClass("ilbasicskillgui", "edit");
}
ilBasicSkillGUI::confirmLevelDeletion ( )

Confirm level deletion.

Definition at line 367 of file class.ilBasicSkillGUI.php.

References $_POST, $ilCtrl, $lng, $tpl, ilBasicSkill\lookupLevelTitle(), ilUtil\sendInfo(), and setTabs().

{
global $ilCtrl, $tpl, $lng;
$this->setTabs("levels");
if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
{
ilUtil::sendInfo($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "edit");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("skmg_really_delete_levels"));
$cgui->setCancel($lng->txt("cancel"), "edit");
$cgui->setConfirm($lng->txt("delete"), "deleteLevel");
foreach ($_POST["id"] as $i)
{
$cgui->addItem("id[]", $i, ilBasicSkill::lookupLevelTitle($i));
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilBasicSkillGUI::confirmLevelResourcesRemoval ( )

Confirm level resources removal.

Definition at line 706 of file class.ilBasicSkillGUI.php.

References $_POST, $ilCtrl, $lng, $tpl, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilUtil\sendInfo(), and setLevelHead().

{
global $ilCtrl, $tpl, $lng, $ilTabs;
$this->setLevelHead();
$ilTabs->activateTab("level_resources");
if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
{
ilUtil::sendInfo($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "showLevelResources");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("skmg_confirm_level_resources_removal"));
$cgui->setCancel($lng->txt("cancel"), "showLevelResources");
$cgui->setConfirm($lng->txt("remove"), "removeLevelResources");
foreach ($_POST["id"] as $i)
{
$cgui->addItem("id[]", $i, $title);
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilBasicSkillGUI::deleteLevel ( )

Delete levels.

Definition at line 399 of file class.ilBasicSkillGUI.php.

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

{
global $lng, $ilCtrl;
if (is_array($_POST["id"]))
{
foreach ($_POST["id"] as $id)
{
$this->node_object->deleteLevel((int) $id);
}
$this->node_object->fixLevelNumbering();
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

ilBasicSkillGUI::edit ( )

Edit skill.

Reimplemented in ilBasicSkillTemplateGUI.

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

References $ilCtrl, $lng, $tpl, and setTabs().

{
global $tpl, $ilToolbar, $lng, $ilCtrl;
$this->setTabs("levels");
$ilToolbar->addButton($lng->txt("skmg_add_level"),
$ilCtrl->getLinkTarget($this, "addLevel"));
include_once("./Services/Skill/classes/class.ilSkillLevelTableGUI.php");
$table = new ilSkillLevelTableGUI($this->base_skill_id, $this, "edit");
$tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

ilBasicSkillGUI::editLevel ( )

Edit level.

Definition at line 236 of file class.ilBasicSkillGUI.php.

References $tpl, getLevelValues(), and initLevelForm().

{
global $tpl;
$this->initLevelForm();
$this->getLevelValues();
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilBasicSkillGUI::editLevelTrigger ( )

Edit level trigger.

Definition at line 528 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, $lng, $tpl, ilObject\_isInTrash(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilBasicSkill\lookupLevelTrigger(), setLevelHead(), and ilNonEditableValueGUI\setValue().

{
global $lng, $ilCtrl, $tpl, $ilTabs;
$this->setLevelHead();
$ilTabs->activateTab("level_trigger");
$trigger = ilBasicSkill::lookupLevelTrigger((int) $_GET["level_id"]);
if (ilObject::_lookupType($trigger["obj_id"]) != "crs" ||
ilObject::_isInTrash($trigger["ref_id"]))
{
$trigger = array();
}
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// trigger
$ne = new ilNonEditableValueGUI($lng->txt("skmg_trigger"), "trigger");
if ($trigger["obj_id"] > 0)
{
$ne->setValue(ilObject::_lookupTitle($trigger["obj_id"]));
}
else
{
$ne->setValue($lng->txt("skmg_no_trigger"));
}
$this->form->addItem($ne);
if ($trigger["obj_id"] > 0)
{
$this->form->addCommandButton("removeLevelTrigger", $lng->txt("skmg_remove_trigger"));
}
$this->form->addCommandButton("selectLevelTrigger", $lng->txt("skmg_select_trigger"));
$this->form->setTitle($lng->txt("skmg_skill_level_trigger"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilBasicSkillGUI::editProperties ( )

Edit properties.

Reimplemented from ilSkillTreeNodeGUI.

Reimplemented in ilSkillTemplateReferenceGUI.

Definition at line 209 of file class.ilBasicSkillGUI.php.

References setTabs().

{
$this->setTabs("properties");
}

+ Here is the call graph for this function:

ilBasicSkillGUI::executeCommand ( )

Execute command.

Reimplemented in ilSkillTemplateReferenceGUI.

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

References $_GET, $cmd, $ilCtrl, $ret, $tpl, and setLevelHead().

{
global $ilCtrl, $tpl, $ilTabs, $ilHelp;
$tpl->getStandardTemplate();
$next_class = $ilCtrl->getNextClass($this);
$cmd = $ilCtrl->getCmd();
switch($next_class)
{
case "ilcertificategui":
$this->setLevelHead();
$ilTabs->activateTab("level_certificate");
include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
include_once("./Services/Skill/classes/class.ilSkillCertificateAdapter.php");
$output_gui = new ilCertificateGUI(
new ilSkillCertificateAdapter($this->node_object, (int) $_GET["level_id"]));
$ret = $ilCtrl->forwardCommand($output_gui);
break;
default:
$ret = $this->$cmd();
break;
}
}

+ Here is the call graph for this function:

ilBasicSkillGUI::getLevelValues ( )

Get current values for level from.

Definition at line 341 of file class.ilBasicSkillGUI.php.

References $_GET.

Referenced by editLevel().

{
$values = array();
$data = $this->node_object->getLevelData((int) $_GET["level_id"]);
$values["title"] = $data["title"];
$values["description"] = $data["description"];
$this->form->setValuesByArray($values);
}

+ Here is the caller graph for this function:

ilBasicSkillGUI::getType ( )

Get Node Type.

Reimplemented in ilSkillTemplateReferenceGUI, and ilBasicSkillTemplateGUI.

Definition at line 39 of file class.ilBasicSkillGUI.php.

{
return "skll";
}
ilBasicSkillGUI::initForm (   $a_mode = "edit")

Init form.

Parameters
int$a_modeEdit Mode

Reimplemented from ilSkillTreeNodeGUI.

Reimplemented in ilSkillTemplateReferenceGUI, and ilBasicSkillTemplateGUI.

Definition at line 160 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, $lng, ilSkillTreeNodeGUI\addStatusInput(), ilFormPropertyGUI\setInfo(), ilNumberInputGUI\setMaxLength(), and ilTextInputGUI\setMaxLength().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// title
$ti = new ilTextInputGUI($lng->txt("title"), "title");
$ti->setMaxLength(200);
$ti->setSize(50);
$ti->setRequired(true);
$this->form->addItem($ti);
// order nr
$ni = new ilNumberInputGUI($lng->txt("skmg_order_nr"), "order_nr");
$ni->setMaxLength(6);
$ni->setSize(6);
$ni->setRequired(true);
$this->form->addItem($ni);
// status
$this->addStatusInput($this->form);
// selectable
$cb = new ilCheckboxInputGUI($lng->txt("skmg_selectable"), "self_eval");
$cb->setInfo($lng->txt("skmg_selectable_info"));
$this->form->addItem($cb);
// save and cancel commands
if ($a_mode == "create")
{
$this->form->addCommandButton("save", $lng->txt("save"));
$this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("skmg_create_skll"));
}
else
{
$this->form->addCommandButton("update", $lng->txt("save"));
$this->form->setTitle($lng->txt("skmg_edit_skll"));
}
$ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

ilBasicSkillGUI::initLevelForm (   $a_mode = "edit")

Init level form.

Parameters
string$a_modeform mode

Definition at line 298 of file class.ilBasicSkillGUI.php.

References $ilCtrl, $lng, ilTextAreaInputGUI\setCols(), setLevelHead(), and ilTextInputGUI\setMaxLength().

Referenced by addLevel(), editLevel(), saveLevel(), and updateLevel().

{
global $lng, $ilCtrl, $ilTabs;
$ilCtrl->saveParameter($this, "level_id");
$this->setLevelHead();
$ilTabs->activateTab("level_settings");
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// title
$ti = new ilTextInputGUI($lng->txt("title"), "title");
$ti->setMaxLength(200);
$ti->setRequired(true);
$this->form->addItem($ti);
// description
$ta = new ilTextAreaInputGUI($lng->txt("description"), "description");
$ta->setCols(50);
$ta->setRows(5);
$this->form->addItem($ta);
// save and cancel commands
if ($a_mode == "create")
{
$this->form->addCommandButton("saveLevel", $lng->txt("save"));
$this->form->addCommandButton("edit", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("skmg_new_level"));
}
else
{
$this->form->addCommandButton("updateLevel", $lng->txt("save"));
$this->form->addCommandButton("edit", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("skmg_edit_level"));
}
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilBasicSkillGUI::proceedDragDrop ( )

Perform drag and drop action.

Definition at line 90 of file class.ilBasicSkillGUI.php.

References $ilCtrl.

{
global $ilCtrl;
// $this->slm_object->executeDragDrop($_POST["il_hform_source_id"], $_POST["il_hform_target_id"],
// $_POST["il_hform_fc"], $_POST["il_hform_as_subitem"]);
// $ilCtrl->redirect($this, "showOrganization");
}
ilBasicSkillGUI::redirectToParent ( )

Redirect to parent (identified by current obj_id)

Definition at line 619 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, $t, and ilSkillTreeNode\_lookupType().

{
global $ilCtrl;
switch ($t)
{
case "skrt":
$ilCtrl->setParameterByClass("ilskillrootgui", "obj_id", (int) $_GET["obj_id"]);
$ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
break;
}
}

+ Here is the call graph for this function:

ilBasicSkillGUI::removeLevelResources ( )

Remove level resource.

Definition at line 740 of file class.ilBasicSkillGUI.php.

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

{
global $ilCtrl, $lng;
if (is_array($_POST["id"]))
{
include_once("./Services/Skill/classes/class.ilSkillResources.php");
$sres = new ilSkillResources($this->base_skill_id, $this->tref_id);
foreach ($_POST["id"] as $i)
{
$sres->setResourceAsImparting((int) $_GET["level_id"], $i, false);
}
$sres->save();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "showLevelResources");
}

+ Here is the call graph for this function:

ilBasicSkillGUI::removeLevelTrigger ( )

Remove trigger.

Definition at line 608 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, and ilBasicSkill\writeLevelTrigger().

{
global $ilCtrl;
ilBasicSkill::writeLevelTrigger((int) $_GET["level_id"], 0);
$ilCtrl->redirect($this, "editLevelTrigger");
}

+ Here is the call graph for this function:

ilBasicSkillGUI::saveItem ( )

Save item.

Reimplemented in ilSkillTemplateReferenceGUI, and ilBasicSkillTemplateGUI.

Definition at line 102 of file class.ilBasicSkillGUI.php.

References $_GET, $_POST, IL_LAST_NODE, and ilSkillTreeNode\putInTree().

{
$it = new ilBasicSkill();
$it->setTitle($this->form->getInput("title"));
$it->setOrderNr($this->form->getInput("order_nr"));
$it->setStatus($this->form->getInput("status"));
$it->setSelfEvaluation($_POST["self_eval"]);
$it->create();
$this->node_object = $it;
}

+ Here is the call graph for this function:

ilBasicSkillGUI::saveLevel ( )

Save level form.

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

References $ilCtrl, $lng, $tpl, initLevelForm(), and ilUtil\sendSuccess().

{
global $tpl, $lng, $ilCtrl;
$this->initLevelForm("create");
if ($this->form->checkInput())
{
// perform save
$this->node_object->addLevel(
$this->form->getInput("title"),
$this->form->getInput("description"));
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "edit");
}
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHtml());
}

+ Here is the call graph for this function:

ilBasicSkillGUI::saveLevelResource ( )

Save level resource.

Definition at line 684 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, $lng, $ref_id, and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
$ref_id = (int) $_GET["root_id"];
if ($ref_id > 0)
{
include_once("./Services/Skill/classes/class.ilSkillResources.php");
$sres = new ilSkillResources($this->base_skill_id, $this->tref_id);
$sres->setResourceAsImparting((int) $_GET["level_id"], $ref_id);
$sres->save();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "showLevelResources");
}

+ Here is the call graph for this function:

ilBasicSkillGUI::saveLevelTrigger ( )

Save level trigger.

Definition at line 597 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, and ilBasicSkill\writeLevelTrigger().

{
global $ilCtrl;
ilBasicSkill::writeLevelTrigger((int) $_GET["level_id"], (int) $_GET["root_id"]);
$ilCtrl->redirect($this, "editLevelTrigger");
}

+ Here is the call graph for this function:

ilBasicSkillGUI::selectLevelTrigger ( )

Select skill level trigger.

Definition at line 572 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, $lng, $tpl, ilExplorer\setExpand(), and setLevelHead().

{
global $ilCtrl, $ilTabs, $lng, $tree, $tpl;
$this->setLevelHead();
$ilTabs->activateTab("level_trigger");
include_once 'Services/Search/classes/class.ilSearchRootSelector.php';
$ilCtrl->getLinkTarget($this,'showRepositorySelection'));
$exp->setExpand($_GET["search_root_expand"] ? $_GET["search_root_expand"] : $tree->readRootId());
$exp->setExpandTarget($ilCtrl->getLinkTarget($this,'selectLevelTrigger'));
$exp->setTargetClass(get_class($this));
$exp->setCmd('saveLevelTrigger');
$exp->setClickableTypes(array("crs"));
// build html-output
$exp->setOutput(0);
$tpl->setContent($exp->getOutput());
}

+ Here is the call graph for this function:

ilBasicSkillGUI::setLevelHead ( )

Set header for level.

Reimplemented in ilBasicSkillTemplateGUI.

Definition at line 418 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, $lng, $path, $tpl, and ilBasicSkill\lookupLevelTitle().

Referenced by addLevelResource(), confirmLevelResourcesRemoval(), editLevelTrigger(), executeCommand(), initLevelForm(), selectLevelTrigger(), and showLevelResources().

{
global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
// tabs
$ilTabs->clearTargets();
$ilHelp->setScreenIdComponent("skmg_lev");
$ilTabs->setBackTarget($lng->txt("back"),
$ilCtrl->getLinkTarget($this, "edit"));
if ($_GET["level_id"] > 0)
{
$ilTabs->addTab("level_settings",
$lng->txt("settings"),
$ilCtrl->getLinkTarget($this, "editLevel"));
/* $ilTabs->addTab("level_trigger",
$lng->txt("skmg_trigger"),
$ilCtrl->getLinkTarget($this, "editLevelTrigger"));*/
$ilTabs->addTab("level_resources",
$lng->txt("skmg_resources"),
$ilCtrl->getLinkTarget($this, "showLevelResources"));
/*
$ilTabs->addTab("level_certificate",
$lng->txt("certificate"),
$ilCtrl->getLinkTargetByClass("ilcertificategui", "certificateEditor"));*/
}
// title
if ($_GET["level_id"] > 0)
{
$tpl->setTitle($lng->txt("skmg_skill_level").": ".
}
else
{
$tpl->setTitle($lng->txt("skmg_skill_level"));
}
include_once("./Services/Skill/classes/class.ilSkillTree.php");
$tree = new ilSkillTree();
$path = $tree->getPathFull($this->node_object->getId());
$desc = "";
foreach ($path as $p)
{
if (in_array($p["type"], array("scat", "skll")))
{
$desc.= $sep.$p["title"];
$sep = " > ";
}
}
$tpl->setDescription($desc);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilBasicSkillGUI::setTabs (   $a_tab = "levels")

Set header for skill.

Parameters
string$a_tabactive tab

Reimplemented in ilBasicSkillTemplateGUI, and ilSkillTemplateReferenceGUI.

Definition at line 480 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, $lng, $tpl, ilSkillTreeNodeGUI\addUsageTab(), ilSkillTreeNodeGUI\setSkillNodeDescription(), and ilSkillTreeNodeGUI\setTitleIcon().

Referenced by confirmLevelDeletion(), edit(), editProperties(), and showProperties().

{
global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
$ilTabs->clearTargets();
$ilHelp->setScreenIdComponent("skmg_skll");
// $ilTabs->setBackTarget($lng->txt("skmg_skill_hierarchie"),
// $ilCtrl->getLinkTargetByClass("ilobjskillmanagementgui", "editSkills"));
if (is_object($this->node_object))
{
// levels
$ilTabs->addTab("levels", $lng->txt("skmg_skill_levels"),
$ilCtrl->getLinkTarget($this, 'edit'));
// properties
$ilTabs->addTab("properties", $lng->txt("settings"),
$ilCtrl->getLinkTarget($this, 'editProperties'));
// usage
$this->addUsageTab($ilTabs);
$ilCtrl->setParameterByClass("ilskillrootgui", "obj_id",
$this->node_object->skill_tree->getRootId());
$ilTabs->setBackTarget($lng->txt("obj_skmg"),
$ilCtrl->getLinkTargetByClass("ilskillrootgui", "listSkills"));
$ilCtrl->setParameterByClass("ilskillrootgui", "obj_id",
$_GET["obj_id"]);
$ilTabs->activateTab($a_tab);
$tpl->setTitle($lng->txt("skmg_skill").": ".
$this->node_object->getTitle());
}
else
{
$tpl->setTitle($lng->txt("skmg_skill"));
$tpl->setDescription("");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilBasicSkillGUI::showLevelResources ( )

Show level resources.

Definition at line 644 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, $lng, $tab, $tpl, and setLevelHead().

{
global $tpl, $ilTabs, $ilToolbar, $lng, $ilCtrl;
$ilToolbar->addButton(
$lng->txt("skmg_add_resource"),
$ilCtrl->getLinkTarget($this, "addLevelResource"));
$this->setLevelHead();
$ilTabs->activateTab("level_resources");
include_once("./Services/Skill/classes/class.ilSkillLevelResourcesTableGUI.php");
$tab = new ilSkillLevelResourcesTableGUI($this, "showLevelResources",
$this->base_skill_id, $this->tref_id, (int) $_GET["level_id"]);
$tpl->setContent($tab->getHTML());
}

+ Here is the call graph for this function:

ilBasicSkillGUI::showProperties ( )

Show properties.

Definition at line 76 of file class.ilBasicSkillGUI.php.

References $tpl, ilSkillTreeNodeGUI\setLocator(), and setTabs().

{
global $tpl;
$this->setTabs();
$this->setLocator();
$tpl->setContent("Properties");
}

+ Here is the call graph for this function:

ilBasicSkillGUI::updateItem ( )

Update item.

Definition at line 129 of file class.ilBasicSkillGUI.php.

References $_POST.

{
$this->node_object->setTitle($this->form->getInput("title"));
$this->node_object->setOrderNr($this->form->getInput("order_nr"));
$this->node_object->setSelfEvaluation($_POST["self_eval"]);
$this->node_object->setStatus($_POST["status"]);
$this->node_object->update();
}
ilBasicSkillGUI::updateLevel ( )

Update level form.

Definition at line 271 of file class.ilBasicSkillGUI.php.

References $_GET, $ilCtrl, $lng, $tpl, initLevelForm(), and ilUtil\sendSuccess().

{
global $lng, $ilCtrl, $tpl;
$this->initLevelForm("edit");
if ($this->form->checkInput())
{
$this->node_object->writeLevelTitle(
(int) $_GET["level_id"],
$this->form->getInput("title"));
$this->node_object->writeLevelDescription(
(int) $_GET["level_id"],
$this->form->getInput("description"));
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "edit");
}
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHtml());
}

+ Here is the call graph for this function:

ilBasicSkillGUI::updateLevelOrder ( )

Update level order.

Definition at line 354 of file class.ilBasicSkillGUI.php.

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

{
global $lng, $ilCtrl;
$order = ilUtil::stripSlashesArray($_POST["order"]);
$this->node_object->updateLevelOrder($order);
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

Field Documentation

ilBasicSkillGUI::$base_skill_id
protected

Definition at line 21 of file class.ilBasicSkillGUI.php.

ilBasicSkillGUI::$tref_id = 0
protected

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


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