ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSkillCategory Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilSkillCategory:
+ Collaboration diagram for ilSkillCategory:

Public Member Functions

 __construct (int $a_id=0)
 
 copy ()
 
 delete ()
 
- Public Member Functions inherited from ilSkillTreeNode
 __construct (int $a_id=0)
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setDescription (string $a_description)
 
 getDescription ()
 
 setType (string $a_type)
 
 getType ()
 
 setId (int $a_id)
 
 getId ()
 
 setSelfEvaluation (bool $a_val)
 
 getSelfEvaluation ()
 
 setOrderNr (int $a_val)
 
 getOrderNr ()
 
 setImportId (string $a_val)
 
 getImportId ()
 
 getCreationDate ()
 
 read ()
 Read Data of Node. More...
 
 setDataRecord (array $a_record)
 this method should only be called by class ilSCORM2004NodeFactory More...
 
 setStatus (int $a_val)
 
 getStatus ()
 
 create ()
 Create Node. More...
 
 update ()
 Update Node. More...
 
 delete ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilSkillTreeNode
static getAllStatus ()
 Get all status as array, key is value, value is lang text. More...
 
static getStatusInfo (int $a_status)
 
static _lookupTitle (int $a_obj_id, int $a_tref_id=0)
 
static _lookupDescription (int $a_obj_id)
 
static _lookupSelfEvaluation (int $a_obj_id)
 
static _lookupStatus (int $a_obj_id)
 
static _lookupType (int $a_obj_id)
 
static _writeTitle (int $a_obj_id, string $a_title)
 
static _writeDescription (int $a_obj_id, string $a_description)
 
static _writeOrderNr (int $a_obj_id, int $a_nr)
 
static uniqueTypesCheck (array $a_items)
 Check for unique types. More...
 
static getAllSelfEvaluationNodes ()
 
static getSelectableSkills ()
 
static getIconPath (int $a_obj_id, string $a_type, string $a_size="", int $a_status=0)
 
static getAllCSkillIdsForNodeIds (array $a_node_ids)
 Get all possible common skill IDs for node IDs. More...
 
- Data Fields inherited from ilSkillTreeNode
const STATUS_PUBLISH = 0
 
const STATUS_DRAFT = 1
 
const STATUS_OUTDATED = 2
 
- Protected Member Functions inherited from ilSkillTreeNode
 setCreationDate (string $a_val)
 
- Static Protected Member Functions inherited from ilSkillTreeNode
static _lookup (int $a_obj_id, string $a_field)
 
- Protected Attributes inherited from ilSkillTreeNode
ilDBInterface $db
 
ILIAS Skill Service SkillService $skill_service
 
string $type = ""
 
int $id = 0
 
string $title = ""
 
string $description = ""
 
bool $self_eval = false
 
int $order_nr = 0
 
string $import_id = ""
 
string $creation_date = ""
 
int $status = 0
 
array $data_record = []
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Skill Category

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

Definition at line 25 of file class.ilSkillCategory.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillCategory::__construct ( int  $a_id = 0)

Definition at line 27 of file class.ilSkillCategory.php.

References ILIAS\GlobalScreen\Provider\__construct(), and ilSkillTreeNode\setType().

28  {
29  parent::__construct($a_id);
30  $this->setType("scat");
31  }
setType(string $a_type)
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ copy()

ilSkillCategory::copy ( )

Definition at line 33 of file class.ilSkillCategory.php.

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

34  {
35  $scat = new ilSkillCategory();
36  $scat->setTitle($this->getTitle());
37  $scat->setDescription($this->getDescription());
38  $scat->setType($this->getType());
39  $scat->setSelfEvaluation($this->getSelfEvaluation());
40  $scat->setOrderNr($this->getOrderNr());
41  $scat->create();
42 
43  return $scat;
44  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ delete()

ilSkillCategory::delete ( )

Definition at line 46 of file class.ilSkillCategory.php.

References ilSkillTreeNode\getId().

46  : void
47  {
48  $scat_id = $this->getId();
49  $skill_tree = $this->skill_service->internal()->repo()->getTreeRepo()->getTreeForNodeId($scat_id);
50  $childs = $skill_tree->getChildsByTypeFilter(
51  $scat_id,
52  ["skll", "scat", "sktr"]
53  );
54  foreach ($childs as $node) {
55  switch ($node["type"]) {
56  case "skll":
57  $obj = new ilBasicSkill((int) $node["obj_id"]);
58  $obj->delete();
59  break;
60 
61  case "scat":
62  $obj = new ilSkillCategory((int) $node["obj_id"]);
63  $obj->delete();
64  break;
65 
66  case "sktr":
67  $obj = new ilSkillTemplateReference((int) $node["obj_id"]);
68  $obj->delete();
69  break;
70  }
71  }
72 
73  parent::delete();
74  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

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