ILIAS  release_8 Revision v8.24
ilBasicSkill 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 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...
 
 delete ()
 Delete 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)
 Get title of an assigned item. More...
 
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...
 
static getUsageInfo (array $a_cskill_ids)
 Get title of an assigned item. 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

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 Basic Skill

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

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

44 {
45 global $DIC;
46
47 $this->user = $DIC->user();
48
49 if (is_null($bsc_skl_lvl_db_rep)) {
50 $this->bsc_skl_lvl_db_rep = $DIC->skills()->internal()->repo()->getLevelRepo();
51 } else {
52 $this->bsc_skl_lvl_db_rep = $bsc_skl_lvl_db_rep;
53 }
54
55 if (is_null($bsc_skl_usr_lvl_db_rep)) {
56 $this->bsc_skl_usr_lvl_db_rep = $DIC->skills()->internal()->repo()->getUserLevelRepo();
57 } else {
58 $this->bsc_skl_usr_lvl_db_rep = $bsc_skl_usr_lvl_db_rep;
59 }
60
61 if (is_null($bsc_skl_tre_rep)) {
62 $this->bsc_skl_tre_rep = $DIC->skills()->internal()->repo()->getTreeRepo();
63 } else {
64 $this->bsc_skl_tre_rep = $bsc_skl_tre_rep;
65 }
66
68 $this->setType("skll");
69 }
ilSkillTreeRepository $bsc_skl_tre_rep
ilSkillUserLevelRepository $bsc_skl_usr_lvl_db_rep
ilSkillLevelRepository $bsc_skl_lvl_db_rep
setType(string $a_type)
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ 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 129 of file class.ilBasicSkill.php.

129 : void
130 {
131 $skill_id = $this->getId();
132 $this->bsc_skl_lvl_db_rep->addLevel($skill_id, $a_title, $a_description, $a_import_id);
133 }

References ilSkillTreeNode\getId().

+ Here is the call graph for this function:

◆ copy()

ilBasicSkill::copy ( )

Copy basic skill.

Reimplemented in ilBasicSkillTemplate.

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

103 {
104 $skill = new ilBasicSkill();
105 $skill->setTitle($this->getTitle());
106 $skill->setDescription($this->getDescription());
107 $skill->setType($this->getType());
108 $skill->setSelfEvaluation($this->getSelfEvaluation());
109 $skill->setOrderNr($this->getOrderNr());
110 $skill->create();
111
112 $levels = $this->getLevelData();
113 if (sizeof($levels)) {
114 foreach ($levels as $item) {
115 $skill->addLevel($item["title"], $item["description"]);
116 }
117 }
118 $skill->update();
119
120 return $skill;
121 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getLevelData(int $a_id=0)

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

+ Here is the call graph for this function:

◆ create()

ilBasicSkill::create ( )

Create skill.

Reimplemented from ilSkillTreeNode.

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

82 : void
83 {
84 parent::create();
85 }

◆ delete()

ilBasicSkill::delete ( )

Delete skill.

Reimplemented from ilSkillTreeNode.

Reimplemented in ilBasicSkillTemplate.

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

90 : void
91 {
92 $skill_id = $this->getId();
93 $this->bsc_skl_lvl_db_rep->deleteLevelsOfSkill($skill_id);
94 $this->bsc_skl_usr_lvl_db_rep->deleteUserLevelsOfSkill($skill_id);
95
96 parent::delete();
97 }

References ilSkillTreeNode\getId().

+ Here is the call graph for this function:

◆ deleteLevel()

ilBasicSkill::deleteLevel ( int  $a_id)

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

191 : void
192 {
193 $this->bsc_skl_lvl_db_rep->deleteLevel($a_id);
194 }

◆ fixLevelNumbering()

ilBasicSkill::fixLevelNumbering ( )

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

196 : void
197 {
198 $skill_id = $this->getId();
199 $this->bsc_skl_lvl_db_rep->fixLevelNumbering($skill_id);
200 }

References ilSkillTreeNode\getId().

+ 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 441 of file class.ilBasicSkill.php.

445 : array {
446 if ($a_user_id == 0) {
447 $a_user_id = $this->user->getId();
448 }
449 $skill_id = $this->getId();
450
451 return $this->bsc_skl_usr_lvl_db_rep->getAllHistoricLevelEntriesOfUser(
452 $skill_id,
453 $a_tref_id,
454 $a_user_id,
455 $a_eval_by
456 );
457 }

References ILIAS\Repository\user().

+ 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 428 of file class.ilBasicSkill.php.

432 : array {
433 if ($a_user_id == 0) {
434 $a_user_id = $this->user->getId();
435 }
436 $skill_id = $this->getId();
437
438 return $this->bsc_skl_usr_lvl_db_rep->getAllLevelEntriesOfUser($skill_id, $a_tref_id, $a_user_id, $a_self_eval);
439 }

References ILIAS\Repository\user().

+ 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 608 of file class.ilBasicSkill.php.

612 : array {
613 global $DIC;
614
615 if ($a_source_inst_id == 0) {
616 return [];
617 }
618
619 $repository = $DIC->skills()->internal()->repo()->getTreeRepo();
620 return $repository->getCommonSkillIdForImportId(
621 $a_source_inst_id,
622 $a_skill_import_id,
623 $a_tref_import_id
624 );
625 }

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

+ 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 542 of file class.ilBasicSkill.php.

547 : ?int {
548 if ($a_user_id == 0) {
549 $a_user_id = $this->user->getId();
550 }
551 $skill_id = $this->getId();
552
553 return $this->bsc_skl_usr_lvl_db_rep->getLastLevelPerObject(
554 $skill_id,
555 $a_tref_id,
556 $a_object_id,
557 $a_user_id,
558 $a_self_eval
559 );
560 }

References ILIAS\Repository\user().

+ 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 562 of file class.ilBasicSkill.php.

567 : ?string {
568 if ($a_user_id == 0) {
569 $a_user_id = $this->user->getId();
570 }
571 $skill_id = $this->getId();
572
573 return $this->bsc_skl_usr_lvl_db_rep->getLastUpdatePerObject(
574 $skill_id,
575 $a_tref_id,
576 $a_object_id,
577 $a_user_id,
578 $a_self_eval
579 );
580 }

References ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getLevelData()

ilBasicSkill::getLevelData ( int  $a_id = 0)

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

135 : array
136 {
137 $skill_id = $this->getId();
138
139 return $this->bsc_skl_lvl_db_rep->getLevelData($skill_id, $a_id);
140 }

References ilSkillTreeNode\getId().

Referenced by copy(), and ilBasicSkillTemplate\copy().

+ 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 627 of file class.ilBasicSkill.php.

627 : array
628 {
629 global $DIC;
630
631 $repository = $DIC->skills()->internal()->repo()->getTreeRepo();
632
633 return $repository->getLevelIdForImportId($a_source_inst_id, $a_level_import_id);
634 }

References $DIC.

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

+ 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 636 of file class.ilBasicSkill.php.

641 : array {
642 $level_id_data = self::getLevelIdForImportId($a_source_inst_id, $a_level_import_id);
643 $skill_data = self::getCommonSkillIdForImportId($a_source_inst_id, $a_skill_import_id, $a_tref_import_id);
644 $matches = [];
645 foreach ($level_id_data as $l) {
646 reset($skill_data);
647 foreach ($skill_data as $s) {
648 if (ilBasicSkill::lookupLevelSkillId($l["level_id"]) == $s["skill_id"]) {
649 $matches[] = array(
650 "level_id" => $l["level_id"],
651 "creation_date" => $l["creation_date"],
652 "skill_id" => $s["skill_id"],
653 "tref_id" => $s["tref_id"]
654 );
655 }
656 }
657 }
658 return $matches;
659 }
static lookupLevelSkillId(int $a_id)
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)

Referenced by ilSurveyDataSet\importRecord().

+ 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 501 of file class.ilBasicSkill.php.

505 : int {
506 if ($a_user_id == 0) {
507 $a_user_id = $this->user->getId();
508 }
509 $skill_id = $this->getId();
510 $levels = $this->getLevelData();
511
512 return $this->bsc_skl_usr_lvl_db_rep->getMaxLevel($skill_id, $levels, $a_tref_id, $a_user_id, $a_self_eval);
513 }

References ILIAS\Repository\user().

+ 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 459 of file class.ilBasicSkill.php.

464 : int {
465 if ($a_user_id == 0) {
466 $a_user_id = $this->user->getId();
467 }
468 $skill_id = $this->getId();
469 $levels = $this->getLevelData();
470
471 return $this->bsc_skl_usr_lvl_db_rep->getMaxLevelPerObject(
472 $skill_id,
473 $levels,
474 $a_tref_id,
475 $a_object_id,
476 $a_user_id,
477 $a_self_eval
478 );
479 }

References ILIAS\Repository\user().

+ 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 386 of file class.ilBasicSkill.php.

391 : int {
392 if ($a_user_id == 0) {
393 $a_user_id = $this->user->getId();
394 }
395 $skill_id = $this->getId();
396 $levels = $this->getLevelData();
397
398 return $this->bsc_skl_usr_lvl_db_rep->getMaxLevelPerType(
399 $skill_id,
400 $levels,
401 $a_tref_id,
402 $a_type,
403 $a_user_id,
404 $a_self_eval
405 );
406 }

References ILIAS\Repository\user().

+ 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 277 of file class.ilBasicSkill.php.

282 : array {
283 global $DIC;
284
285 $ilDB = $DIC->database();
286
287 $repository = new ilSkillUserLevelDBRepository($ilDB);
288
289 return $repository->getNewAchievementsPerUser($a_timestamp, $a_timestamp_to, $a_user_id, $a_self_eval);
290 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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

+ 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 515 of file class.ilBasicSkill.php.

519 : float {
520 if ($a_user_id == 0) {
521 $a_user_id = $this->user->getId();
522 }
523 $skill_id = $this->getId();
524
525 return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilment($skill_id, $a_tref_id, $a_user_id, $a_self_eval);
526 }

References ILIAS\Repository\user().

+ 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 481 of file class.ilBasicSkill.php.

486 : float {
487 if ($a_user_id == 0) {
488 $a_user_id = $this->user->getId();
489 }
490 $skill_id = $this->getId();
491
492 return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilmentPerObject(
493 $skill_id,
494 $a_tref_id,
495 $a_object_id,
496 $a_user_id,
497 $a_self_eval
498 );
499 }

References ILIAS\Repository\user().

+ 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 408 of file class.ilBasicSkill.php.

413 : float {
414 if ($a_user_id == 0) {
415 $a_user_id = $this->user->getId();
416 }
417 $skill_id = $this->getId();
418
419 return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilmentPerType(
420 $skill_id,
421 $a_tref_id,
422 $a_type,
423 $a_user_id,
424 $a_self_eval
425 );
426 }

References ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getShortTitleForCertificate()

ilBasicSkill::getShortTitleForCertificate ( )

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

593 : string
594 {
595 return "Skill";
596 }

◆ getSkillForLevelId()

ilBasicSkill::getSkillForLevelId ( int  $a_level_id)

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

202 : ?ilBasicSkill
203 {
204 return $this->bsc_skl_lvl_db_rep->getSkillForLevelId($a_level_id);
205 }
getSkillForLevelId(int $a_level_id)

References getSkillForLevelId().

Referenced by getSkillForLevelId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTitleForCertificate()

ilBasicSkill::getTitleForCertificate ( )

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

588 : string
589 {
590 return $this->getTitle();
591 }

◆ getUsageInfo()

static ilBasicSkill::getUsageInfo ( array  $a_cskill_ids)
static

Get title of an assigned item.

Parameters
array{skill_idint, tref_id: int}[] $a_cskill_ids array of common skill ids
Returns
array<string, array<string, array{key: string}[]>>

Implements ilSkillUsageInfo.

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

598 : array
599 {
601 $a_cskill_ids,
603 "skl_user_skill_level",
604 "user_id"
605 );
606 }
static getUsageInfoGeneric(array $a_cskill_ids, string $a_usage_type, string $a_table, string $a_key_field, string $a_skill_field="skill_id", string $a_tref_field="tref_id")
Get standard usage query.

References ilSkillUsage\getUsageInfoGeneric(), and ilSkillUsage\USER_ASSIGNED.

+ Here is the call graph for this function:

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

257 : string {
258 global $DIC;
259
260 $ilDB = $DIC->database();
261
262 $obj_adapter = new ilSkillObjectAdapter();
263 $trigger_obj_id = ($a_trigger_ref_id > 0)
264 ? $obj_adapter->getObjIdForRefId($a_trigger_ref_id)
265 : 0;
266 $repository = new ilSkillUserLevelDBRepository($ilDB);
267
268 return $repository->hasRecentSelfEvaluation(
269 $trigger_obj_id,
270 $a_user_id,
271 $a_skill_id,
272 $a_tref_id,
273 $a_trigger_ref_id
274 );
275 }
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 528 of file class.ilBasicSkill.php.

532 : bool {
533 global $DIC;
534
535 $ilDB = $DIC->database();
536
537 $repository = new ilSkillUserLevelDBRepository($ilDB);
538
539 return $repository->hasSelfEvaluated($a_user_id, $a_skill_id, $a_tref_id);
540 }

Referenced by ilPersonalSkillsGUI\listAssignedProfile().

+ Here is the caller graph for this function:

◆ lookupLevelDescription()

static ilBasicSkill::lookupLevelDescription ( int  $a_id)
static

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

151 : string
152 {
153 global $DIC;
154
155 $repository = $DIC->skills()->internal()->repo()->getLevelRepo();
156
157 return $repository->lookupLevelDescription($a_id);
158 }

References $DIC.

◆ lookupLevelSkillId()

static ilBasicSkill::lookupLevelSkillId ( int  $a_id)
static

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

160 : int
161 {
162 global $DIC;
163
164 $repository = $DIC->skills()->internal()->repo()->getLevelRepo();
165
166 return $repository->lookupLevelSkillId($a_id);
167 }

References $DIC.

Referenced by ilSkillDataSet\importRecord().

+ Here is the caller graph for this function:

◆ lookupLevelTitle()

static ilBasicSkill::lookupLevelTitle ( int  $a_id)
static

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

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

References $DIC.

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

+ Here is the caller graph for this function:

◆ read()

ilBasicSkill::read ( )

Read data from database.

Reimplemented from ilSkillTreeNode.

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

74 : void
75 {
76 parent::read();
77 }

◆ removeAllUserData()

static ilBasicSkill::removeAllUserData ( int  $a_user_id)
static

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

376 : void
377 {
378 global $DIC;
379
380 $ilDB = $DIC->database();
381
382 $repository = new ilSkillUserLevelDBRepository($ilDB);
383 $repository->removeAllUserData($a_user_id);
384 }

References $DIC, and $ilDB.

Referenced by ilSkillObjDeletionHandler\processDeletion().

+ 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 353 of file class.ilBasicSkill.php.

358 : bool {
359 global $DIC;
360
361 $ilDB = $DIC->database();
362
363 if ($a_trigger_obj_id == 0) {
364 return false;
365 }
366 $repository = new ilSkillUserLevelDBRepository($ilDB);
367
368 return $repository->removeAllUserSkillLevelStatusOfObject(
369 $a_user_id,
370 $a_trigger_obj_id,
371 $a_self_eval,
372 $a_unique_identifier
373 );
374 }

Referenced by ilContainerMemberSkills\publish(), and ilContainerMemberSkills\removeAllSkillLevels().

+ 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 213 of file class.ilBasicSkill.php.

219 : void {
220 global $DIC;
221
222 $ilDB = $DIC->database();
223
224 if (!$a_self_eval) {
225 throw new ilSkillException("resetUserSkillLevelStatus currently only provided for self evaluations.");
226 }
227
228 $obj_adapter = new ilSkillObjectAdapter();
229 $trigger_obj_id = ($a_trigger_ref_id > 0)
230 ? $obj_adapter->getObjIdForRefId($a_trigger_ref_id)
231 : 0;
232
233 $update = false;
234 $repository = new ilSkillUserLevelDBRepository($ilDB);
235 $status_date = $repository->hasRecentSelfEvaluation($a_user_id, $a_skill_id, $a_tref_id, $a_trigger_ref_id);
236 if ($status_date != "") {
237 $update = true;
238 }
239
240 $repository->resetUserSkillLevelStatus(
241 $update,
242 $trigger_obj_id,
243 $status_date,
244 $a_user_id,
245 $a_skill_id,
246 $a_tref_id,
247 $a_trigger_ref_id,
248 $a_self_eval
249 );
250 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$update
Definition: imgupload.php:92

◆ updateLevelOrder()

ilBasicSkill::updateLevelOrder ( array  $order)

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

185 : void
186 {
187 asort($order);
188 $this->bsc_skl_lvl_db_rep->updateLevelOrder($order);
189 }

◆ writeLevelDescription()

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

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

177 : void
178 {
179 global $DIC;
180
181 $repository = $DIC->skills()->internal()->repo()->getLevelRepo();
182 $repository->writeLevelDescription($a_id, $a_description);
183 }

References $DIC.

◆ writeLevelTitle()

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

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

169 : void
170 {
171 global $DIC;
172
173 $repository = $DIC->skills()->internal()->repo()->getLevelRepo();
174 $repository->writeLevelTitle($a_id, $a_title);
175 }

References $DIC.

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

303 : void {
304 global $DIC;
305
306 $ilDB = $DIC->database();
307
308 $skill_id = ilBasicSkill::lookupLevelSkillId($a_level_id);
309 $trigger_ref_id = $a_trigger_ref_id;
310 $obj_adapter = new ilSkillObjectAdapter();
311 $trigger_obj_id = $obj_adapter->getObjIdForRefId($trigger_ref_id);
312 $trigger_title = $obj_adapter->getTitleForObjId($trigger_obj_id);
313 $trigger_type = $obj_adapter->getTypeForObjId($trigger_obj_id);
314
315 $status_date = "";
316 $update = false;
317
318 // self evaluations will update, if the last self evaluation is on the same day
319 if ($a_self_eval && self::hasRecentSelfEvaluation($a_user_id, $skill_id, $a_tref_id, $trigger_ref_id)) {
320 $status_date = self::hasRecentSelfEvaluation($a_user_id, $skill_id, $a_tref_id, $trigger_ref_id);
321 if ($status_date != "") {
322 $update = true;
323 }
324 }
325
326 //next level percentage fulfilment value must be >=0 and <1
327 if (!($a_next_level_fulfilment >= 0) || !($a_next_level_fulfilment < 1)) {
328 throw new \UnexpectedValueException(
329 "Next level fulfilment must be equal to or greater than 0 and less than 1, '" .
330 $a_next_level_fulfilment . "' given."
331 );
332 }
333
334 $repository = new ilSkillUserLevelDBRepository($ilDB);
335 $repository->writeUserSkillLevelStatus(
336 $skill_id,
337 $trigger_ref_id,
338 $trigger_obj_id,
339 $trigger_title,
340 $trigger_type,
341 $update,
342 $status_date,
343 $a_level_id,
344 $a_user_id,
345 $a_tref_id,
346 $a_self_eval,
347 $a_unique_identifier,
348 $a_next_level_fulfilment,
349 $trigger_user_id
350 );
351 }
static hasRecentSelfEvaluation(int $a_user_id, int $a_skill_id, int $a_tref_id=0, int $a_trigger_ref_id=0)

Referenced by ilSkillAppEventListener\handleEvent(), ilTestSkillEvaluation\invokeSkillLevelTrigger(), ilContainerMemberSkills\publish(), ilPersonalSkill\saveSelfEvaluation(), ilSurveySkill\writeAndAddAppraiseeSkills(), ilSurveySkill\writeAndAddIndFeedbackSkills(), and ilSurveySkill\writeAndAddSelfEvalSkills().

+ 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 27 of file class.ilBasicSkill.php.

Referenced by __construct().

◆ $bsc_skl_tre_rep

ilSkillTreeRepository ilBasicSkill::$bsc_skl_tre_rep
protected

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

Referenced by __construct().

◆ $user

ilObjUser ilBasicSkill::$user
protected

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

◆ ACHIEVED

◆ EVAL_BY_ALL

const ilBasicSkill::EVAL_BY_ALL = 2

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

◆ EVAL_BY_OTHERS

const ilBasicSkill::EVAL_BY_OTHERS = 0

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

◆ EVAL_BY_SELF

const ilBasicSkill::EVAL_BY_SELF = 1

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

Referenced by ilPersonalSkillsGUI\getSkillEntriesHeader().

◆ NOT_ACHIEVED

const ilBasicSkill::NOT_ACHIEVED = 0

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


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