ILIAS  trunk Revision v11.0_alpha-1851-ga8564da6fed
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 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:22
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 606 of file class.ilBasicSkill.php.

References $DIC.

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

610  : array {
611  global $DIC;
612 
613  if ($a_source_inst_id == 0) {
614  return [];
615  }
616 
617  $repository = $DIC->skills()->internal()->repo()->getTreeRepo();
618  return $repository->getCommonSkillIdForImportId(
619  $a_source_inst_id,
620  $a_skill_import_id,
621  $a_tref_import_id
622  );
623  }
global $DIC
Definition: shib_login.php:22
+ 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 533 of file class.ilBasicSkill.php.

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

538  : int {
539  if ($a_user_id == 0) {
540  $a_user_id = $this->user->getId();
541  }
542  $skill_id = $this->getId();
543 
544  return $this->bsc_skl_usr_lvl_db_rep->getLastLevelPerObject(
545  $skill_id,
546  $a_tref_id,
547  $a_object_id,
548  $a_user_id,
549  $a_self_eval
550  );
551  }
+ 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 553 of file class.ilBasicSkill.php.

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

558  : string {
559  if ($a_user_id == 0) {
560  $a_user_id = $this->user->getId();
561  }
562  $skill_id = $this->getId();
563 
564  return $this->bsc_skl_usr_lvl_db_rep->getLastUpdatePerObject(
565  $skill_id,
566  $a_tref_id,
567  $a_object_id,
568  $a_user_id,
569  $a_self_eval
570  );
571  }
+ 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 625 of file class.ilBasicSkill.php.

References $DIC.

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

625  : array
626  {
627  global $DIC;
628 
629  $repository = $DIC->skills()->internal()->repo()->getTreeRepo();
630 
631  return $repository->getLevelIdForImportId($a_source_inst_id, $a_level_import_id);
632  }
global $DIC
Definition: shib_login.php:22
+ 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 634 of file class.ilBasicSkill.php.

References lookupLevelSkillId().

Referenced by ilSurveyDataSet\importRecord().

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

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

496  : int {
497  if ($a_user_id == 0) {
498  $a_user_id = $this->user->getId();
499  }
500  $skill_id = $this->getId();
501  $levels = $this->getLevelData();
502 
503  return $this->bsc_skl_usr_lvl_db_rep->getMaxLevel($skill_id, $levels, $a_tref_id, $a_user_id, $a_self_eval);
504  }
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 450 of file class.ilBasicSkill.php.

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

455  : int {
456  if ($a_user_id == 0) {
457  $a_user_id = $this->user->getId();
458  }
459  $skill_id = $this->getId();
460  $levels = $this->getLevelData();
461 
462  return $this->bsc_skl_usr_lvl_db_rep->getMaxLevelPerObject(
463  $skill_id,
464  $levels,
465  $a_tref_id,
466  $a_object_id,
467  $a_user_id,
468  $a_self_eval
469  );
470  }
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:22
+ 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 506 of file class.ilBasicSkill.php.

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

510  : float {
511  if ($a_user_id == 0) {
512  $a_user_id = $this->user->getId();
513  }
514  $skill_id = $this->getId();
515 
516  return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilment($skill_id, $a_tref_id, $a_user_id, $a_self_eval);
517  }
+ 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 472 of file class.ilBasicSkill.php.

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

477  : float {
478  if ($a_user_id == 0) {
479  $a_user_id = $this->user->getId();
480  }
481  $skill_id = $this->getId();
482 
483  return $this->bsc_skl_usr_lvl_db_rep->getNextLevelFulfilmentPerObject(
484  $skill_id,
485  $a_tref_id,
486  $a_object_id,
487  $a_user_id,
488  $a_self_eval
489  );
490  }
+ 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 584 of file class.ilBasicSkill.php.

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

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

References ilSkillTreeNode\getTitle().

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

◆ getUsageInfo()

static ilBasicSkill::getUsageInfo ( array  $a_cskill_ids)
static

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

References $DIC.

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

◆ 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:22

◆ hasSelfEvaluated()

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

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

References $DIC, and $ilDB.

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

523  : bool {
524  global $DIC;
525 
526  $ilDB = $DIC->database();
527 
528  $repository = new ilSkillUserLevelDBRepository($ilDB);
529 
530  return $repository->hasSelfEvaluated($a_user_id, $a_skill_id, $a_tref_id);
531  }
global $DIC
Definition: shib_login.php:22
+ 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:22

◆ 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:22
+ 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(), ilContSkillMemberTableGUI\fillRow(), ilPersonalSkillsGUI\getAllSuggestedResources(), ilSkillLearningHistoryProvider\getEntries(), 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:22
+ 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:22
+ 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:22
+ 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:22
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:22

◆ 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:22

◆ 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:22
+ 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: