ILIAS  release_4-3 Revision
 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_node_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.
 updateSkillTemplateReference ()
 Update form.
 cancel ()
 Cancel.
 listItems ()
 List items.
- 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.

Additional Inherited Members

- Data Fields inherited from ilSkillTreeNodeGUI
 $node_object

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_node_id = 0)

Constructor.

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

References $ilCtrl, and ilSkillTreeNodeGUI\ilSkillTreeNodeGUI().

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

+ Here is the call graph for this function:

Member Function Documentation

ilSkillTemplateReferenceGUI::cancel ( )

Cancel.

Parameters
@return

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

References $ilCtrl.

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

Edit properties.

Reimplemented from ilSkillTreeNodeGUI.

Definition at line 118 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.

Definition at line 42 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.

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

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

Get current values for from.

Definition at line 197 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["draft"] = $this->node_object->getDraft();
$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 ilSkillTreeNodeGUI.

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

References $ilCtrl, $lng, $si, ilSkillTreeNode\getTopTemplates(), ilFormPropertyGUI\setInfo(), and ilNumberInputGUI\setMaxLength().

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");
$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"];
}
$si = new ilSelectInputGUI($lng->txt("skmg_skill_template"), "skill_template_id");
$si->setOptions($options);
$si->setRequired(true);
$this->form->addItem($si);
// 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"), "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 104 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 265 of file class.ilSkillTemplateReferenceGUI.php.

References $_GET, $tpl, ilSkillTreeNode\_lookupTitle(), ilSkillTreeNode\getSkillTreeNodes(), and setTabs().

{
global $tpl;
$this->setTabs("content");
include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
$bs = ilSkillTreeNode::getSkillTreeNodes((int) $_GET["obj_id"], false);
include_once("./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
$ns = new ilNestedList();
$ns->setListClass("il_Explorer");
foreach ($bs as $b)
{
$par = ($b["id"] == (int) $_GET["obj_id"])
? 0
: $b["parent"];
$ns->addListNode(ilSkillTreeNode::_lookupTitle($b["id"]), $b["id"], $par);
}
$tpl->setContent($ns->getHTML());
}

+ Here is the call graph for this function:

ilSkillTemplateReferenceGUI::saveItem ( )

Save item.

Definition at line 211 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->setDraft($_POST["draft"]);
$sktr->create();
ilSkillTreeNode::putInTree($sktr, (int) $_GET["obj_id"], IL_LAST_NODE);
}

+ Here is the call graph for this function:

ilSkillTemplateReferenceGUI::setTabs (   $a_tab)

output tabs

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

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

Referenced by editProperties(), and listItems().

{
global $ilTabs, $ilCtrl, $tpl, $lng;
$ilTabs->clearTargets();
if (is_object($this->node_object))
{
// 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"]);
$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 226 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->setDraft($_POST["draft"]);
$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: