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

Skill template reference GUI class. More...

+ Inheritance diagram for ilSkillTemplateReferenceGUI:
+ Collaboration diagram for ilSkillTemplateReferenceGUI:

Public Member Functions

 __construct ($a_tref_id=0)
 Constructor.
 getType ()
 Get Node Type.
executeCommand ()
 Execute command.
 setTabs ($a_tab)
 output tabs
 insert ()
 Insert.
 editProperties ()
 Edit properties.
 initForm ($a_mode="edit")
 Init form.
 getValues ()
 Get current values for from.
 saveItem ()
 Save item.
 afterSave ()
 After saving.
 updateSkillTemplateReference ()
 Update form.
 cancel ()
 Cancel.
 listItems ()
 List items.
- Public Member Functions inherited from ilBasicSkillTemplateGUI
 __construct ($a_node_id=0, $a_tref_id=0)
 Constructor.
 setLevelHead ()
 Set header for level.
 edit ()
 Edit skill.
- Public Member Functions inherited from ilBasicSkillGUI
 showProperties ()
 Show properties.
 proceedDragDrop ()
 Perform drag and drop action.
 updateItem ()
 Update item.
 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.
 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.

Additional Inherited Members

- Data Fields inherited from ilSkillTreeNodeGUI
 $node_object
- Protected Attributes inherited from ilBasicSkillGUI
 $tref_id = 0
 $base_skill_id

Detailed Description

Skill template reference GUI class.

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

ilSkillTemplateReferenceGUI: ilObjSkillManagementGUI

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

Constructor & Destructor Documentation

ilSkillTemplateReferenceGUI::__construct (   $a_tref_id = 0)

Constructor.

Reimplemented from ilBasicSkillGUI.

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

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->saveParameter($this, "obj_id");
$ilCtrl->saveParameter($this, "tref_id");
parent::__construct($a_tref_id);
$this->tref_id = $a_tref_id;
if (is_object($this->node_object))
{
$this->base_skill_id = $this->node_object->getSkillTemplateId();
}
}

Member Function Documentation

ilSkillTemplateReferenceGUI::afterSave ( )

After saving.

Reimplemented from ilBasicSkillTemplateGUI.

Definition at line 259 of file class.ilSkillTemplateReferenceGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "tref_id",
$this->node_object->getId());
$ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "obj_id",
$this->node_object->getSkillTemplateId());
$ilCtrl->redirectByClass("ilskilltemplatereferencegui", "listItems");
}
ilSkillTemplateReferenceGUI::cancel ( )

Cancel.

Parameters
@return

Definition at line 302 of file class.ilSkillTemplateReferenceGUI.php.

References $ilCtrl.

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

Edit properties.

Reimplemented from ilBasicSkillGUI.

Definition at line 142 of file class.ilSkillTemplateReferenceGUI.php.

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

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

+ Here is the call graph for this function:

& ilSkillTemplateReferenceGUI::executeCommand ( )

Execute command.

Reimplemented from ilBasicSkillGUI.

Definition at line 49 of file class.ilSkillTemplateReferenceGUI.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;
}
}
ilSkillTemplateReferenceGUI::getType ( )

Get Node Type.

Reimplemented from ilBasicSkillTemplateGUI.

Definition at line 41 of file class.ilSkillTemplateReferenceGUI.php.

{
return "sktr";
}
ilSkillTemplateReferenceGUI::getValues ( )

Get current values for from.

Definition at line 229 of file class.ilSkillTemplateReferenceGUI.php.

Referenced by editProperties().

{
$values = array();
$values["skill_template_id"] = $this->node_object->getSkillTemplateId();
$values["title"] = $this->node_object->getTitle();
$values["selectable"] = $this->node_object->getSelfEvaluation();
$values["status"] = $this->node_object->getStatus();
$values["order_nr"] = $this->node_object->getOrderNr();
$this->form->setValuesByArray($values);
}

+ Here is the caller graph for this function:

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

Init form.

Parameters
int$a_modeEdit Mode

Reimplemented from ilBasicSkillTemplateGUI.

Definition at line 158 of file class.ilSkillTemplateReferenceGUI.php.

References $ilCtrl, $lng, $options, $si, ilSkillTreeNodeGUI\addStatusInput(), ilSkillTreeNode\getTopTemplates(), ilFormPropertyGUI\setInfo(), ilNumberInputGUI\setMaxLength(), ilFormPropertyGUI\setRequired(), and ilNonEditableValueGUI\setValue().

Referenced by editProperties(), insert(), and updateSkillTemplateReference().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// select skill template
include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
// title
$ti = new ilTextInputGUI($lng->txt("title"), "title");
$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);
// template
$options = array(
"" => $lng->txt("please_select"),
);
foreach ($tmplts as $tmplt)
{
$options[$tmplt["child"]] = $tmplt["title"];
}
if ($a_mode != "edit")
{
$si = new ilSelectInputGUI($lng->txt("skmg_skill_template"), "skill_template_id");
$si->setOptions($options);
$si->setRequired(true);
$this->form->addItem($si);
}
else
{
$ne = new ilNonEditableValueGUI($lng->txt("skmg_skill_template"), "");
$ne->setValue($options[$this->node_object->getSkillTemplateId()]);
$this->form->addItem($ne);
}
// status
$this->addStatusInput($this->form);
// selectable
$cb = new ilCheckboxInputGUI($lng->txt("skmg_selectable"), "selectable");
$cb->setInfo($lng->txt("skmg_selectable_info"));
$this->form->addItem($cb);
if ($a_mode == "create")
{
$this->form->addCommandButton("save", $lng->txt("save"));
$this->form->addCommandButton("cancel", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("skmg_new_sktr"));
}
else
{
$this->form->addCommandButton("updateSkillTemplateReference", $lng->txt("save"));
$this->form->setTitle($lng->txt("skmg_edit_sktr"));
}
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSkillTemplateReferenceGUI::insert ( )

Insert.

Parameters
@return

Definition at line 128 of file class.ilSkillTemplateReferenceGUI.php.

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

{
global $ilCtrl, $tpl;
$ilCtrl->saveParameter($this, "parent_id");
$ilCtrl->saveParameter($this, "target");
$this->initForm("create");
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilSkillTemplateReferenceGUI::listItems ( )

List items.

Definition at line 312 of file class.ilSkillTemplateReferenceGUI.php.

References $tpl, ilSkillTreeNode\_lookupType(), ilSkillCatTableGUI\MODE_SCTP, and setTabs().

{
global $tpl;
$this->setTabs("content");
$sk_id = $this->node_object->getSkillTemplateId();
$obj_type = ilSkillTreeNode::_lookupType($sk_id);
if ($obj_type == "sctp")
{
include_once("./Services/Skill/classes/class.ilSkillCatTableGUI.php");
$table = new ilSkillCatTableGUI($this, "listItems", (int) $sk_id,
ilSkillCatTableGUI::MODE_SCTP, $this->node_object->getId());
$tpl->setContent($table->getHTML());
}
else if ($obj_type == "sktp")
{
include_once("./Services/Skill/classes/class.ilSkillLevelTableGUI.php");
$table = new ilSkillLevelTableGUI((int) $sk_id, $this, "edit", $this->node_object->getId());
$tpl->setContent($table->getHTML());
}
}

+ Here is the call graph for this function:

ilSkillTemplateReferenceGUI::saveItem ( )

Save item.

Reimplemented from ilBasicSkillTemplateGUI.

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

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

{
$sktr = new ilSkillTemplateReference();
$sktr->setTitle($_POST["title"]);
$sktr->setSkillTemplateId($_POST["skill_template_id"]);
$sktr->setSelfEvaluation($_POST["selectable"]);
$sktr->setOrderNr($_POST["order_nr"]);
$sktr->setStatus($_POST["status"]);
$sktr->create();
ilSkillTreeNode::putInTree($sktr, (int) $_GET["obj_id"], IL_LAST_NODE);
$this->node_object = $sktr;
}

+ Here is the call graph for this function:

ilSkillTemplateReferenceGUI::setTabs (   $a_tab)

output tabs

Reimplemented from ilBasicSkillTemplateGUI.

Definition at line 69 of file class.ilSkillTemplateReferenceGUI.php.

References $ilCtrl, $lng, $tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTreeNode\_lookupType(), ilSkillTreeNodeGUI\addUsageTab(), ilSkillTreeNodeGUI\setSkillNodeDescription(), and ilSkillTreeNodeGUI\setTitleIcon().

Referenced by editProperties(), and listItems().

{
global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
$ilTabs->clearTargets();
$ilHelp->setScreenIdComponent("skmg_sktr");
if (is_object($this->node_object))
{
$sk_id = $this->node_object->getSkillTemplateId();
$obj_type = ilSkillTreeNode::_lookupType($sk_id);
if ($obj_type == "sctp")
{
// content
$ilTabs->addTab("content", $lng->txt("content"),
$ilCtrl->getLinkTarget($this, 'listItems'));
}
else
{
// content
$ilTabs->addTab("content", $lng->txt("skmg_skill_levels"),
$ilCtrl->getLinkTarget($this, 'listItems'));
}
// properties
$ilTabs->addTab("properties", $lng->txt("settings"),
$ilCtrl->getLinkTarget($this, 'editProperties'));
// usage
$this->addUsageTab($ilTabs);
// 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"]);*/
$tid = ilSkillTemplateReference::_lookupTemplateId($this->node_object->getId());
$add = " (".ilSkillTreeNode::_lookupTitle($tid).")";
$tpl->setTitle(
$lng->txt("skmg_sktr").": ".$this->node_object->getTitle().$add);
$ilTabs->activateTab($a_tab);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSkillTemplateReferenceGUI::updateSkillTemplateReference ( )

Update form.

Definition at line 273 of file class.ilSkillTemplateReferenceGUI.php.

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

{
global $lng, $ilCtrl, $tpl;
$this->initForm("edit");
if ($this->form->checkInput())
{
// perform update
// $this->node_object->setSkillTemplateId($_POST["skill_template_id"]);
$this->node_object->setTitle($_POST["title"]);
$this->node_object->setSelfEvaluation($_POST["selectable"]);
$this->node_object->setOrderNr($_POST["order_nr"]);
$this->node_object->setStatus($_POST["status"]);
$this->node_object->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "editProperties");
}
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHtml());
}

+ Here is the call graph for this function:


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