ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilSkillDataSet Class Reference

Skill Data set class. More...

+ Inheritance diagram for ilSkillDataSet:
+ Collaboration diagram for ilSkillDataSet:

Public Member Functions

 __construct ()
 Constructor. More...
 
 setMode ($a_val)
 Set mode. More...
 
 getMode ()
 Get mode. More...
 
 setSelectedNodes ($a_val)
 Set export selected nodes. More...
 
 getSelectedNodes ()
 Get export selected nodes. More...
 
 setSelectedProfiles ($a_val)
 Set selected profiles. More...
 
 getSelectedProfiles ()
 Get selected profiles. More...
 
 getSupportedVersions ()
 Get supported versions. More...
 
 getXmlNamespace ($a_entity, $a_schema_version)
 Get xml namespace. More...
 
 readData ($a_entity, $a_version, $a_ids, $a_field="")
 Read data. More...
 
 importRecord ($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
 Import record. More...
 
- Public Member Functions inherited from ilDataSet
 __construct ()
 Constructor. More...
 
 init ($a_entity, $a_schema_version)
 Init. More...
 
 getSupportedVersions ()
 Get supported version. More...
 
 readData ($a_entity, $a_version, $a_ids)
 Read data from DB. More...
 
 setExportDirectories ($a_relative, $a_absolute)
 Set export directories. More...
 
 setImportDirectory ($a_val)
 Set import directory. More...
 
 getImportDirectory ()
 Get import directory. More...
 
 setDSPrefix ($a_val)
 Set XML dataset namespace prefix. More...
 
 getDSPrefix ()
 Get XML dataset namespace prefix. More...
 
 getDSPrefixString ()
 
 getDirectDataFromQuery ($a_query, $a_convert_to_leading_upper=true, $a_set=true)
 Get data from query.This is a standard procedure, all db field names are directly mapped to abstract fields. More...
 
 convertToLeadingUpper ($a_str)
 Make xyz_abc a XyzAbc string. More...
 
 getJsonRepresentation ()
 Get json representation. More...
 
 getXmlRepresentation ( $a_entity, $a_schema_version, $a_ids, $a_field="", $a_omit_header=false, $a_omit_types=false)
 Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text"> <ftype name="field_2" type="date"> <ftype name="field_3" type="integer"> </types> <types ...> ... More...
 
 addRecordsXml ($a_writer, $a_prefixes, $a_entity, $a_schema_version, $a_ids, $a_field="")
 Add records xml. More...
 
 afterXmlRecordWriting ($a_entity, $a_version, $a_set)
 After xml record writing hook record. More...
 
 getNamespaces (&$namespaces, $a_entity, $a_schema_version)
 Get xml namespaces. More...
 
 getXmlRecord ($a_entity, $a_version, $a_set)
 Get xml record for version. More...
 
 getJsonRecord ($a_set)
 Get json record for version. More...
 
 getXmlTypes ($a_entity, $a_version)
 Get xml types. More...
 
 getJsonTypes ($a_entity, $a_version)
 Get json types. More...
 
 getXMLEntityName ($a_entity, $a_version)
 Get entity name for xml (may be overwritten) More...
 
 getXMLEntityTag ($a_entity, $a_schema_version)
 Get entity tag. More...
 
 getJsonEntityName ($a_entity, $a_version)
 Get entity name for json (may be overwritten) More...
 
 setImport ($a_val)
 Set import object. More...
 
 getImport ()
 Get import object. More...
 
 setCurrentInstallationId ($a_val)
 Set current installation id. More...
 
 getCurrentInstallationId ()
 Get current installation id. More...
 

Data Fields

const MODE_SKILLS = ""
 
const MODE_PROFILES = "prof"
 
- Data Fields inherited from ilDataSet
 $dircnt
 
const EXPORT_NO_INST_ID = 1
 
const EXPORT_ID_ILIAS_LOCAL = 2
 
const EXPORT_ID_ILIAS_LOCAL_INVALID = 3
 
const EXPORT_ID_ILIAS_REMOTE = 4
 
const EXPORT_ID_ILIAS_REMOTE_INVALID = 5
 
const EXPORT_ID = 6
 
const EXPORT_ID_INVALID = 7
 

Protected Member Functions

 getTypes ($a_entity, $a_version)
 Get field types for entity. More...
 
 getDependencies ($a_entity, $a_version, $a_rec, $a_ids)
 Determine the dependent sets of data. More...
 
- Protected Member Functions inherited from ilDataSet
 getTypes ($a_entity, $a_version)
 Get (abstract) types for (abstract) field names. More...
 
 getXmlNamespace ($a_entity, $a_schema_version)
 Get xml namespace. More...
 
 createObjectExportId ($a_type, $a_id)
 Build ilias export id. More...
 
 parseObjectExportId ($a_id, $a_fallback_id=null)
 Parse export id. More...
 

Protected Attributes

 $skill_tree
 
 $init_order_nr
 
 $selected_nodes = false
 
 $selected_profiles = false
 
 $mode = ""
 
- Protected Attributes inherited from ilDataSet
 $current_installation_id = ""
 
 $db
 
 $ds_log
 

Detailed Description

Skill Data set class.

This class implements the following entities:

  • skmg: Skill management top entity (no data, only dependecies)
  • skl_subtree: Skill subtree (includes data of skl_tree, skl_tree_node and skl_templ_ref)
  • skl_templ_subtree: Skill template subtree (includes data of skl_tree and skl_tree_node)
  • skl_level: Skill levels
  • skl_prof: skill profiles (different mode)
Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 20 of file class.ilSkillDataSet.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillDataSet::__construct ( )

Constructor.

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

References $DIC.

38  {
39  global $DIC;
40 
41  $this->db = $DIC->database();
42  parent::__construct();
43  include_once("./Services/Skill/classes/class.ilSkillTree.php");
44  $this->skill_tree = new ilSkillTree();
45  $this->skill_tree_root_id = $this->skill_tree->readRootId();
46 
47  $this->init_top_order_nr = $this->skill_tree->getMaxOrderNr($this->skill_tree_root_id);
48  $this->init_templ_top_order_nr = $this->skill_tree->getMaxOrderNr($this->skill_tree_root_id, true);
49  }
global $DIC
Definition: saml.php:7
Skill tree.

Member Function Documentation

◆ getDependencies()

ilSkillDataSet::getDependencies (   $a_entity,
  $a_version,
  $a_rec,
  $a_ids 
)
protected

Determine the dependent sets of data.

Definition at line 346 of file class.ilSkillDataSet.php.

References ilDataSet\$db, $id, $ilDB, $n, $s, ilSkillTreeNode\_lookupType(), array, getMode(), getSelectedNodes(), and getSelectedProfiles().

347  {
348  $ilDB = $this->db;
349 
350  include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
351 
352  switch ($a_entity) {
353  case "skmg":
354 
355  if ($this->getMode() == self::MODE_SKILLS) {
356  // determine top nodes of main tree to be exported and all referenced template nodes
357  $sel_nodes = $this->getSelectedNodes();
358  $exp_types = array("skll", "scat", "sctr", "sktr");
359  if (!is_array($sel_nodes)) {
360  $childs = $this->skill_tree->getChildsByTypeFilter($this->skill_tree->readRootId(), $exp_types);
361  $deps = array();
362  $skl_subtree_deps = array();
363  foreach ($childs as $c) {
364  $skl_subtree_deps[] = $c["child"];
365  }
366  } else {
367  foreach ($sel_nodes as $n) {
368  if (in_array(ilSkillTreeNode::_lookupType((int) $n), $exp_types)) {
369  $skl_subtree_deps[] = $n;
370  }
371  }
372  }
373 
374  // determine template subtrees
375  $ref_nodes = array();
376  if (is_array($skl_subtree_deps)) {
377  foreach ($skl_subtree_deps as $id) {
378  if (ilSkillTreeNode::_lookupType($id) == "sktr") {
379  $ref_nodes[$id] = $id;
380  } else {
381  $sub = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($id), true, "sktr");
382  foreach ($sub as $s) {
383  $ref_nodes[$s["child"]] = $s["child"];
384  }
385  }
386  }
387  }
388 
389  $set = $ilDB->query("SELECT DISTINCT(templ_id) FROM skl_templ_ref " .
390  " WHERE " . $ilDB->in("skl_node_id", $ref_nodes, false, "integer"));
391  while ($rec = $ilDB->fetchAssoc($set)) {
392  $deps["skl_templ_subtree"]["ids"][] = $rec["templ_id"];
393  }
394 
395  // export subtree after templates
396  $deps["skl_subtree"]["ids"] = $skl_subtree_deps;
397  } elseif ($this->getMode() == self::MODE_PROFILES) {
398  foreach ($this->getSelectedProfiles() as $p_id) {
399  $deps["skl_prof"]["ids"][] = $p_id;
400  }
401  }
402 
403  return $deps;
404 
405  case "skl_subtree":
406  case "skl_templ_subtree":
407  $deps = array();
408  if (in_array($a_rec["Type"], array("skll", "sktp"))) {
409  $deps["skl_level"]["ids"][] = $a_rec["Child"];
410  }
411  return $deps;
412 
413  case "skl_prof":
414  $deps["skl_prof_level"]["ids"][] = $a_rec["Id"];
415  return $deps;
416  }
417 
418  return false;
419  }
getSelectedNodes()
Get export selected nodes.
if(!array_key_exists('StateId', $_REQUEST)) $id
$s
Definition: pwgen.php:45
static _lookupType($a_obj_id)
Lookup Type.
$n
Definition: RandomTest.php:85
Create styles array
The data for the language used.
getSelectedProfiles()
Get selected profiles.
global $ilDB
+ Here is the call graph for this function:

◆ getMode()

ilSkillDataSet::getMode ( )

Get mode.

Returns
string mode

Definition at line 66 of file class.ilSkillDataSet.php.

References $mode.

Referenced by getDependencies(), and readData().

67  {
68  return $this->mode;
69  }
+ Here is the caller graph for this function:

◆ getSelectedNodes()

ilSkillDataSet::getSelectedNodes ( )

Get export selected nodes.

Returns
array array of int

Definition at line 86 of file class.ilSkillDataSet.php.

References $selected_nodes.

Referenced by getDependencies().

87  {
88  return $this->selected_nodes;
89  }
+ Here is the caller graph for this function:

◆ getSelectedProfiles()

ilSkillDataSet::getSelectedProfiles ( )

Get selected profiles.

Returns
array array of int (profile ids)

Definition at line 106 of file class.ilSkillDataSet.php.

References $selected_profiles.

Referenced by getDependencies().

107  {
109  }
+ Here is the caller graph for this function:

◆ getSupportedVersions()

ilSkillDataSet::getSupportedVersions ( )

Get supported versions.

Returns
array of version strings

Definition at line 116 of file class.ilSkillDataSet.php.

References array.

117  {
118  return array("5.1.0");
119  }
Create styles array
The data for the language used.

◆ getTypes()

ilSkillDataSet::getTypes (   $a_entity,
  $a_version 
)
protected

Get field types for entity.

Parameters

Definition at line 138 of file class.ilSkillDataSet.php.

References array.

139  {
140  if ($a_entity == "skmg") {
141  switch ($a_version) {
142  case "5.1.0":
143  return array(
144  "Mode" => "text"
145  );
146  }
147  }
148  if ($a_entity == "skl_subtree") {
149  switch ($a_version) {
150  case "5.1.0":
151  return array(
152  "SklTreeId" => "integer",
153  "TopNode" => "integer",
154  "Child" => "integer",
155  "Parent" => "integer",
156  "Depth" => "integer",
157  "Type" => "text",
158  "Title" => "text",
159  "SelfEval" => "integer",
160  "OrderNr" => "integer",
161  "Status" => "integer",
162  "TemplateId" => "integer"
163  );
164  }
165  }
166  if ($a_entity == "skl_templ_subtree") {
167  switch ($a_version) {
168  case "5.1.0":
169  return array(
170  "SklTreeId" => "integer",
171  "TopNode" => "integer",
172  "Child" => "integer",
173  "Parent" => "integer",
174  "Depth" => "integer",
175  "Type" => "text",
176  "Title" => "text",
177  "SelfEval" => "integer",
178  "OrderNr" => "integer",
179  "Status" => "integer"
180  );
181  }
182  }
183  if ($a_entity == "skl_level") {
184  switch ($a_version) {
185  case "5.1.0":
186  return array(
187  "LevelId" => "integer",
188  "SkillId" => "integer",
189  "Nr" => "integer",
190  "Title" => "text",
191  "Description" => "text"
192  );
193  }
194  }
195  if ($a_entity == "skl_prof") {
196  switch ($a_version) {
197  case "5.1.0":
198  return array(
199  "Id" => "integer",
200  "Title" => "text",
201  "Description" => "text"
202  );
203  }
204  }
205  if ($a_entity == "skl_prof_level") {
206  switch ($a_version) {
207  case "5.1.0":
208  return array(
209  "ProfileId" => "integer",
210  "BaseSkillId" => "integer",
211  "TrefId" => "integer",
212  "LevelId" => "integer"
213  );
214  }
215  }
216  return array();
217  }
Create styles array
The data for the language used.

◆ getXmlNamespace()

ilSkillDataSet::getXmlNamespace (   $a_entity,
  $a_schema_version 
)

Get xml namespace.

Parameters

Definition at line 127 of file class.ilSkillDataSet.php.

128  {
129  return "http://www.ilias.de/xml/Services/Skill/" . $a_entity;
130  }

◆ importRecord()

ilSkillDataSet::importRecord (   $a_entity,
  $a_types,
  $a_rec,
  $a_mapping,
  $a_schema_version 
)

Import record.

Parameters

Definition at line 428 of file class.ilSkillDataSet.php.

References $l, $s, $template_id, $type, ilSkillTreeNode\_lookupType(), array, ilBasicSkill\getCommonSkillIdForImportId(), ilDataSet\getCurrentInstallationId(), ilBasicSkill\getLevelIdForImportId(), ilBasicSkill\lookupLevelSkillId(), ilSkillTreeNode\putInTree(), and ilSkillTreeNode\STATUS_DRAFT.

429  {
430  $source_inst_id = $a_mapping->getInstallId();
431  switch ($a_entity) {
432  case "skl_subtree":
433  if ($a_rec["TopNode"] == 1) {
434  $parent = $this->skill_tree_root_id;
436  $order = $a_rec["OrderNr"] + $this->init_top_order_nr;
437  } else {
438  $parent = (int) $a_mapping->getMapping("Services/Skill", "skl_tree", $a_rec["Parent"]);
439  $status = $a_rec["Status"];
440  $order = $a_rec["OrderNr"];
441  }
442  switch ($a_rec["Type"]) {
443  case "scat":
444  include_once("./Services/Skill/classes/class.ilSkillCategory.php");
445  $scat = new ilSkillCategory();
446  $scat->setTitle($a_rec["Title"]);
447  $scat->setImportId("il_" . $source_inst_id . "_scat_" . $a_rec["Child"]);
448  $scat->setSelfEvaluation($a_rec["SelfEval"]);
449  $scat->setOrderNr($order);
450  $scat->setStatus($status);
451  $scat->create();
452  ilSkillTreeNode::putInTree($scat, $parent);
453  $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $scat->getId());
454  break;
455 
456  case "skll":
457  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
458  $skll = new ilBasicSkill();
459  $skll->setTitle($a_rec["Title"]);
460  $skll->setImportId("il_" . $source_inst_id . "_skll_" . $a_rec["Child"]);
461  $skll->setSelfEvaluation($a_rec["SelfEval"]);
462  $skll->setOrderNr($order);
463  $skll->setStatus($status);
464  $skll->create();
465  ilSkillTreeNode::putInTree($skll, $parent);
466  $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $skll->getId());
467  break;
468 
469  case "sktr":
470  $template_id = (int) $a_mapping->getMapping("Services/Skill", "skl_tree", $a_rec["TemplateId"]);
471  // only create template references, if referenced template is found (template trees are imported first)
472  if ($template_id > 0) {
473  include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
474  $sktr = new ilSkillTemplateReference();
475  $sktr->setTitle($a_rec["Title"]);
476  $sktr->setImportId("il_" . $source_inst_id . "_sktr_" . $a_rec["Child"]);
477  $sktr->setSelfEvaluation($a_rec["SelfEval"]);
478  $sktr->setOrderNr($order);
479  $sktr->setSkillTemplateId($template_id);
480  $sktr->setStatus($status);
481  $sktr->create();
482  ilSkillTreeNode::putInTree($sktr, $parent);
483  $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $sktr->getId());
484  }
485  break;
486 
487  }
488  break;
489 
490  case "skl_templ_subtree":
491  if ($a_rec["TopNode"] == 1) {
492  $parent = $this->skill_tree_root_id;
493  $order = $a_rec["OrderNr"] + $this->init_templ_top_order_nr;
494  } else {
495  $parent = (int) $a_mapping->getMapping("Services/Skill", "skl_tree", $a_rec["Parent"]);
496  $order = $a_rec["OrderNr"];
497  }
498  switch ($a_rec["Type"]) {
499  case "sctp":
500  include_once("./Services/Skill/classes/class.ilSkillTemplateCategory.php");
501  $sctp = new ilSkillTemplateCategory();
502  $sctp->setTitle($a_rec["Title"]);
503  $sctp->setImportId("il_" . $source_inst_id . "_sctp_" . $a_rec["Child"]);
504  $sctp->setOrderNr($order);
505  $sctp->create();
506  ilSkillTreeNode::putInTree($sctp, $parent);
507  $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $sctp->getId());
508  break;
509 
510  case "sktp":
511  include_once("./Services/Skill/classes/class.ilBasicSkillTemplate.php");
512  $sktp = new ilBasicSkillTemplate();
513  $sktp->setTitle($a_rec["Title"]);
514  $sktp->setImportId("il_" . $source_inst_id . "_sktp_" . $a_rec["Child"]);
515  $sktp->setOrderNr($order);
516  $sktp->create();
517  ilSkillTreeNode::putInTree($sktp, $parent);
518  $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $sktp->getId());
519  break;
520  }
521  break;
522 
523  case "skl_level":
524  $skill_id = (int) $a_mapping->getMapping("Services/Skill", "skl_tree", $a_rec["SkillId"]);
525  $type = ilSkillTreeNode::_lookupType($skill_id);
526  if (in_array($type, array("skll", "sktp"))) {
527  if ($type == "skll") {
528  $skill = new ilBasicSkill($skill_id);
529  } else {
530  $skill = new ilBasicSkillTemplate($skill_id);
531  }
532  $skill->addLevel($a_rec["Title"], $a_rec["Description"], "il_" . $source_inst_id . "_sklv_" . $a_rec["LevelId"]);
533  $skill->update();
534  }
535  break;
536 
537  case "skl_prof":
538  include_once("./Services/Skill/classes/class.ilSkillProfile.php");
539  $prof = new ilSkillProfile();
540  $prof->setTitle($a_rec["Title"]);
541  $prof->setDescription($a_rec["Description"]);
542  $prof->create();
543  $a_mapping->addMapping("Services/Skill", "skl_prof", $a_rec["Id"], $prof->getId());
544  break;
545 
546  case "skl_prof_level":
547  $profile_id = (int) $a_mapping->getMapping("Services/Skill", "skl_prof", $a_rec["ProfileId"]);
548  if ($profile_id > 0) {
549  include_once("./Services/Skill/classes/class.ilSkillProfile.php");
550  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
551  $prof = new ilSkillProfile($profile_id);
552  $level_id_data = ilBasicSkill::getLevelIdForImportId($this->getCurrentInstallationId(), $a_rec["LevelId"]);
553  $skill_data = ilBasicSkill::getCommonSkillIdForImportId($this->getCurrentInstallationId(), $a_rec["BaseSkillId"], $a_rec["TrefId"]);
554  //var_dump($level_id_data);
555  //var_dump($skill_data);
556  $level_id = $tref_id = $base_skill = 0;
557  foreach ($level_id_data as $l) {
558  reset($skill_data);
559  foreach ($skill_data as $s) {
560  // echo "<br>=".ilBasicSkill::lookupLevelSkillId($l["level_id"])."=".$s["skill_id"]."=";
561 
562  if ($level_id == 0 && ilBasicSkill::lookupLevelSkillId($l["level_id"]) == $s["skill_id"]) {
563  $level_id = $l["level_id"];
564  $base_skill = $s["skill_id"];
565  $tref_id = $s["tref_id"];
566  }
567  }
568  }
569  if ($level_id > 0) {
570  $prof->addSkillLevel($base_skill, $tref_id, $level_id);
571  }
572  $prof->update();
573  }
574  break;
575  }
576  }
$type
static getLevelIdForImportId($a_source_inst_id, $a_level_import_id)
Get level ids for import IDs (newest first)
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
Put this object into the skill tree.
$s
Definition: pwgen.php:45
static _lookupType($a_obj_id)
Lookup Type.
getCurrentInstallationId()
Get current installation id.
Create styles array
The data for the language used.
global $l
Definition: afr.php:30
static lookupLevelSkillId($a_id)
Lookup level skill id.
Basic Skill.
$template_id
static getCommonSkillIdForImportId($a_source_inst_id, $a_skill_import_id, $a_tref_import_id=0)
Get common skill ids for import IDs (newest first)
+ Here is the call graph for this function:

◆ readData()

ilSkillDataSet::readData (   $a_entity,
  $a_version,
  $a_ids,
  $a_field = "" 
)

Read data.

Parameters

Definition at line 225 of file class.ilSkillDataSet.php.

References ilDataSet\$db, $id, $ilDB, $s, array, data, ilDataSet\getDirectDataFromQuery(), and getMode().

226  {
227  $ilDB = $this->db;
228 
229  $this->data = array();
230 
231  if (!is_array($a_ids)) {
232  $a_ids = array($a_ids);
233  }
234  if ($a_entity == "skmg") { // dummy node
235  switch ($a_version) {
236  case "5.1.0":
237  if ($this->getMode() == self::MODE_SKILLS) {
238  $this->data[] = array("Mode" => "Skills");
239  } elseif ($this->getMode() == self::MODE_PROFILES) {
240  $this->data[] = array("Mode" => "Profiles");
241  }
242  break;
243 
244  }
245  }
246  if ($a_entity == "skl_subtree") { // get subtree for top node
247  switch ($a_version) {
248  case "5.1.0":
249  foreach ($a_ids as $id) {
250  $sub = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($id));
251  foreach ($sub as $s) {
252  $set = $ilDB->query(
253  "SELECT * FROM skl_templ_ref " .
254  " WHERE skl_node_id = " . $ilDB->quote($s["child"], "integer")
255  );
256  $rec = $ilDB->fetchAssoc($set);
257 
258  $top_node = ($s["child"] == $id)
259  ? 1
260  : 0;
261  $this->data[] = array(
262  "SklTreeId" => $s["skl_tree_id"],
263  "TopNode" => $top_node,
264  "Child" => $s["child"],
265  "Parent" => $s["parent"],
266  "Depth" => $s["depth"],
267  "Type" => $s["type"],
268  "Title" => $s["title"],
269  "SelfEval" => $s["self_eval"],
270  "OrderNr" => $s["order_nr"],
271  "Status" => $s["status"],
272  "TemplateId" => (int) $rec["templ_id"]
273  );
274  }
275  }
276  break;
277 
278  }
279  }
280 
281  if ($a_entity == "skl_templ_subtree") { // get template subtree for template id
282  switch ($a_version) {
283  case "5.1.0":
284  foreach ($a_ids as $id) {
285  $sub = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($id));
286  foreach ($sub as $s) {
287  $top_node = ($s["child"] == $id)
288  ? 1
289  : 0;
290  $this->data[] = array(
291  "SklTreeId" => $s["skl_tree_id"],
292  "TopNode" => $top_node,
293  "Child" => $s["child"],
294  "Parent" => $s["parent"],
295  "Depth" => $s["depth"],
296  "Type" => $s["type"],
297  "Title" => $s["title"],
298  "SelfEval" => $s["self_eval"],
299  "OrderNr" => $s["order_nr"],
300  "Status" => $s["status"]
301  );
302  }
303  }
304  break;
305 
306  }
307  }
308 
309  if ($a_entity == "skl_level") {
310  switch ($a_version) {
311  case "5.1.0":
312  $this->getDirectDataFromQuery("SELECT id level_id, skill_id, nr, title, description" .
313  " FROM skl_level WHERE " .
314  $ilDB->in("skill_id", $a_ids, false, "integer") . " ORDER BY skill_id ASC, nr ASC");
315  break;
316 
317  }
318  }
319 
320  if ($a_entity == "skl_prof") {
321  switch ($a_version) {
322  case "5.1.0":
323  $this->getDirectDataFromQuery("SELECT id, title, description" .
324  " FROM skl_profile WHERE " .
325  $ilDB->in("id", $a_ids, false, "integer"));
326  break;
327 
328  }
329  }
330 
331  if ($a_entity == "skl_prof_level") {
332  switch ($a_version) {
333  case "5.1.0":
334  $this->getDirectDataFromQuery("SELECT profile_id, base_skill_id, tref_id, level_id" .
335  " FROM skl_profile_level WHERE " .
336  $ilDB->in("profile_id", $a_ids, false, "integer"));
337  break;
338 
339  }
340  }
341  }
Add some data
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true, $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
if(!array_key_exists('StateId', $_REQUEST)) $id
$s
Definition: pwgen.php:45
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ setMode()

ilSkillDataSet::setMode (   $a_val)

Set mode.

Parameters
string$a_valmode

Definition at line 56 of file class.ilSkillDataSet.php.

57  {
58  $this->mode = $a_val;
59  }

◆ setSelectedNodes()

ilSkillDataSet::setSelectedNodes (   $a_val)

Set export selected nodes.

Parameters
array$a_valarray of int

Definition at line 76 of file class.ilSkillDataSet.php.

77  {
78  $this->selected_nodes = $a_val;
79  }

◆ setSelectedProfiles()

ilSkillDataSet::setSelectedProfiles (   $a_val)

Set selected profiles.

Parameters
array$a_valarray of int (profile ids)

Definition at line 96 of file class.ilSkillDataSet.php.

97  {
98  $this->selected_profiles = $a_val;
99  }

Field Documentation

◆ $init_order_nr

ilSkillDataSet::$init_order_nr
protected

Definition at line 29 of file class.ilSkillDataSet.php.

◆ $mode

ilSkillDataSet::$mode = ""
protected

Definition at line 32 of file class.ilSkillDataSet.php.

Referenced by getMode().

◆ $selected_nodes

ilSkillDataSet::$selected_nodes = false
protected

Definition at line 30 of file class.ilSkillDataSet.php.

Referenced by getSelectedNodes().

◆ $selected_profiles

ilSkillDataSet::$selected_profiles = false
protected

Definition at line 31 of file class.ilSkillDataSet.php.

Referenced by getSelectedProfiles().

◆ $skill_tree

ilSkillDataSet::$skill_tree
protected

Definition at line 28 of file class.ilSkillDataSet.php.

◆ MODE_PROFILES

const ilSkillDataSet::MODE_PROFILES = "prof"

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

◆ MODE_SKILLS

const ilSkillDataSet::MODE_SKILLS = ""

Definition at line 22 of file class.ilSkillDataSet.php.


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