ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSkillRoot 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 ilSkillRoot:
+ Collaboration diagram for ilSkillRoot:

Public Member Functions

 __construct (int $a_id=0)
 
 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 root node

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.ilSkillRoot.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillRoot::__construct ( int  $a_id = 0)

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

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

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

Member Function Documentation

◆ delete()

ilSkillRoot::delete ( )

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

References ilSkillTreeNode\getId().

33  : void
34  {
35  $skrt_id = $this->getId();
36  $skill_tree = $this->skill_service->internal()->repo()->getTreeRepo()->getTreeForNodeId($skrt_id);
37  $childs = $skill_tree->getChildsByTypeFilter(
38  $skrt_id,
39  ["skll", "scat", "sktp", "sctp", "sktr"]
40  );
41  foreach ($childs as $node) {
42  switch ($node["type"]) {
43  case "skll":
44  $obj = new ilBasicSkill((int) $node["obj_id"]);
45  $obj->delete();
46  break;
47 
48  case "scat":
49  $obj = new ilSkillCategory((int) $node["obj_id"]);
50  $obj->delete();
51  break;
52 
53  case "sktp":
54  $obj = new ilBasicSkillTemplate((int) $node["obj_id"]);
55  $obj->delete();
56  break;
57 
58  case "sctp":
59  $obj = new ilSkillTemplateCategory((int) $node["obj_id"]);
60  $obj->delete();
61  break;
62 
63  case "sktr":
64  $obj = new ilSkillTemplateReference((int) $node["obj_id"]);
65  $obj->delete();
66  break;
67  }
68  }
69 
70  parent::delete();
71  }
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...
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: