ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSkillTemplateReference Class Reference

Skill Template Reference. More...

+ Inheritance diagram for ilSkillTemplateReference:
+ Collaboration diagram for ilSkillTemplateReference:

Public Member Functions

 __construct ($a_id=0)
 Constructor public.
 setSkillTemplateId ($a_val)
 Set skill template id.
 getSkillTemplateId ()
 Get skill template id.
 read ()
 Read data from database.
 create ()
 Create skill template reference.
 update ()
 Update node.
 delete ()
 Delete skill.
 copy ()
 Copy basic skill template.
 _lookupTrefIdsForTopTemplateId ($a_template_id)
 Lookup tref ids for template id.
- Public Member Functions inherited from ilSkillTreeNode
 ilSkillTreeNode ($a_id=0)
 setTitle ($a_title)
 Set title.
 getTitle ()
 Get title.
 setType ($a_type)
 Set type.
 getType ()
 Get type.
 setId ($a_id)
 Set Node ID.
 getId ()
 Get Node ID.
 setSelfEvaluation ($a_val)
 Set self evaluation.
 getSelfEvaluation ()
 Get self evaluation.
 setOrderNr ($a_val)
 Set order nr.
 getOrderNr ()
 Get order nr.
 setDataRecord ($a_record)
 this method should only be called by class ilSCORM2004NodeFactory
 setStatus ($a_val)
 Set status.
 getStatus ()
 Get status.
 clipboardCut ($a_tree_id, $a_ids)
 Cut and copy a set of skills/skill categories into the clipboard.

Static Public Member Functions

static _lookupTemplateId ($a_obj_id)
 Lookup template ID.
static _lookupTrefIdsForTemplateId ($a_tid)
 Get all tref ids for a template id.
- Static Public Member Functions inherited from ilSkillTreeNode
static getAllStatus ()
 Get all status.
static getStatusInfo ($a_status)
 Get status info.
static _lookupTitle ($a_obj_id, $a_tref_id=0)
 Lookup Title.
static _lookupSelfEvaluation ($a_obj_id)
 Lookup self evaluation.
static _lookupStatus ($a_obj_id)
 Lookup Status.
static _lookupType ($a_obj_id)
 Lookup Type.
static _writeTitle ($a_obj_id, $a_title)
 Write Title.
static _writeOrderNr ($a_obj_id, $a_nr)
 Write Order Nr.
static putInTree ($a_obj, $a_parent_id="", $a_target_node_id="")
 Put this object into the skill tree.
static getTree ($a_slm_obj_id)
 Get scorm module editing tree.
static uniqueTypesCheck ($a_items)
 Check for unique types.
static clipboardCopy ($a_tree_id, $a_ids)
 Copy a set of skills/skill categories into the clipboard.
static insertItemsFromClip ($a_type, $a_obj_id)
 Insert basic skills from clipboard.
static clearClipboard ()
 Remove all skill items from clipboard.
static pasteTree ($a_item_id, $a_parent_id, $a_target, $a_insert_time, &$a_copied_nodes, $a_as_copy=false, $a_add_suffix=false)
 Paste item (tree) from clipboard to skill tree.
static isInTree ($a_id)
 Is id in tree?
static getAllSelfEvaluationNodes ()
 Get all self evaluation nodes.
static getTopTemplates ()
 Get top skill templates and template categories.
static getSelectableSkills ()
 Get selectable skills.
static saveChildsOrder ($a_par_id, $a_childs_order, $a_templates=false)
 Save childs order.
static getIconPath ($a_obj_id, $a_type, $a_size="", $a_status=0)
 Get icon path.

Data Fields

 $id
- Data Fields inherited from ilSkillTreeNode
const STATUS_PUBLISH = 0
const STATUS_DRAFT = 1
const STATUS_OUTDATED = 2
 $type
 $id
 $title

Additional Inherited Members

- Static Protected Member Functions inherited from ilSkillTreeNode
static _lookup ($a_obj_id, $a_field)
 Lookup Title.

Detailed Description

Skill Template Reference.

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

Definition at line 15 of file class.ilSkillTemplateReference.php.

Constructor & Destructor Documentation

ilSkillTemplateReference::__construct (   $a_id = 0)

Constructor public.

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

References ilSkillTreeNode\ilSkillTreeNode(), and ilSkillTreeNode\setType().

{
$this->setType("sktr");
}

+ Here is the call graph for this function:

Member Function Documentation

static ilSkillTemplateReference::_lookupTemplateId (   $a_obj_id)
static

Lookup template ID.

Parameters
intnode ID
Returns
string template ID

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

References $query.

Referenced by ilSkillTreeNode\_lookupTitle(), ilPersonalSkillsGUI\assignMaterials(), ilSurveySkillExplorer\buildTitle(), ilCOPageHTMLExport\collectPageElements(), ilObjSkillManagementGUI\deleteNodes(), ilSkillCatTableGUI\fillRow(), ilVirtualSkillTree\getChildsOfNode(), ilSkillTreeNode\getIconPath(), ilVirtualSkillTree\getNode(), ilSkillTreeExplorerGUI\getNodeContent(), ilSkillTemplateTreeExplorerGUI\getNodeContent(), ilPersonalSkillsGUI\getSkillHTML(), ilSkillTree\getSkillTreePath(), ilPersonalSkill\getUsageInfo(), ilPersonalSkillsGUI\selfEvaluation(), and ilSkillTemplateReferenceGUI\setTabs().

{
global $ilDB;
$query = "SELECT templ_id FROM skl_templ_ref WHERE skl_node_id = ".
$ilDB->quote($a_obj_id, "integer");
$obj_set = $ilDB->query($query);
$obj_rec = $ilDB->fetchAssoc($obj_set);
return $obj_rec["templ_id"];
}

+ Here is the caller graph for this function:

static ilSkillTemplateReference::_lookupTrefIdsForTemplateId (   $a_tid)
static

Get all tref ids for a template id.

Parameters
int$a_tidtemplate node id (node id in template tree)
Returns
array of ids

Definition at line 173 of file class.ilSkillTemplateReference.php.

References _lookupTrefIdsForTopTemplateId().

Referenced by ilObjSkillManagementGUI\deleteNodes().

{
include_once("./Services/Skill/classes/class.ilSkillTree.php");
$tree = new ilSkillTree();
$top_template_id = $tree->getTopParentNodeId($a_tid);
return self::_lookupTrefIdsForTopTemplateId($top_template_id);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSkillTemplateReference::_lookupTrefIdsForTopTemplateId (   $a_template_id)

Lookup tref ids for template id.

Parameters
$a_template_id(top) template node id
Returns
array array of integer tref ids

Definition at line 151 of file class.ilSkillTemplateReference.php.

Referenced by _lookupTrefIdsForTemplateId().

{
global $ilDB;
$set = $ilDB->query("SELECT * FROM skl_templ_ref ".
" WHERE templ_id = ".$ilDB->quote($a_template_id, "integer")
);
$trefs = array();
while ($rec = $ilDB->fetchAssoc($set))
{
$trefs[] = $rec["skl_node_id"];
}
return $trefs;
}

+ Here is the caller graph for this function:

ilSkillTemplateReference::copy ( )

Copy basic skill template.

Definition at line 114 of file class.ilSkillTemplateReference.php.

References ilSkillTreeNode\getOrderNr(), ilSkillTreeNode\getSelfEvaluation(), getSkillTemplateId(), ilSkillTreeNode\getTitle(), and ilSkillTreeNode\getType().

{
$sktr = new ilSkillTemplateReference();
$sktr->setTitle($this->getTitle());
$sktr->setType($this->getType());
$sktr->setSkillTemplateId($this->getSkillTemplateId());
$sktr->setSelfEvaluation($this->getSelfEvaluation());
$sktr->setOrderNr($this->getOrderNr());
$sktr->create();
return $sktr;
}

+ Here is the call graph for this function:

ilSkillTemplateReference::create ( )

Create skill template reference.

Reimplemented from ilSkillTreeNode.

Definition at line 68 of file class.ilSkillTemplateReference.php.

{
global $ilDB;
$ilDB->manipulate("INSERT INTO skl_templ_ref ".
"(skl_node_id, templ_id) VALUES (".
$ilDB->quote($this->getId(), "integer").",".
$ilDB->quote($this->getSkillTemplateId(), "integer").
")");
}
ilSkillTemplateReference::delete ( )

Delete skill.

Reimplemented from ilSkillTreeNode.

Definition at line 100 of file class.ilSkillTemplateReference.php.

{
global $ilDB;
$ilDB->manipulate("DELETE FROM skl_templ_ref WHERE "
." skl_node_id = ".$ilDB->quote($this->getId(), "integer")
);
}
ilSkillTemplateReference::getSkillTemplateId ( )

Get skill template id.

Returns
int skill template id

Definition at line 44 of file class.ilSkillTemplateReference.php.

Referenced by copy().

{
return $this->skill_template_id;
}

+ Here is the caller graph for this function:

ilSkillTemplateReference::read ( )

Read data from database.

Reimplemented from ilSkillTreeNode.

Definition at line 52 of file class.ilSkillTemplateReference.php.

References setSkillTemplateId().

{
global $ilDB;
$set = $ilDB->query("SELECT * FROM skl_templ_ref ".
" WHERE skl_node_id = ".$ilDB->quote($this->getId(), "integer")
);
$rec = $ilDB->fetchAssoc($set);
$this->setSkillTemplateId((int) $rec["templ_id"]);
}

+ Here is the call graph for this function:

ilSkillTemplateReference::setSkillTemplateId (   $a_val)

Set skill template id.

Parameters
int$a_valskill template id

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

Referenced by read().

{
$this->skill_template_id = $a_val;
}

+ Here is the caller graph for this function:

ilSkillTemplateReference::update ( )

Update node.

Reimplemented from ilSkillTreeNode.

Definition at line 84 of file class.ilSkillTemplateReference.php.

{
global $ilDB;
$ilDB->manipulate("UPDATE skl_templ_ref SET ".
" templ_id = ".$ilDB->quote($this->getSkillTemplateId(), "integer").
" WHERE skl_node_id = ".$ilDB->quote($this->getId(), "integer")
);
}

Field Documentation

ilSkillTemplateReference::$id

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


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