ILIAS  release_4-3 Revision
 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.
- 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
 setDraft ($a_val)
 Set draft.
 getDraft ()
 Get draft.
 clipboardCut ($a_tree_id, $a_ids)
 Cut and copy a set of skills/skill categories into the clipboard.
 getIconPath ($a_obj_id, $a_type, $a_size="", $a_draft=false)
 Get icon path.

Static Public Member Functions

static _lookupTemplateId ($a_obj_id)
 Lookup template ID.
- Static Public Member Functions inherited from ilSkillTreeNode
static _lookupTitle ($a_obj_id)
 Lookup Title.
static _lookupSelfEvaluation ($a_obj_id)
 Lookup self evaluation.
static _lookupDraft ($a_obj_id)
 Lookup Draft.
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 getSkillTreeNodes ($a_node_id, $a_only_basic=false)
 Get basic skills under node.
static saveChildsOrder ($a_par_id, $a_childs_order, $a_templates=false)
 Save childs order.

Data Fields

 $id
- Data Fields inherited from ilSkillTreeNode
 $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 ilPersonalSkillExplorer\buildTitle(), ilSkillExplorer\buildTitle(), ilSkillTreeNode\getIconPath(), ilSkillTree\getSkillTreePath(), 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:

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: