ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilBasicSkill Class Reference

Basic Skill. More...

+ Inheritance diagram for ilBasicSkill:
+ Collaboration diagram for ilBasicSkill:

Public Member Functions

 __construct (int $a_id=0, ilSkillLevelRepository $bsc_skl_lvl_db_rep=null, ilSkillUserLevelRepository $bsc_skl_usr_lvl_db_rep=null, ilSkillTreeRepository $bsc_skl_tre_rep=null)
 
 read ()
 Read data from database. More...
 
 create ()
 Create skill. More...
 
 copy ()
 Copy basic skill. More...
 
 addLevel (string $a_title, string $a_description, string $a_import_id="")
 
 getLevelData (int $a_id=0)
 
 updateLevelOrder (array $order)
 
 deleteLevel (int $a_id)
 
 fixLevelNumbering ()
 
 getSkillForLevelId (int $a_level_id)
 
 getMaxLevelPerType (int $a_tref_id, string $a_type, int $a_user_id=0, int $a_self_eval=0)
 
 getNextLevelFulfilmentPerType (int $a_tref_id, string $a_type, int $a_user_id=0, int $a_self_eval=0)
 
 getAllLevelEntriesOfUser (int $a_tref_id, int $a_user_id=0, int $a_self_eval=0)
 
 getAllHistoricLevelEntriesOfUser (int $a_tref_id, int $a_user_id=0, int $a_eval_by=0)
 
 getMaxLevelPerObject (int $a_tref_id, int $a_object_id, int $a_user_id=0, int $a_self_eval=0)
 
 getNextLevelFulfilmentPerObject (int $a_tref_id, int $a_object_id, int $a_user_id=0, int $a_self_eval=0)
 
 getMaxLevel (int $a_tref_id, int $a_user_id=0, int $a_self_eval=0)
 
 getNextLevelFulfilment (int $a_tref_id, int $a_user_id=0, int $a_self_eval=0)
 
 getLastLevelPerObject (int $a_tref_id, int $a_object_id, int $a_user_id=0, int $a_self_eval=0)
 
 getLastUpdatePerObject (int $a_tref_id, int $a_object_id, int $a_user_id=0, int $a_self_eval=0)
 
 getTitleForCertificate ()
 
 getShortTitleForCertificate ()
 
- 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 ()
 

Static Public Member Functions

static lookupLevelTitle (int $a_id)
 
static lookupLevelDescription (int $a_id)
 
static lookupLevelSkillId (int $a_id)
 
static writeLevelTitle (int $a_id, string $a_title)
 
static writeLevelDescription (int $a_id, string $a_description)
 
static resetUserSkillLevelStatus (int $a_user_id, int $a_skill_id, int $a_tref_id=0, int $a_trigger_ref_id=0, bool $a_self_eval=false)
 
static getNewAchievementsPerUser (string $a_timestamp, string $a_timestamp_to=null, int $a_user_id=0, int $a_self_eval=0)
 
static writeUserSkillLevelStatus (int $a_level_id, int $a_user_id, int $a_trigger_ref_id, int $a_tref_id=0, int $a_status=ilBasicSkill::ACHIEVED, bool $a_force=false, bool $a_self_eval=false, string $a_unique_identifier="", float $a_next_level_fulfilment=0.0, string $trigger_user_id="")
 
static removeAllUserSkillLevelStatusOfObject (int $a_user_id, int $a_trigger_obj_id, bool $a_self_eval=false, string $a_unique_identifier="")
 
static removeAllUserData (int $a_user_id)
 
static hasSelfEvaluated (int $a_user_id, int $a_skill_id, int $a_tref_id)
 
static getUsageInfo (array $a_cskill_ids)
 
static getCommonSkillIdForImportId (int $a_source_inst_id, int $a_skill_import_id, int $a_tref_import_id=0)
 
static getLevelIdForImportId (int $a_source_inst_id, int $a_level_import_id)
 
static getLevelIdForImportIdMatchSkill (int $a_source_inst_id, int $a_level_import_id, int $a_skill_import_id, int $a_tref_import_id=0)
 
- 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

const ACHIEVED = 1
 
const NOT_ACHIEVED = 0
 
const EVAL_BY_OTHERS = 0
 
const EVAL_BY_SELF = 1
 
const EVAL_BY_ALL = 2
 
- Data Fields inherited from ilSkillTreeNode
const STATUS_PUBLISH = 0
 
const STATUS_DRAFT = 1
 
const STATUS_OUTDATED = 2
 

Static Protected Member Functions

static hasRecentSelfEvaluation (int $a_user_id, int $a_skill_id, int $a_tref_id=0, int $a_trigger_ref_id=0)
 
- Static Protected Member Functions inherited from ilSkillTreeNode
static _lookup (int $a_obj_id, string $a_field)
 

Protected Attributes

ilObjUser $user
 
ilSkillLevelRepository $bsc_skl_lvl_db_rep
 
ilSkillUserLevelRepository $bsc_skl_usr_lvl_db_rep
 
ilSkillTreeRepository $bsc_skl_tre_rep
 
- 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 = []
 

Additional Inherited Members

- Protected Member Functions inherited from ilSkillTreeNode
 setCreationDate (string $a_val)
 

Detailed Description

Basic Skill.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilBasicSkill::__construct ( int  $a_id = 0,
ilSkillLevelRepository  $bsc_skl_lvl_db_rep = null,
ilSkillUserLevelRepository  $bsc_skl_usr_lvl_db_rep = null,
ilSkillTreeRepository  $bsc_skl_tre_rep = null 
)

Definition at line 43 of file class.ilBasicSkill.php.

References $bsc_skl_lvl_db_rep, $bsc_skl_tre_rep, $bsc_skl_usr_lvl_db_rep, $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ilSkillTreeNode\setType(), and ILIAS\Repository\user().

48  {
49  global $DIC;
50 
51  $this->user = $DIC->user();
52 
53  if (is_null($bsc_skl_lvl_db_rep)) {
54  $this->bsc_skl_lvl_db_rep = $DIC->skills()->internal()->repo()->getLevelRepo();
55  } else {
56  $this->bsc_skl_lvl_db_rep = $bsc_skl_lvl_db_rep;
57  }
58 
59  if (is_null($bsc_skl_usr_lvl_db_rep)) {
60  $this->bsc_skl_usr_lvl_db_rep = $DIC->skills()->internal()->repo()->getUserLevelRepo();
61  } else {
62  $this->bsc_skl_usr_lvl_db_rep = $bsc_skl_usr_lvl_db_rep;
63  }
64 
65  if (is_null($bsc_skl_tre_rep)) {
66  $this->bsc_skl_tre_rep = $DIC->skills()->internal()->repo()->getTreeRepo();
67  } else {
68  $this->bsc_skl_tre_rep = $bsc_skl_tre_rep;
69  }
70 
71  parent::__construct($a_id);
72  $this->setType("skll");
73  }
setType(string $a_type)
ilSkillUserLevelRepository $bsc_skl_usr_lvl_db_rep
global $DIC
Definition: feed.php:28
ilSkillLevelRepository $bsc_skl_lvl_db_rep
__construct(VocabulariesInterface $vocabularies)
ilSkillTreeRepository $bsc_skl_tre_rep
+ Here is the call graph for this function:

Member Function Documentation

◆ addLevel()

ilBasicSkill::addLevel ( string  $a_title,
string  $a_description,
string  $a_import_id = "" 
)

Definition at line 121 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId().

121  : void
122  {
123  $skill_id = $this->getId();
124  $this->bsc_skl_lvl_db_rep->addLevel($skill_id, $a_title, $a_description, $a_import_id);
125  }
+ Here is the call graph for this function:

◆ copy()

ilBasicSkill::copy ( )

Copy basic skill.

Definition at line 94 of file class.ilBasicSkill.php.

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

94  : ilBasicSkill
95  {
96  $skill = new ilBasicSkill();
97  $skill->setTitle($this->getTitle());
98  $skill->setDescription($this->getDescription());
99  $skill->setType($this->getType());
100  $skill->setSelfEvaluation($this->getSelfEvaluation());
101  $skill->setOrderNr($this->getOrderNr());
102  $skill->create();
103 
104  $levels = $this->getLevelData();
105  if (sizeof($levels)) {
106  foreach ($levels as $item) {
107  $skill->addLevel($item["title"], $item["description"]);
108  }
109  }
110  $skill->update();
111 
112  return $skill;
113  }
getLevelData(int $a_id=0)
Basic Skill.
+ Here is the call graph for this function:

◆ create()

ilBasicSkill::create ( )

Create skill.

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

86  : void
87  {
88  parent::create();
89  }

◆ deleteLevel()

ilBasicSkill::deleteLevel ( int  $a_id)

Definition at line 183 of file class.ilBasicSkill.php.

183  : void
184  {
185  $this->bsc_skl_lvl_db_rep->deleteLevel($a_id);
186  }

◆ fixLevelNumbering()

ilBasicSkill::fixLevelNumbering ( )

Definition at line 188 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId().

188  : void
189  {
190  $skill_id = $this->getId();
191  $this->bsc_skl_lvl_db_rep->fixLevelNumbering($skill_id);
192  }
+ Here is the call graph for this function:

◆ getAllHistoricLevelEntriesOfUser()

ilBasicSkill::getAllHistoricLevelEntriesOfUser ( int  $a_tref_id,
int  $a_user_id = 0,
int  $a_eval_by = 0 
)

Definition at line 433 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), and ILIAS\Repository\user().

437  : array {
438  if ($a_user_id == 0) {
439  $a_user_id = $this->user->getId();
440  }
441  $skill_id = $this->getId();
442 
443  return $this->bsc_skl_usr_lvl_db_rep->getAllHistoricLevelEntriesOfUser(
444  $skill_id,
445  $a_tref_id,
446  $a_user_id,
447  $a_eval_by
448  );
449  }
+ Here is the call graph for this function:

◆ getAllLevelEntriesOfUser()

ilBasicSkill::getAllLevelEntriesOfUser ( int  $a_tref_id,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)

Definition at line 420 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), and ILIAS\Repository\user().

424  : array {
425  if ($a_user_id == 0) {
426  $a_user_id = $this->user->getId();
427  }
428  $skill_id = $this->getId();
429 
430  return $this->bsc_skl_usr_lvl_db_rep->getAllLevelEntriesOfUser($skill_id, $a_tref_id, $a_user_id, $a_self_eval);
431  }
+ Here is the call graph for this function:

◆ getCommonSkillIdForImportId()

static ilBasicSkill::getCommonSkillIdForImportId ( int  $a_source_inst_id,
int  $a_skill_import_id,
int  $a_tref_import_id = 0 
)
static

Definition at line 607 of file class.ilBasicSkill.php.

References $DIC.

Referenced by ilAssQuestionSkillAssignmentImporter\getSkillIdMapping(), ilSurveyDataSet\importRecord(), and ilSkillDataSet\importRecord().

611  : array {
612  global $DIC;
613 
614  if ($a_source_inst_id == 0) {
615  return [];
616  }
617 
618  $repository = $DIC->skills()->internal()->repo()->getTreeRepo();
619  return $repository->getCommonSkillIdForImportId(
620  $a_source_inst_id,
621  $a_skill_import_id,
622  $a_tref_import_id
623  );
624  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ getLastLevelPerObject()

ilBasicSkill::getLastLevelPerObject ( int  $a_tref_id,
int  $a_object_id,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)

Definition at line 534 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), and ILIAS\Repository\user().

539  : int {
540  if ($a_user_id == 0) {
541  $a_user_id = $this->user->getId();
542  }
543  $skill_id = $this->getId();
544 
545  return $this->bsc_skl_usr_lvl_db_rep->getLastLevelPerObject(
546  $skill_id,
547  $a_tref_id,
548  $a_object_id,
549  $a_user_id,
550  $a_self_eval
551  );
552  }
+ Here is the call graph for this function:

◆ getLastUpdatePerObject()

ilBasicSkill::getLastUpdatePerObject ( int  $a_tref_id,
int  $a_object_id,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)

Definition at line 554 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), and ILIAS\Repository\user().

559  : string {
560  if ($a_user_id == 0) {
561  $a_user_id = $this->user->getId();
562  }
563  $skill_id = $this->getId();
564 
565  return $this->bsc_skl_usr_lvl_db_rep->getLastUpdatePerObject(
566  $skill_id,
567  $a_tref_id,
568  $a_object_id,
569  $a_user_id,
570  $a_self_eval
571  );
572  }
+ Here is the call graph for this function:

◆ getLevelData()

ilBasicSkill::getLevelData ( int  $a_id = 0)

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

References ilSkillTreeNode\getId().

Referenced by ilBasicSkillTemplate\copy(), copy(), getMaxLevel(), getMaxLevelPerObject(), getMaxLevelPerType(), and ilPersonalSkillsGUI\setGapAnalysisActualStatusModePerObject().

127  : array
128  {
129  $skill_id = $this->getId();
130 
131  return $this->bsc_skl_lvl_db_rep->getLevelData($skill_id, $a_id);
132  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLevelIdForImportId()

static ilBasicSkill::getLevelIdForImportId ( int  $a_source_inst_id,
int  $a_level_import_id 
)
static

Definition at line 626 of file class.ilBasicSkill.php.

References $DIC.

Referenced by ilTestSkillLevelThresholdImporter\getLevelIdMapping(), and ilSkillDataSet\importRecord().

626  : array
627  {
628  global $DIC;
629 
630  $repository = $DIC->skills()->internal()->repo()->getTreeRepo();
631 
632  return $repository->getLevelIdForImportId($a_source_inst_id, $a_level_import_id);
633  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ getLevelIdForImportIdMatchSkill()

static ilBasicSkill::getLevelIdForImportIdMatchSkill ( int  $a_source_inst_id,
int  $a_level_import_id,
int  $a_skill_import_id,
int  $a_tref_import_id = 0 
)
static

Definition at line 635 of file class.ilBasicSkill.php.

References lookupLevelSkillId().

Referenced by ilSurveyDataSet\importRecord().

640  : array {
641  $level_id_data = self::getLevelIdForImportId($a_source_inst_id, $a_level_import_id);
642  $skill_data = self::getCommonSkillIdForImportId($a_source_inst_id, $a_skill_import_id, $a_tref_import_id);
643  $matches = [];
644  foreach ($level_id_data as $l) {
645  reset($skill_data);
646  foreach ($skill_data as $s) {
647  if (ilBasicSkill::lookupLevelSkillId($l["level_id"]) == $s["skill_id"]) {
648  $matches[] = array(
649  "level_id" => $l["level_id"],
650  "creation_date" => $l["creation_date"],
651  "skill_id" => $s["skill_id"],
652  "tref_id" => $s["tref_id"]
653  );
654  }
655  }
656  }
657  return $matches;
658  }
static lookupLevelSkillId(int $a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMaxLevel()

ilBasicSkill::getMaxLevel ( int  $a_tref_id,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)

Definition at line 493 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), getLevelData(), and ILIAS\Repository\user().

497  : int {
498  if ($a_user_id == 0) {
499  $a_user_id = $this->user->getId();
500  }
501  $skill_id = $this->getId();
502  $levels = $this->getLevelData();
503 
504  return $this->bsc_skl_usr_lvl_db_rep->getMaxLevel($skill_id, $levels, $a_tref_id, $a_user_id, $a_self_eval);
505  }
getLevelData(int $a_id=0)
+ Here is the call graph for this function:

◆ getMaxLevelPerObject()

ilBasicSkill::getMaxLevelPerObject ( int  $a_tref_id,
int  $a_object_id,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)

Definition at line 451 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), getLevelData(), and ILIAS\Repository\user().

456  : int {
457  if ($a_user_id == 0) {
458  $a_user_id = $this->user->getId();
459  }
460  $skill_id = $this->getId();
461  $levels = $this->getLevelData();
462 
463  return $this->bsc_skl_usr_lvl_db_rep->getMaxLevelPerObject(
464  $skill_id,
465  $levels,
466  $a_tref_id,
467  $a_object_id,
468  $a_user_id,
469  $a_self_eval
470  );
471  }
getLevelData(int $a_id=0)
+ Here is the call graph for this function:

◆ getMaxLevelPerType()

ilBasicSkill::getMaxLevelPerType ( int  $a_tref_id,
string  $a_type,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)

Definition at line 378 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), getLevelData(), and ILIAS\Repository\user().

383  : int {
384  if ($a_user_id == 0) {
385  $a_user_id = $this->user->getId();
386  }
387  $skill_id = $this->getId();
388  $levels = $this->getLevelData();
389 
390  return $this->bsc_skl_usr_lvl_db_rep->getMaxLevelPerType(
391  $skill_id,
392  $levels,
393  $a_tref_id,
394  $a_type,
395  $a_user_id,
396  $a_self_eval
397  );
398  }
getLevelData(int $a_id=0)
+ Here is the call graph for this function:

◆ getNewAchievementsPerUser()

static ilBasicSkill::getNewAchievementsPerUser ( string  $a_timestamp,
string  $a_timestamp_to = null,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)
static

Definition at line 269 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

Referenced by ilSkillLearningHistoryProvider\getEntries(), and ilSkillNotifications\run().

274  : array {
275  global $DIC;
276 
277  $ilDB = $DIC->database();
278 
279  $repository = new ilSkillUserLevelDBRepository($ilDB);
280 
281  return $repository->getNewAchievementsPerUser($a_timestamp, $a_timestamp_to, $a_user_id, $a_self_eval);
282  }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getNextLevelFulfilment()

ilBasicSkill::getNextLevelFulfilment ( int  $a_tref_id,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)

Definition at line 507 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), and ILIAS\Repository\user().

511  : float {
512  if ($a_user_id == 0) {
513  $a_user_id = $this->user->getId();
514  }
515  $skill_id = $this->getId();
516 
517  return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilment($skill_id, $a_tref_id, $a_user_id, $a_self_eval);
518  }
+ Here is the call graph for this function:

◆ getNextLevelFulfilmentPerObject()

ilBasicSkill::getNextLevelFulfilmentPerObject ( int  $a_tref_id,
int  $a_object_id,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)

Definition at line 473 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), and ILIAS\Repository\user().

478  : float {
479  if ($a_user_id == 0) {
480  $a_user_id = $this->user->getId();
481  }
482  $skill_id = $this->getId();
483 
484  return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilmentPerObject(
485  $skill_id,
486  $a_tref_id,
487  $a_object_id,
488  $a_user_id,
489  $a_self_eval
490  );
491  }
+ Here is the call graph for this function:

◆ getNextLevelFulfilmentPerType()

ilBasicSkill::getNextLevelFulfilmentPerType ( int  $a_tref_id,
string  $a_type,
int  $a_user_id = 0,
int  $a_self_eval = 0 
)

Definition at line 400 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId(), and ILIAS\Repository\user().

405  : float {
406  if ($a_user_id == 0) {
407  $a_user_id = $this->user->getId();
408  }
409  $skill_id = $this->getId();
410 
411  return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilmentPerType(
412  $skill_id,
413  $a_tref_id,
414  $a_type,
415  $a_user_id,
416  $a_self_eval
417  );
418  }
+ Here is the call graph for this function:

◆ getShortTitleForCertificate()

ilBasicSkill::getShortTitleForCertificate ( )

Definition at line 585 of file class.ilBasicSkill.php.

585  : string
586  {
587  return "Skill";
588  }

◆ getSkillForLevelId()

ilBasicSkill::getSkillForLevelId ( int  $a_level_id)

Definition at line 194 of file class.ilBasicSkill.php.

References getSkillForLevelId().

Referenced by getSkillForLevelId().

194  : ?ilBasicSkill
195  {
196  return $this->bsc_skl_lvl_db_rep->getSkillForLevelId($a_level_id);
197  }
Basic Skill.
getSkillForLevelId(int $a_level_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTitleForCertificate()

ilBasicSkill::getTitleForCertificate ( )

Definition at line 580 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getTitle().

580  : string
581  {
582  return $this->getTitle();
583  }
+ Here is the call graph for this function:

◆ getUsageInfo()

static ilBasicSkill::getUsageInfo ( array  $a_cskill_ids)
static

Definition at line 593 of file class.ilBasicSkill.php.

References $DIC.

593  : array
594  {
595  global $DIC;
596 
597  $usage_manager = $DIC->skills()->internal()->manager()->getUsageManager();
598 
599  return $usage_manager->getUsageInfoGeneric(
600  $a_cskill_ids,
601  Usage\SkillUsageManager::USER_ASSIGNED,
602  "skl_user_skill_level",
603  "user_id"
604  );
605  }
global $DIC
Definition: feed.php:28

◆ hasRecentSelfEvaluation()

static ilBasicSkill::hasRecentSelfEvaluation ( int  $a_user_id,
int  $a_skill_id,
int  $a_tref_id = 0,
int  $a_trigger_ref_id = 0 
)
staticprotected

Definition at line 244 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

249  : string {
250  global $DIC;
251 
252  $ilDB = $DIC->database();
253 
254  $obj_adapter = new ilSkillObjectAdapter();
255  $trigger_obj_id = ($a_trigger_ref_id > 0)
256  ? $obj_adapter->getObjIdForRefId($a_trigger_ref_id)
257  : 0;
258  $repository = new ilSkillUserLevelDBRepository($ilDB);
259 
260  return $repository->hasRecentSelfEvaluation(
261  $trigger_obj_id,
262  $a_user_id,
263  $a_skill_id,
264  $a_tref_id,
265  $a_trigger_ref_id
266  );
267  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ hasSelfEvaluated()

static ilBasicSkill::hasSelfEvaluated ( int  $a_user_id,
int  $a_skill_id,
int  $a_tref_id 
)
static

Definition at line 520 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

Referenced by ilPersonalSkillsGUI\getSuggestedResourcesForProfile(), ilPersonalSkillsGUI\listAssignedProfile(), ilPersonalSkillsGUI\renderSkillHTML(), and ilPersonalSkillsGUI\setGapAnalysisActualStatusModePerObject().

524  : bool {
525  global $DIC;
526 
527  $ilDB = $DIC->database();
528 
529  $repository = new ilSkillUserLevelDBRepository($ilDB);
530 
531  return $repository->hasSelfEvaluated($a_user_id, $a_skill_id, $a_tref_id);
532  }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ lookupLevelDescription()

static ilBasicSkill::lookupLevelDescription ( int  $a_id)
static

Definition at line 143 of file class.ilBasicSkill.php.

References $DIC.

143  : string
144  {
145  global $DIC;
146 
147  $repository = $DIC->skills()->internal()->repo()->getLevelRepo();
148 
149  return $repository->lookupLevelDescription($a_id);
150  }
global $DIC
Definition: feed.php:28

◆ lookupLevelSkillId()

static ilBasicSkill::lookupLevelSkillId ( int  $a_id)
static

Definition at line 152 of file class.ilBasicSkill.php.

References $DIC.

Referenced by getLevelIdForImportIdMatchSkill(), ilSkillDataSet\importRecord(), and writeUserSkillLevelStatus().

152  : int
153  {
154  global $DIC;
155 
156  $repository = $DIC->skills()->internal()->repo()->getLevelRepo();
157 
158  return $repository->lookupLevelSkillId($a_id);
159  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ lookupLevelTitle()

static ilBasicSkill::lookupLevelTitle ( int  $a_id)
static

Definition at line 134 of file class.ilBasicSkill.php.

References $DIC.

Referenced by ilSkillProfileGUI\confirmLevelAssignmentRemoval(), ilBasicSkillGUI\confirmLevelDeletion(), ilSkillProfileLevelsTableGUI\fillRow(), ilContSkillMemberTableGUI\fillRow(), ilPersonalSkillsGUI\getAllSuggestedResources(), ilSkillLearningHistoryProvider\getEntries(), ilSkillNotifications\sendMail(), ilBasicSkillTemplateGUI\setLevelHead(), and ilBasicSkillGUI\setLevelHead().

134  : string
135  {
136  global $DIC;
137 
138  $repository = $DIC->skills()->internal()->repo()->getLevelRepo();
139 
140  return $repository->lookupLevelTitle($a_id);
141  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ read()

ilBasicSkill::read ( )

Read data from database.

Definition at line 78 of file class.ilBasicSkill.php.

78  : void
79  {
80  parent::read();
81  }

◆ removeAllUserData()

static ilBasicSkill::removeAllUserData ( int  $a_user_id)
static

Definition at line 368 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

Referenced by ilSkillObjDeletionHandler\processDeletion().

368  : void
369  {
370  global $DIC;
371 
372  $ilDB = $DIC->database();
373 
374  $repository = new ilSkillUserLevelDBRepository($ilDB);
375  $repository->removeAllUserData($a_user_id);
376  }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ removeAllUserSkillLevelStatusOfObject()

static ilBasicSkill::removeAllUserSkillLevelStatusOfObject ( int  $a_user_id,
int  $a_trigger_obj_id,
bool  $a_self_eval = false,
string  $a_unique_identifier = "" 
)
static

Definition at line 345 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

Referenced by ILIAS\Container\Skills\ContainerSkillManager\publishMemberSkills(), and ILIAS\Container\Skills\ContainerSkillManager\removeAllMemberSkillsFromContainer().

350  : bool {
351  global $DIC;
352 
353  $ilDB = $DIC->database();
354 
355  if ($a_trigger_obj_id == 0) {
356  return false;
357  }
358  $repository = new ilSkillUserLevelDBRepository($ilDB);
359 
360  return $repository->removeAllUserSkillLevelStatusOfObject(
361  $a_user_id,
362  $a_trigger_obj_id,
363  $a_self_eval,
364  $a_unique_identifier
365  );
366  }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ resetUserSkillLevelStatus()

static ilBasicSkill::resetUserSkillLevelStatus ( int  $a_user_id,
int  $a_skill_id,
int  $a_tref_id = 0,
int  $a_trigger_ref_id = 0,
bool  $a_self_eval = false 
)
static

Definition at line 205 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

Referenced by ILIAS\Skill\Personal\SelfEvaluationManager\saveSelfEvaluation().

211  : void {
212  global $DIC;
213 
214  $ilDB = $DIC->database();
215 
216  if (!$a_self_eval) {
217  throw new ilSkillException("resetUserSkillLevelStatus currently only provided for self evaluations.");
218  }
219 
220  $obj_adapter = new ilSkillObjectAdapter();
221  $trigger_obj_id = ($a_trigger_ref_id > 0)
222  ? $obj_adapter->getObjIdForRefId($a_trigger_ref_id)
223  : 0;
224 
225  $update = false;
226  $repository = new ilSkillUserLevelDBRepository($ilDB);
227  $status_date = $repository->hasRecentSelfEvaluation($a_user_id, $a_skill_id, $a_tref_id, $a_trigger_ref_id);
228  if ($status_date != "") {
229  $update = true;
230  }
231 
232  $repository->resetUserSkillLevelStatus(
233  $update,
234  $trigger_obj_id,
235  $status_date,
236  $a_user_id,
237  $a_skill_id,
238  $a_tref_id,
239  $a_trigger_ref_id,
240  $a_self_eval
241  );
242  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
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 caller graph for this function:

◆ updateLevelOrder()

ilBasicSkill::updateLevelOrder ( array  $order)

Definition at line 177 of file class.ilBasicSkill.php.

177  : void
178  {
179  asort($order);
180  $this->bsc_skl_lvl_db_rep->updateLevelOrder($order);
181  }

◆ writeLevelDescription()

static ilBasicSkill::writeLevelDescription ( int  $a_id,
string  $a_description 
)
static

Definition at line 169 of file class.ilBasicSkill.php.

References $DIC.

169  : void
170  {
171  global $DIC;
172 
173  $repository = $DIC->skills()->internal()->repo()->getLevelRepo();
174  $repository->writeLevelDescription($a_id, $a_description);
175  }
global $DIC
Definition: feed.php:28

◆ writeLevelTitle()

static ilBasicSkill::writeLevelTitle ( int  $a_id,
string  $a_title 
)
static

Definition at line 161 of file class.ilBasicSkill.php.

References $DIC.

161  : void
162  {
163  global $DIC;
164 
165  $repository = $DIC->skills()->internal()->repo()->getLevelRepo();
166  $repository->writeLevelTitle($a_id, $a_title);
167  }
global $DIC
Definition: feed.php:28

◆ writeUserSkillLevelStatus()

static ilBasicSkill::writeUserSkillLevelStatus ( int  $a_level_id,
int  $a_user_id,
int  $a_trigger_ref_id,
int  $a_tref_id = 0,
int  $a_status = ilBasicSkill::ACHIEVED,
bool  $a_force = false,
bool  $a_self_eval = false,
string  $a_unique_identifier = "",
float  $a_next_level_fulfilment = 0.0,
string  $trigger_user_id = "" 
)
static

Definition at line 284 of file class.ilBasicSkill.php.

References $DIC, $ilDB, and lookupLevelSkillId().

Referenced by ilSkillAppEventListener\handleEvent(), ilTestSkillEvaluation\invokeSkillLevelTrigger(), ILIAS\Container\Skills\ContainerSkillManager\publishMemberSkills(), ILIAS\Skill\Personal\SelfEvaluationManager\saveSelfEvaluation(), ilSurveySkill\writeAndAddAppraiseeSkills(), ilSurveySkill\writeAndAddIndFeedbackSkills(), and ilSurveySkill\writeAndAddSelfEvalSkills().

295  : void {
296  global $DIC;
297 
298  $ilDB = $DIC->database();
299 
300  $skill_id = ilBasicSkill::lookupLevelSkillId($a_level_id);
301  $trigger_ref_id = $a_trigger_ref_id;
302  $obj_adapter = new ilSkillObjectAdapter();
303  $trigger_obj_id = $obj_adapter->getObjIdForRefId($trigger_ref_id);
304  $trigger_title = $obj_adapter->getTitleForObjId($trigger_obj_id);
305  $trigger_type = $obj_adapter->getTypeForObjId($trigger_obj_id);
306 
307  $status_date = "";
308  $update = false;
309 
310  // self evaluations will update, if the last self evaluation is on the same day
311  if ($a_self_eval && self::hasRecentSelfEvaluation($a_user_id, $skill_id, $a_tref_id, $trigger_ref_id)) {
312  $status_date = self::hasRecentSelfEvaluation($a_user_id, $skill_id, $a_tref_id, $trigger_ref_id);
313  if ($status_date != "") {
314  $update = true;
315  }
316  }
317 
318  //next level percentage fulfilment value must be >=0 and <1
319  if (!($a_next_level_fulfilment >= 0) || !($a_next_level_fulfilment < 1)) {
320  throw new \UnexpectedValueException(
321  "Next level fulfilment must be equal to or greater than 0 and less than 1, '" .
322  $a_next_level_fulfilment . "' given."
323  );
324  }
325 
326  $repository = new ilSkillUserLevelDBRepository($ilDB);
327  $repository->writeUserSkillLevelStatus(
328  $skill_id,
329  $trigger_ref_id,
330  $trigger_obj_id,
331  $trigger_title,
332  $trigger_type,
333  $update,
334  $status_date,
335  $a_level_id,
336  $a_user_id,
337  $a_tref_id,
338  $a_self_eval,
339  $a_unique_identifier,
340  $a_next_level_fulfilment,
341  $trigger_user_id
342  );
343  }
static lookupLevelSkillId(int $a_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
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:
+ Here is the caller graph for this function:

Field Documentation

◆ $bsc_skl_lvl_db_rep

ilSkillLevelRepository ilBasicSkill::$bsc_skl_lvl_db_rep
protected

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

Referenced by __construct().

◆ $bsc_skl_tre_rep

ilSkillTreeRepository ilBasicSkill::$bsc_skl_tre_rep
protected

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

Referenced by __construct().

◆ $bsc_skl_usr_lvl_db_rep

ilSkillUserLevelRepository ilBasicSkill::$bsc_skl_usr_lvl_db_rep
protected

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

Referenced by __construct().

◆ $user

ilObjUser ilBasicSkill::$user
protected

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

◆ ACHIEVED

◆ EVAL_BY_ALL

const ilBasicSkill::EVAL_BY_ALL = 2

◆ EVAL_BY_OTHERS

const ilBasicSkill::EVAL_BY_OTHERS = 0

Definition at line 39 of file class.ilBasicSkill.php.

Referenced by ilPersonalSkillsGUI\renderSkillHTML().

◆ EVAL_BY_SELF

◆ NOT_ACHIEVED

const ilBasicSkill::NOT_ACHIEVED = 0

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


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