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

Basic skill template GUI class. More...

+ Inheritance diagram for ilBasicSkillTemplateGUI:
+ Collaboration diagram for ilBasicSkillTemplateGUI:

Public Member Functions

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

Basic skill template GUI class.

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

Definition at line 17 of file class.ilBasicSkillTemplateGUI.php.

Constructor & Destructor Documentation

ilBasicSkillTemplateGUI::__construct (   $a_node_id = 0,
  $a_tref_id = 0 
)

Constructor.

Definition at line 23 of file class.ilBasicSkillTemplateGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$this->tref_id = $a_tref_id;
$ilCtrl->saveParameter($this, array("obj_id", "level_id"));
parent::__construct($a_node_id);
}

Member Function Documentation

ilBasicSkillTemplateGUI::afterSave ( )

After saving.

Reimplemented from ilBasicSkillGUI.

Reimplemented in ilSkillTemplateReferenceGUI.

Definition at line 232 of file class.ilBasicSkillTemplateGUI.php.

References $ilCtrl.

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

Edit skill.

Parameters
@return

Reimplemented from ilBasicSkillGUI.

Definition at line 247 of file class.ilBasicSkillTemplateGUI.php.

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

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

+ Here is the call graph for this function:

ilBasicSkillTemplateGUI::getType ( )

Get Node Type.

Reimplemented from ilBasicSkillGUI.

Reimplemented in ilSkillTemplateReferenceGUI.

Definition at line 37 of file class.ilBasicSkillTemplateGUI.php.

{
return "sktp";
}
ilBasicSkillTemplateGUI::initForm (   $a_mode = "edit")

Init form.

Parameters
string$a_modeedit mode

Reimplemented from ilBasicSkillGUI.

Reimplemented in ilSkillTemplateReferenceGUI.

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

References $_GET, $ilCtrl, $lng, 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);
// 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:

ilBasicSkillTemplateGUI::saveItem ( )

Save item.

Reimplemented from ilBasicSkillGUI.

Reimplemented in ilSkillTemplateReferenceGUI.

Definition at line 219 of file class.ilBasicSkillTemplateGUI.php.

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

{
$it = new ilBasicSkillTemplate();
$it->setTitle($this->form->getInput("title"));
$it->setOrderNr($this->form->getInput("order_nr"));
$it->create();
$this->node_object = $it;
}

+ Here is the call graph for this function:

ilBasicSkillTemplateGUI::setLevelHead ( )

Set header for level.

Reimplemented from ilBasicSkillGUI.

Definition at line 88 of file class.ilBasicSkillTemplateGUI.php.

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

{
global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
// tabs
$ilTabs->clearTargets();
$ilHelp->setScreenIdComponent("skmg_lev");
$ilTabs->setBackTarget($lng->txt("skmg_skill_levels"),
$ilCtrl->getLinkTarget($this, "edit"));
if ($_GET["level_id"] > 0)
{
if ($this->tref_id == 0)
{
$ilTabs->addTab("level_settings",
$lng->txt("settings"),
$ilCtrl->getLinkTarget($this, "editLevel"));
}
else
{
$ilTabs->addTab("level_resources",
$lng->txt("skmg_resources"),
$ilCtrl->getLinkTarget($this, "showLevelResources"));
}
/* $ilTabs->addTab("level_trigger",
$lng->txt("skmg_trigger"),
$ilCtrl->getLinkTarget($this, "editLevelTrigger"));
$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);
$tpl->setTitleIcon(
0, "sktp", "", false));
}

+ Here is the call graph for this function:

ilBasicSkillTemplateGUI::setTabs (   $a_tab)

Set header for skill.

Parameters
@return

Reimplemented from ilBasicSkillGUI.

Reimplemented in ilSkillTemplateReferenceGUI.

Definition at line 159 of file class.ilBasicSkillTemplateGUI.php.

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

Referenced by edit().

{
global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
$ilTabs->clearTargets();
$ilHelp->setScreenIdComponent("skmg_sktp");
if ($this->tref_id == 0)
{
$ilTabs->setBackTarget($lng->txt("skmg_skill_templates"),
$ilCtrl->getLinkTargetByClass("ilobjskillmanagementgui", "editSkillTemplates"));
}
if (is_object($this->node_object))
{
if ($this->tref_id == 0)
{
$tpl->setTitle($lng->txt("skmg_skill_template").": ".
$this->node_object->getTitle());
}
else
{
$tpl->setTitle(
$this->node_object->getTitle());
}
// levels
$ilTabs->addTab("levels", $lng->txt("skmg_skill_levels"),
$ilCtrl->getLinkTarget($this, 'edit'));
if ($this->tref_id > 0)
{
// usage
$this->addUsageTab($ilTabs);
}
// properties
if ($this->tref_id == 0)
{
$ilTabs->addTab("properties", $lng->txt("settings"),
$ilCtrl->getLinkTarget($this, 'editProperties'));
}
$ilTabs->activateTab($a_tab);
}
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:


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