ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSkillCategoryGUI Class Reference

Skill category GUI class. More...

+ Inheritance diagram for ilSkillCategoryGUI:
+ Collaboration diagram for ilSkillCategoryGUI:

Public Member Functions

 __construct ($a_node_id=0)
 Constructor.
 getType ()
 Get Node Type.
executeCommand ()
 Execute command.
 setTabs ($a_tab)
 output tabs
 editProperties ()
 Edit properties.
 proceedDragDrop ()
 Perform drag and drop action.
 edit ()
 Edit.
 initForm ($a_mode="edit")
 Init form.
 saveItem ()
 Save item.
 getValues ()
 Get current values for from.
 updateItem ()
 Update item.
 listItems ()
 Update form.
 cancel ()
 Cancel.
 redirectToParent ()
 Redirect to parent (identified by current obj_id)
- 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.
 getPropertyValues ()
 Get property values for edit form.
 save ()
 Save skill tree node.
 afterSave ()
 After saving.
 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.

Static Public Member Functions

static addCreationButtons ()
 Add creation buttons.

Additional Inherited Members

- Data Fields inherited from ilSkillTreeNodeGUI
 $node_object

Detailed Description

Skill category GUI class.

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

ilSkillCategoryGUI: ilObjSkillManagementGUI

Definition at line 16 of file class.ilSkillCategoryGUI.php.

Constructor & Destructor Documentation

ilSkillCategoryGUI::__construct (   $a_node_id = 0)

Constructor.

Definition at line 22 of file class.ilSkillCategoryGUI.php.

References $ilCtrl, and ilSkillTreeNodeGUI\ilSkillTreeNodeGUI().

{
global $ilCtrl;
$ilCtrl->saveParameter($this, "obj_id");
}

+ Here is the call graph for this function:

Member Function Documentation

static ilSkillCategoryGUI::addCreationButtons ( )
static

Add creation buttons.

Parameters
@return

Definition at line 270 of file class.ilSkillCategoryGUI.php.

References $_GET, $ilCtrl, and $lng.

Referenced by listItems(), and ilSkillRootGUI\listSkills().

{
global $ilCtrl, $lng, $ilToolbar, $ilUser;
// skill
$ilCtrl->setParameterByClass("ilbasicskillgui",
"obj_id", (int) $_GET["obj_id"]);
$ilToolbar->addButton($lng->txt("skmg_create_skll"),
$ilCtrl->getLinkTargetByClass("ilbasicskillgui", "create"));
// skill category
$ilCtrl->setParameterByClass("ilskillcategorygui",
"obj_id", (int) $_GET["obj_id"]);
$ilToolbar->addButton($lng->txt("skmg_create_skill_category"),
$ilCtrl->getLinkTargetByClass("ilskillcategorygui", "create"));
// skill template reference
$ilCtrl->setParameterByClass("ilskilltemplatereferencegui",
"obj_id", (int) $_GET["obj_id"]);
$ilToolbar->addButton($lng->txt("skmg_create_skill_template_reference"),
$ilCtrl->getLinkTargetByClass("ilskilltemplatereferencegui", "create"));
// skills from clipboard
$sep = false;
if ($ilUser->clipboardHasObjectsOfType("skll"))
{
$ilToolbar->addSeparator();
$sep = true;
$ilToolbar->addButton($lng->txt("skmg_insert_basic_skill_from_clip"),
$ilCtrl->getLinkTargetByClass("ilskillcategorygui", "insertBasicSkillClip"));
}
// skills from clipboard
if ($ilUser->clipboardHasObjectsOfType("scat"))
{
if (!$sep)
{
$ilToolbar->addSeparator();
$sep = true;
}
$ilToolbar->addButton($lng->txt("skmg_insert_skill_category_from_clip"),
$ilCtrl->getLinkTargetByClass("ilskillcategorygui", "insertSkillCategoryClip"));
}
// skills from clipboard
if ($ilUser->clipboardHasObjectsOfType("sktr"))
{
if (!$sep)
{
$ilToolbar->addSeparator();
$sep = true;
}
$ilToolbar->addButton($lng->txt("skmg_insert_skill_template_reference_from_clip"),
$ilCtrl->getLinkTargetByClass("ilskillcategorygui", "insertTemplateReferenceClip"));
}
}

+ Here is the caller graph for this function:

ilSkillCategoryGUI::cancel ( )

Cancel.

Parameters
@return

Definition at line 334 of file class.ilSkillCategoryGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjskillmanagementgui", "editSkills");
}
ilSkillCategoryGUI::edit ( )

Edit.

Definition at line 119 of file class.ilSkillCategoryGUI.php.

References $tpl, getValues(), and initForm().

{
global $tpl;
$this->initForm();
$this->getValues();
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilSkillCategoryGUI::editProperties ( )

Edit properties.

Reimplemented from ilSkillTreeNodeGUI.

Definition at line 96 of file class.ilSkillCategoryGUI.php.

References $tpl, and setTabs().

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

+ Here is the call graph for this function:

& ilSkillCategoryGUI::executeCommand ( )

Execute command.

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

References $cmd, $ilCtrl, $ret, and $tpl.

{
global $ilCtrl, $tpl, $ilTabs;
$tpl->getStandardTemplate();
$next_class = $ilCtrl->getNextClass($this);
$cmd = $ilCtrl->getCmd();
switch($next_class)
{
default:
$ret = $this->$cmd();
break;
}
}
ilSkillCategoryGUI::getType ( )

Get Node Type.

Definition at line 34 of file class.ilSkillCategoryGUI.php.

{
return "scat";
}
ilSkillCategoryGUI::getValues ( )

Get current values for from.

Definition at line 199 of file class.ilSkillCategoryGUI.php.

Referenced by edit().

{
$values = array();
$values["title"] = $this->node_object->getTitle();
$values["order_nr"] = $this->node_object->getOrderNr();
$values["self_eval"] = $this->node_object->getSelfEvaluation();
$values["draft"] = $this->node_object->getDraft();
echo "-".$this->node_object->getDraft()."-";
$this->form->setValuesByArray($values);
}

+ Here is the caller graph for this function:

ilSkillCategoryGUI::initForm (   $a_mode = "edit")

Init form.

Parameters
int$a_modeEdit Mode

Reimplemented from ilSkillTreeNodeGUI.

Definition at line 133 of file class.ilSkillCategoryGUI.php.

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

Referenced by edit().

{
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);
// draft
$cb = new ilCheckboxInputGUI($lng->txt("skmg_draft"), "draft");
$cb->setInfo($lng->txt("skmg_draft_info"));
$this->form->addItem($cb);
// 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_skill_category"));
}
else
{
$this->form->addCommandButton("update", $lng->txt("save"));
$this->form->setTitle($lng->txt("skmg_edit_scat"));
}
$ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSkillCategoryGUI::listItems ( )

Update form.

List items

Parameters
@return

Definition at line 250 of file class.ilSkillCategoryGUI.php.

References $_GET, $tpl, addCreationButtons(), ilSkillCatTableGUI\MODE_SCAT, and setTabs().

{
global $tpl;
$this->setTabs("content");
include_once("./Services/Skill//classes/class.ilSkillCatTableGUI.php");
$table = new ilSkillCatTableGUI($this, "listItems", (int) $_GET["obj_id"],
$tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

ilSkillCategoryGUI::proceedDragDrop ( )

Perform drag and drop action.

Definition at line 107 of file class.ilSkillCategoryGUI.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");
}
ilSkillCategoryGUI::redirectToParent ( )

Redirect to parent (identified by current obj_id)

Parameters
@return

Definition at line 347 of file class.ilSkillCategoryGUI.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:

ilSkillCategoryGUI::saveItem ( )

Save item.

Definition at line 184 of file class.ilSkillCategoryGUI.php.

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

{
include_once "Services/Skill/classes/class.ilSkillCategory.php";
$it = new ilSkillCategory();
$it->setTitle($this->form->getInput("title"));
$it->setOrderNr($this->form->getInput("order_nr"));
$it->setSelfEvaluation($_POST["self_eval"]);
$it->setDraft($_POST["draft"]);
$it->create();
}

+ Here is the call graph for this function:

ilSkillCategoryGUI::setTabs (   $a_tab)

output tabs

Definition at line 62 of file class.ilSkillCategoryGUI.php.

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

Referenced by editProperties(), and listItems().

{
global $ilTabs, $ilCtrl, $tpl, $lng;
$ilTabs->clearTargets();
// content
$ilTabs->addTab("content", $lng->txt("content"),
$ilCtrl->getLinkTarget($this, 'listItems'));
// properties
$ilTabs->addTab("properties", $lng->txt("settings"),
$ilCtrl->getLinkTarget($this, 'editProperties'));
// back link
$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"]);
$tpl->setTitle(
$lng->txt("scat").": ".$this->node_object->getTitle());
$ilTabs->activateTab($a_tab);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSkillCategoryGUI::updateItem ( )

Update item.

Definition at line 213 of file class.ilSkillCategoryGUI.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->setDraft($_POST["draft"]);
$this->node_object->update();
}

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