ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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, string $trigger_user="")
 
 getLastLevelEntryOfUser (int $a_tref_id, int $a_user_id, int $a_object_id=0, int $a_self_eval=0, string $trigger_user="")
 
 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 27 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 42 of file class.ilBasicSkill.php.

References $bsc_skl_lvl_db_rep, $bsc_skl_tre_rep, $bsc_skl_usr_lvl_db_rep, $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilSkillTreeNode\setType(), and ILIAS\Repository\user().

47  {
48  global $DIC;
49 
50  $this->user = $DIC->user();
51 
52  if (is_null($bsc_skl_lvl_db_rep)) {
53  $this->bsc_skl_lvl_db_rep = $DIC->skills()->internal()->repo()->getLevelRepo();
54  } else {
55  $this->bsc_skl_lvl_db_rep = $bsc_skl_lvl_db_rep;
56  }
57 
58  if (is_null($bsc_skl_usr_lvl_db_rep)) {
59  $this->bsc_skl_usr_lvl_db_rep = $DIC->skills()->internal()->repo()->getUserLevelRepo();
60  } else {
61  $this->bsc_skl_usr_lvl_db_rep = $bsc_skl_usr_lvl_db_rep;
62  }
63 
64  if (is_null($bsc_skl_tre_rep)) {
65  $this->bsc_skl_tre_rep = $DIC->skills()->internal()->repo()->getTreeRepo();
66  } else {
67  $this->bsc_skl_tre_rep = $bsc_skl_tre_rep;
68  }
69 
70  parent::__construct($a_id);
71  $this->setType("skll");
72  }
setType(string $a_type)
ilSkillUserLevelRepository $bsc_skl_usr_lvl_db_rep
ilSkillLevelRepository $bsc_skl_lvl_db_rep
global $DIC
Definition: shib_login.php:26
ilSkillTreeRepository $bsc_skl_tre_rep
__construct(Container $dic, ilPlugin $plugin)
+ 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 120 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getId().

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

◆ copy()

ilBasicSkill::copy ( )

Copy basic skill.

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

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

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

◆ create()

ilBasicSkill::create ( )

Create skill.

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

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

◆ deleteLevel()

ilBasicSkill::deleteLevel ( int  $a_id)

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

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

◆ fixLevelNumbering()

ilBasicSkill::fixLevelNumbering ( )

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

References ilSkillTreeNode\getId().

187  : void
188  {
189  $skill_id = $this->getId();
190  $this->bsc_skl_lvl_db_rep->fixLevelNumbering($skill_id);
191  }
+ 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 432 of file class.ilBasicSkill.php.

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

436  : array {
437  if ($a_user_id == 0) {
438  $a_user_id = $this->user->getId();
439  }
440  $skill_id = $this->getId();
441 
442  return $this->bsc_skl_usr_lvl_db_rep->getAllHistoricLevelEntriesOfUser(
443  $skill_id,
444  $a_tref_id,
445  $a_user_id,
446  $a_eval_by
447  );
448  }
+ 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 419 of file class.ilBasicSkill.php.

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

423  : array {
424  if ($a_user_id == 0) {
425  $a_user_id = $this->user->getId();
426  }
427  $skill_id = $this->getId();
428 
429  return $this->bsc_skl_usr_lvl_db_rep->getAllLevelEntriesOfUser($skill_id, $a_tref_id, $a_user_id, $a_self_eval);
430  }
+ 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 629 of file class.ilBasicSkill.php.

References $DIC.

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

633  : array {
634  global $DIC;
635 
636  if ($a_source_inst_id == 0) {
637  return [];
638  }
639 
640  $repository = $DIC->skills()->internal()->repo()->getTreeRepo();
641  return $repository->getCommonSkillIdForImportId(
642  $a_source_inst_id,
643  $a_skill_import_id,
644  $a_tref_import_id
645  );
646  }
global $DIC
Definition: shib_login.php:26
+ Here is the caller graph for this function:

◆ getLastLevelEntryOfUser()

ilBasicSkill::getLastLevelEntryOfUser ( int  $a_tref_id,
int  $a_user_id,
int  $a_object_id = 0,
int  $a_self_eval = 0,
string  $trigger_user = "" 
)

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

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

480  : int {
481  if ($a_user_id == 0) {
482  $a_user_id = $this->user->getId();
483  }
484  return $this->bsc_skl_usr_lvl_db_rep->getLastLevelEntryOfUser(
485  $this->getId(),
486  $a_tref_id,
487  $a_user_id,
488  $a_object_id,
489  $a_self_eval,
490  $trigger_user
491  );
492  }
+ Here is the call 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 556 of file class.ilBasicSkill.php.

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

561  : int {
562  if ($a_user_id == 0) {
563  $a_user_id = $this->user->getId();
564  }
565  $skill_id = $this->getId();
566 
567  return $this->bsc_skl_usr_lvl_db_rep->getLastLevelPerObject(
568  $skill_id,
569  $a_tref_id,
570  $a_object_id,
571  $a_user_id,
572  $a_self_eval
573  );
574  }
+ 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 576 of file class.ilBasicSkill.php.

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

581  : string {
582  if ($a_user_id == 0) {
583  $a_user_id = $this->user->getId();
584  }
585  $skill_id = $this->getId();
586 
587  return $this->bsc_skl_usr_lvl_db_rep->getLastUpdatePerObject(
588  $skill_id,
589  $a_tref_id,
590  $a_object_id,
591  $a_user_id,
592  $a_self_eval
593  );
594  }
+ Here is the call graph for this function:

◆ getLevelData()

ilBasicSkill::getLevelData ( int  $a_id = 0)

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

References ilSkillTreeNode\getId().

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

126  : array
127  {
128  $skill_id = $this->getId();
129 
130  return $this->bsc_skl_lvl_db_rep->getLevelData($skill_id, $a_id);
131  }
+ 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 648 of file class.ilBasicSkill.php.

References $DIC.

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

648  : array
649  {
650  global $DIC;
651 
652  $repository = $DIC->skills()->internal()->repo()->getTreeRepo();
653 
654  return $repository->getLevelIdForImportId($a_source_inst_id, $a_level_import_id);
655  }
global $DIC
Definition: shib_login.php:26
+ 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 657 of file class.ilBasicSkill.php.

References lookupLevelSkillId().

Referenced by ilSurveyDataSet\importRecord().

662  : array {
663  $level_id_data = self::getLevelIdForImportId($a_source_inst_id, $a_level_import_id);
664  $skill_data = self::getCommonSkillIdForImportId($a_source_inst_id, $a_skill_import_id, $a_tref_import_id);
665  $matches = [];
666  foreach ($level_id_data as $l) {
667  reset($skill_data);
668  foreach ($skill_data as $s) {
669  if (ilBasicSkill::lookupLevelSkillId($l["level_id"]) == $s["skill_id"]) {
670  $matches[] = array(
671  "level_id" => $l["level_id"],
672  "creation_date" => $l["creation_date"],
673  "skill_id" => $s["skill_id"],
674  "tref_id" => $s["tref_id"]
675  );
676  }
677  }
678  }
679  return $matches;
680  }
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 515 of file class.ilBasicSkill.php.

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

519  : int {
520  if ($a_user_id == 0) {
521  $a_user_id = $this->user->getId();
522  }
523  $skill_id = $this->getId();
524  $levels = $this->getLevelData();
525 
526  return $this->bsc_skl_usr_lvl_db_rep->getMaxLevel($skill_id, $levels, $a_tref_id, $a_user_id, $a_self_eval);
527  }
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,
string  $trigger_user = "" 
)

Definition at line 450 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  $trigger_user
471  );
472  }
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 377 of file class.ilBasicSkill.php.

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

382  : int {
383  if ($a_user_id == 0) {
384  $a_user_id = $this->user->getId();
385  }
386  $skill_id = $this->getId();
387  $levels = $this->getLevelData();
388 
389  return $this->bsc_skl_usr_lvl_db_rep->getMaxLevelPerType(
390  $skill_id,
391  $levels,
392  $a_tref_id,
393  $a_type,
394  $a_user_id,
395  $a_self_eval
396  );
397  }
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 268 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

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

273  : array {
274  global $DIC;
275 
276  $ilDB = $DIC->database();
277 
278  $repository = new ilSkillUserLevelDBRepository($ilDB);
279 
280  return $repository->getNewAchievementsPerUser($a_timestamp, $a_timestamp_to, $a_user_id, $a_self_eval);
281  }
global $DIC
Definition: shib_login.php:26
+ 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 529 of file class.ilBasicSkill.php.

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

533  : float {
534  if ($a_user_id == 0) {
535  $a_user_id = $this->user->getId();
536  }
537  $skill_id = $this->getId();
538 
539  return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilment($skill_id, $a_tref_id, $a_user_id, $a_self_eval);
540  }
+ 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 495 of file class.ilBasicSkill.php.

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

500  : float {
501  if ($a_user_id == 0) {
502  $a_user_id = $this->user->getId();
503  }
504  $skill_id = $this->getId();
505 
506  return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilmentPerObject(
507  $skill_id,
508  $a_tref_id,
509  $a_object_id,
510  $a_user_id,
511  $a_self_eval
512  );
513  }
+ 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 399 of file class.ilBasicSkill.php.

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

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

◆ getShortTitleForCertificate()

ilBasicSkill::getShortTitleForCertificate ( )

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

607  : string
608  {
609  return "Skill";
610  }

◆ getSkillForLevelId()

ilBasicSkill::getSkillForLevelId ( int  $a_level_id)

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

References getSkillForLevelId().

Referenced by getSkillForLevelId().

193  : ?ilBasicSkill
194  {
195  return $this->bsc_skl_lvl_db_rep->getSkillForLevelId($a_level_id);
196  }
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 602 of file class.ilBasicSkill.php.

References ilSkillTreeNode\getTitle().

602  : string
603  {
604  return $this->getTitle();
605  }
+ Here is the call graph for this function:

◆ getUsageInfo()

static ilBasicSkill::getUsageInfo ( array  $a_cskill_ids)
static

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

References $DIC.

615  : array
616  {
617  global $DIC;
618 
619  $usage_manager = $DIC->skills()->internal()->manager()->getUsageManager();
620 
621  return $usage_manager->getUsageInfoGeneric(
622  $a_cskill_ids,
623  Usage\SkillUsageManager::USER_ASSIGNED,
624  "skl_user_skill_level",
625  "user_id"
626  );
627  }
global $DIC
Definition: shib_login.php:26

◆ 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 243 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

248  : string {
249  global $DIC;
250 
251  $ilDB = $DIC->database();
252 
253  $obj_adapter = new ilSkillObjectAdapter();
254  $trigger_obj_id = ($a_trigger_ref_id > 0)
255  ? $obj_adapter->getObjIdForRefId($a_trigger_ref_id)
256  : 0;
257  $repository = new ilSkillUserLevelDBRepository($ilDB);
258 
259  return $repository->hasRecentSelfEvaluation(
260  $trigger_obj_id,
261  $a_user_id,
262  $a_skill_id,
263  $a_tref_id,
264  $a_trigger_ref_id
265  );
266  }
Class ilBasicSkillObjectAdapter.
global $DIC
Definition: shib_login.php:26

◆ hasSelfEvaluated()

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

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

References $DIC, and $ilDB.

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

546  : bool {
547  global $DIC;
548 
549  $ilDB = $DIC->database();
550 
551  $repository = new ilSkillUserLevelDBRepository($ilDB);
552 
553  return $repository->hasSelfEvaluated($a_user_id, $a_skill_id, $a_tref_id);
554  }
global $DIC
Definition: shib_login.php:26
+ Here is the caller graph for this function:

◆ lookupLevelDescription()

static ilBasicSkill::lookupLevelDescription ( int  $a_id)
static

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

References $DIC.

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

◆ lookupLevelSkillId()

static ilBasicSkill::lookupLevelSkillId ( int  $a_id)
static

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

References $DIC.

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

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

◆ lookupLevelTitle()

static ilBasicSkill::lookupLevelTitle ( int  $a_id)
static

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

References $DIC.

Referenced by ilSkillProfileGUI\confirmLevelAssignmentRemoval(), ilBasicSkillGUI\confirmLevelDeletion(), ilSkillProfileLevelsTableGUI\fillRow(), ilPersonalSkillsGUI\getAllSuggestedResources(), ilSkillLearningHistoryProvider\getEntries(), ILIAS\Container\Skills\ContSkillMemberTableBuilder\getRetrieval(), ilSkillNotifications\sendMail(), ilBasicSkillTemplateGUI\setLevelHead(), and ilBasicSkillGUI\setLevelHead().

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

◆ read()

ilBasicSkill::read ( )

Read data from database.

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

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

◆ removeAllUserData()

static ilBasicSkill::removeAllUserData ( int  $a_user_id)
static

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

References $DIC, and $ilDB.

Referenced by ilSkillObjDeletionHandler\processDeletion().

367  : void
368  {
369  global $DIC;
370 
371  $ilDB = $DIC->database();
372 
373  $repository = new ilSkillUserLevelDBRepository($ilDB);
374  $repository->removeAllUserData($a_user_id);
375  }
global $DIC
Definition: shib_login.php:26
+ 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 344 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

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

349  : bool {
350  global $DIC;
351 
352  $ilDB = $DIC->database();
353 
354  if ($a_trigger_obj_id == 0) {
355  return false;
356  }
357  $repository = new ilSkillUserLevelDBRepository($ilDB);
358 
359  return $repository->removeAllUserSkillLevelStatusOfObject(
360  $a_user_id,
361  $a_trigger_obj_id,
362  $a_self_eval,
363  $a_unique_identifier
364  );
365  }
global $DIC
Definition: shib_login.php:26
+ 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 204 of file class.ilBasicSkill.php.

References $DIC, and $ilDB.

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

210  : void {
211  global $DIC;
212 
213  $ilDB = $DIC->database();
214 
215  if (!$a_self_eval) {
216  throw new ilSkillException("resetUserSkillLevelStatus currently only provided for self evaluations.");
217  }
218 
219  $obj_adapter = new ilSkillObjectAdapter();
220  $trigger_obj_id = ($a_trigger_ref_id > 0)
221  ? $obj_adapter->getObjIdForRefId($a_trigger_ref_id)
222  : 0;
223 
224  $update = false;
225  $repository = new ilSkillUserLevelDBRepository($ilDB);
226  $status_date = $repository->hasRecentSelfEvaluation($a_user_id, $a_skill_id, $a_tref_id, $a_trigger_ref_id);
227  if ($status_date != "") {
228  $update = true;
229  }
230 
231  $repository->resetUserSkillLevelStatus(
232  $update,
233  $trigger_obj_id,
234  $status_date,
235  $a_user_id,
236  $a_skill_id,
237  $a_tref_id,
238  $a_trigger_ref_id,
239  $a_self_eval
240  );
241  }
Class ilBasicSkillObjectAdapter.
global $DIC
Definition: shib_login.php:26
Skill exception class.
+ Here is the caller graph for this function:

◆ updateLevelOrder()

ilBasicSkill::updateLevelOrder ( array  $order)

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

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

◆ writeLevelDescription()

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

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

References $DIC.

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

◆ writeLevelTitle()

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

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

References $DIC.

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

◆ 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 283 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().

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

Referenced by __construct().

◆ $bsc_skl_tre_rep

ilSkillTreeRepository ilBasicSkill::$bsc_skl_tre_rep
protected

Definition at line 32 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 31 of file class.ilBasicSkill.php.

Referenced by __construct().

◆ $user

ilObjUser ilBasicSkill::$user
protected

Definition at line 29 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 38 of file class.ilBasicSkill.php.

Referenced by ilPersonalSkillsGUI\renderSkillHTML().

◆ EVAL_BY_SELF

◆ NOT_ACHIEVED

const ilBasicSkill::NOT_ACHIEVED = 0

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


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