5 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
6 include_once(
"./Services/Skill/interfaces/interface.ilSkillUsageInfo.php");
45 $this->db = $DIC->database();
46 $this->
user = $DIC->user();
71 public function delete()
76 "DELETE FROM skl_level WHERE " 77 .
" skill_id = " .
$ilDB->quote($this->getId(),
"integer")
81 "DELETE FROM skl_user_has_level WHERE " 82 .
" skill_id = " .
$ilDB->quote($this->getId(),
"integer")
96 $skill->setType($this->
getType());
102 if (
sizeof($levels)) {
103 foreach ($levels as $item) {
104 $skill->addLevel($item[
"title"], $item[
"description"]);
124 public function addLevel($a_title, $a_description, $a_import_id =
"")
129 $nid =
$ilDB->nextId(
"skl_level");
130 $ilDB->insert(
"skl_level", array(
131 "id" => array(
"integer", $nid),
132 "skill_id" => array(
"integer", $this->
getId()),
133 "nr" => array(
"integer", $nr + 1),
134 "title" => array(
"text", $a_title),
135 "description" => array(
"clob", $a_description),
136 "import_id" => array(
"text", $a_import_id),
137 "creation_date" => array(
"timestamp",
ilUtil::now())
151 "SELECT MAX(nr) mnr FROM skl_level WHERE " .
152 " skill_id = " .
$ilDB->quote($this->getId(),
"integer")
154 $rec =
$ilDB->fetchAssoc($set);
155 return (
int) $rec[
"mnr"];
168 $and =
" AND id = " .
$ilDB->quote($a_id,
"integer");
172 "SELECT * FROM skl_level WHERE " .
173 " skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
178 while ($rec =
$ilDB->fetchAssoc($set)) {
197 $ilDB = $DIC->database();
200 "SELECT $a_prop FROM skl_level WHERE " .
201 " id = " .
$ilDB->quote($a_id,
"integer")
203 $rec =
$ilDB->fetchAssoc($set);
204 return $rec[$a_prop];
250 $ilDB = $DIC->database();
252 $ilDB->update(
"skl_level", array(
253 $a_prop => array(
$a_type, $a_value),
255 "id" => array(
"integer", $a_id),
294 foreach ($order as
$id => $o) {
296 "UPDATE skl_level SET " .
297 " nr = " .
$ilDB->quote($cnt,
"integer") .
298 " WHERE id = " .
$ilDB->quote(
$id,
"integer")
315 "DELETE FROM skl_level WHERE " 316 .
" id = " .
$ilDB->quote($a_id,
"integer")
331 "SELECT id, nr FROM skl_level WHERE " .
332 " skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
336 while ($rec =
$ilDB->fetchAssoc($set)) {
338 "UPDATE skl_level SET " .
339 " nr = " .
$ilDB->quote($cnt,
"integer") .
340 " WHERE id = " .
$ilDB->quote($rec[
"id"],
"integer")
357 "SELECT * FROM skl_level WHERE " .
358 " id = " .
$ilDB->quote($a_level_id,
"integer")
361 if ($rec =
$ilDB->fetchAssoc($set)) {
392 $db = $DIC->database();
395 include_once(
"./Services/Skill/exceptions/class.ilSkillException.php");
396 throw new ilSkillException(
"resetUserSkillLevelStatus currently only provided for self evaluations.");
399 $trigger_obj_id = ($a_trigger_ref_id > 0)
404 $status_date = self::hasRecentSelfEvaluation($a_user_id, $a_skill_id, $a_tref_id, $a_trigger_ref_id);
405 if ($status_date !=
"") {
413 "UPDATE skl_user_skill_level SET " .
414 " level_id = " .
$db->quote(0,
"integer") .
"," .
415 " status_date = " .
$db->quote($now,
"timestamp") .
416 " WHERE user_id = " .
$db->quote($a_user_id,
"integer") .
417 " AND status_date = " .
$db->quote($status_date,
"timestamp") .
418 " AND skill_id = " .
$db->quote($a_skill_id,
"integer") .
419 " AND status = " .
$db->quote(self::ACHIEVED,
"integer") .
420 " AND trigger_obj_id = " .
$db->quote($trigger_obj_id,
"integer") .
421 " AND tref_id = " .
$db->quote((
int) $a_tref_id,
"integer") .
422 " AND self_eval = " .
$db->quote($a_self_eval,
"integer")
426 $db->manipulate(
"INSERT INTO skl_user_skill_level " .
427 "(level_id, user_id, tref_id, status_date, skill_id, status, valid, trigger_ref_id," .
428 "trigger_obj_id, trigger_obj_type, trigger_title, self_eval, unique_identifier) VALUES (" .
429 $db->quote(0,
"integer") .
"," .
430 $db->quote($a_user_id,
"integer") .
"," .
431 $db->quote((
int) $a_tref_id,
"integer") .
"," .
432 $db->quote($now,
"timestamp") .
"," .
433 $db->quote($a_skill_id,
"integer") .
"," .
434 $db->quote(self::ACHIEVED,
"integer") .
"," .
435 $db->quote(1,
"integer") .
"," .
436 $db->quote($a_trigger_ref_id,
"integer") .
"," .
437 $db->quote($trigger_obj_id,
"integer") .
"," .
438 $db->quote(
"",
"text") .
"," .
439 $db->quote(
"",
"text") .
"," .
440 $db->quote($a_self_eval,
"integer") .
"," .
441 $db->quote(
"",
"text") .
446 "DELETE FROM skl_user_has_level WHERE " 447 .
" user_id = " .
$db->quote($a_user_id,
"integer")
448 .
" AND skill_id = " .
$db->quote($a_skill_id,
"integer")
449 .
" AND tref_id = " .
$db->quote((
int) $a_tref_id,
"integer")
450 .
" AND trigger_obj_id = " .
$db->quote($trigger_obj_id,
"integer")
451 .
" AND self_eval = " .
$db->quote($a_self_eval,
"integer")
466 $db = $DIC->database();
468 $trigger_obj_id = ($a_trigger_ref_id > 0)
476 "SELECT * FROM skl_user_skill_level WHERE " .
477 "skill_id = " .
$db->quote($a_skill_id,
"integer") .
" AND " .
478 "user_id = " .
$db->quote($a_user_id,
"integer") .
" AND " .
479 "tref_id = " .
$db->quote((
int) $a_tref_id,
"integer") .
" AND " .
480 "trigger_obj_id = " .
$db->quote($trigger_obj_id,
"integer") .
" AND " .
481 "self_eval = " .
$db->quote(1,
"integer") .
482 " ORDER BY status_date DESC" 484 $rec =
$db->fetchAssoc($set);
485 $status_day = substr($rec[
"status_date"], 0, 10);
488 $recent = $rec[
"status_date"];
504 $db = $DIC->database();
506 $to = (!is_null($a_timestamp_to))
507 ?
" AND status_date <= " .
$db->quote($a_timestamp_to,
"timestamp")
510 $user = ($a_user_id > 0)
511 ?
" AND user_id = " .
$db->quote($a_user_id,
"integer")
514 $set =
$db->query(
"SELECT * FROM skl_user_skill_level " .
515 " WHERE status_date >= " .
$db->quote($a_timestamp,
"timestamp") .
516 " AND valid = " .
$db->quote(1,
"integer") .
518 " AND self_eval = " .
$db->quote($a_self_eval,
"integer") .
521 " ORDER BY user_id, status_date ASC ");
522 $achievments = array();
523 while ($rec =
$db->fetchAssoc($set)) {
524 $achievments[$rec[
"user_id"]][] = $rec;
550 $a_self_eval =
false,
551 $a_unique_identifier =
"" 555 $ilDB = $DIC->database();
558 $trigger_ref_id = $a_trigger_ref_id;
566 if ($a_self_eval && self::hasRecentSelfEvaluation($a_user_id, $skill_id, $a_tref_id, $trigger_ref_id)) {
567 $status_date = self::hasRecentSelfEvaluation($a_user_id, $skill_id, $a_tref_id, $trigger_ref_id);
568 if ($status_date !=
"") {
577 "UPDATE skl_user_skill_level SET " .
578 " level_id = " .
$ilDB->quote($a_level_id,
"integer") .
"," .
579 " status_date = " .
$ilDB->quote($now,
"timestamp") .
580 " WHERE user_id = " .
$ilDB->quote($a_user_id,
"integer") .
581 " AND status_date = " .
$ilDB->quote($status_date,
"timestamp") .
582 " AND skill_id = " .
$ilDB->quote($skill_id,
"integer") .
583 " AND status = " .
$ilDB->quote($a_status,
"integer") .
584 " AND trigger_obj_id = " .
$ilDB->quote($trigger_obj_id,
"integer") .
585 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
586 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
589 if ($a_unique_identifier !=
"") {
591 "DELETE FROM skl_user_skill_level WHERE " .
592 " user_id = " .
$ilDB->quote($a_user_id,
"integer") .
593 " AND tref_id = " .
$ilDB->quote($a_tref_id,
"integer") .
594 " AND skill_id = " .
$ilDB->quote($skill_id,
"integer") .
595 " AND trigger_ref_id = " .
$ilDB->quote($trigger_ref_id,
"integer") .
596 " AND trigger_obj_id = " .
$ilDB->quote($trigger_obj_id,
"integer") .
597 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer") .
598 " AND unique_identifier = " .
$ilDB->quote($a_unique_identifier,
"text")
603 $ilDB->manipulate(
"INSERT INTO skl_user_skill_level " .
604 "(level_id, user_id, tref_id, status_date, skill_id, status, valid, trigger_ref_id," .
605 "trigger_obj_id, trigger_obj_type, trigger_title, self_eval, unique_identifier) VALUES (" .
606 $ilDB->quote($a_level_id,
"integer") .
"," .
607 $ilDB->quote($a_user_id,
"integer") .
"," .
608 $ilDB->quote((
int) $a_tref_id,
"integer") .
"," .
609 $ilDB->quote($now,
"timestamp") .
"," .
610 $ilDB->quote($skill_id,
"integer") .
"," .
611 $ilDB->quote($a_status,
"integer") .
"," .
612 $ilDB->quote(1,
"integer") .
"," .
613 $ilDB->quote($trigger_ref_id,
"integer") .
"," .
614 $ilDB->quote($trigger_obj_id,
"integer") .
"," .
615 $ilDB->quote($trigger_type,
"text") .
"," .
616 $ilDB->quote($trigger_title,
"text") .
"," .
617 $ilDB->quote($a_self_eval,
"integer") .
"," .
618 $ilDB->quote($a_unique_identifier,
"text") .
625 "DELETE FROM skl_user_has_level WHERE " 626 .
" user_id = " .
$ilDB->quote($a_user_id,
"integer")
627 .
" AND skill_id = " .
$ilDB->quote($skill_id,
"integer")
628 .
" AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer")
629 .
" AND trigger_obj_id = " .
$ilDB->quote($trigger_obj_id,
"integer")
630 .
" AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
634 $ilDB->manipulate(
"INSERT INTO skl_user_has_level " .
635 "(level_id, user_id, tref_id, status_date, skill_id, trigger_ref_id, trigger_obj_id, trigger_obj_type, trigger_title, self_eval) VALUES (" .
636 $ilDB->quote($a_level_id,
"integer") .
"," .
637 $ilDB->quote($a_user_id,
"integer") .
"," .
638 $ilDB->quote($a_tref_id,
"integer") .
"," .
639 $ilDB->quote($now,
"timestamp") .
"," .
640 $ilDB->quote($skill_id,
"integer") .
"," .
641 $ilDB->quote($trigger_ref_id,
"integer") .
"," .
642 $ilDB->quote($trigger_obj_id,
"integer") .
"," .
643 $ilDB->quote($trigger_type,
"text") .
"," .
644 $ilDB->quote($trigger_title,
"text") .
"," .
645 $ilDB->quote($a_self_eval,
"integer") .
663 $db = $DIC->database();
665 if ($a_trigger_obj_id == 0) {
671 $aff_rows =
$db->manipulate(
672 "DELETE FROM skl_user_skill_level WHERE " 673 .
" user_id = " .
$db->quote($a_user_id,
"integer")
674 .
" AND trigger_obj_id = " .
$db->quote($a_trigger_obj_id,
"integer")
675 .
" AND self_eval = " .
$db->quote($a_self_eval,
"integer")
676 .
" AND unique_identifier = " .
$db->quote($a_unique_identifier,
"text")
682 $aff_rows =
$db->manipulate(
683 "DELETE FROM skl_user_has_level WHERE " 684 .
" user_id = " .
$db->quote($a_user_id,
"integer")
685 .
" AND trigger_obj_id = " .
$db->quote($a_trigger_obj_id,
"integer")
686 .
" AND self_eval = " .
$db->quote($a_self_eval,
"integer")
703 $db = $DIC->database();
706 "DELETE FROM skl_user_skill_level WHERE " 707 .
" user_id = " .
$db->quote($a_user_id,
"integer")
710 "DELETE FROM skl_user_has_level WHERE " 711 .
" user_id = " .
$db->quote($a_user_id,
"integer")
727 if ($a_user_id == 0) {
732 $q =
"SELECT level_id FROM skl_user_has_level " .
733 " WHERE trigger_obj_type = " .
$ilDB->quote(
$a_type,
"text") .
734 " AND skill_id = " .
$ilDB->quote($this->
getId(),
"integer") .
735 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
736 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
737 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
740 $has_level = array();
741 while ($rec =
$ilDB->fetchAssoc($set)) {
742 $has_level[$rec[
"level_id"]] =
true;
746 if (isset($has_level[$l[
"id"]])) {
747 $max_level = $l[
"id"];
764 if ($a_user_id == 0) {
769 $q =
"SELECT * FROM skl_user_has_level " .
770 " WHERE skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
771 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
772 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
773 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer") .
774 " ORDER BY status_date DESC" 778 while ($rec =
$ilDB->fetchAssoc($set)) {
795 if ($a_user_id == 0) {
799 $by = ($a_eval_by != self::EVAL_BY_ALL)
800 ?
" AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
804 $q =
"SELECT * FROM skl_user_skill_level " .
805 " WHERE skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
806 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
807 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
809 " ORDER BY status_date DESC" 812 while ($rec =
$ilDB->fetchAssoc($set)) {
830 if ($a_user_id == 0) {
835 $q =
"SELECT level_id FROM skl_user_has_level " .
836 " WHERE trigger_obj_id = " .
$ilDB->quote($a_object_id,
"integer") .
837 " AND skill_id = " .
$ilDB->quote($this->
getId(),
"integer") .
838 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
839 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
840 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
843 $has_level = array();
844 while ($rec =
$ilDB->fetchAssoc($set)) {
845 $has_level[$rec[
"level_id"]] =
true;
849 if (isset($has_level[$l[
"id"]])) {
850 $max_level = $l[
"id"];
862 public function getMaxLevel($a_tref_id, $a_user_id = 0, $a_self_eval = 0)
867 if ($a_user_id == 0) {
872 $q =
"SELECT level_id FROM skl_user_has_level " .
873 " WHERE skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
874 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
875 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
876 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
879 $has_level = array();
880 while ($rec =
$ilDB->fetchAssoc($set)) {
881 $has_level[$rec[
"level_id"]] =
true;
885 if (isset($has_level[$l[
"id"]])) {
886 $max_level = $l[
"id"];
905 $db = $DIC->database();
908 $q =
"SELECT level_id FROM skl_user_has_level " .
909 " WHERE skill_id = " .
$db->quote((
int) $a_skill_id,
"integer") .
910 " AND tref_id = " .
$db->quote((
int) $a_tref_id,
"integer") .
911 " AND user_id = " .
$db->quote($a_user_id,
"integer") .
912 " AND self_eval = " .
$db->quote(1,
"integer")
915 if ($rec =
$db->fetchAssoc($set)) {
932 if ($a_user_id == 0) {
938 $q =
"SELECT level_id FROM skl_user_has_level " .
939 " WHERE trigger_obj_id = " .
$ilDB->quote($a_object_id,
"integer") .
940 " AND skill_id = " .
$ilDB->quote($this->
getId(),
"integer") .
941 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
942 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
943 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer") .
944 " ORDER BY status_date DESC" 947 $rec =
$ilDB->fetchAssoc($set);
949 return $rec[
"level_id"];
963 if ($a_user_id == 0) {
969 $q =
"SELECT status_date FROM skl_user_has_level " .
970 " WHERE trigger_obj_id = " .
$ilDB->quote($a_object_id,
"integer") .
971 " AND skill_id = " .
$ilDB->quote($this->
getId(),
"integer") .
972 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
973 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
974 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer") .
975 " ORDER BY status_date DESC" 978 $rec =
$ilDB->fetchAssoc($set);
980 return $rec[
"status_date"];
1019 $certificatefile = CLIENT_WEB_DIR .
"/certificates/skill/" .
1020 ((int) $a_skill_id) .
"/" . ((int) $a_skill_level_id) .
"/certificate.xml";
1021 if (@file_exists($certificatefile)) {
1038 $ilDB = $DIC->database();
1040 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
1045 "skl_user_skill_level",
1062 $ilDB = $DIC->database();
1064 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
1065 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
1068 if ($a_source_inst_id == 0) {
1072 $template_ids = array();
1073 if ($a_tref_import_id > 0) {
1074 $skill_node_type =
"sktp";
1077 $set =
$ilDB->query(
"SELECT * FROM skl_tree_node n JOIN skl_tree t ON (n.obj_id = t.child) " .
1078 " WHERE n.import_id = " .
$ilDB->quote(
"il_" . ((
int) $a_source_inst_id) .
"_sktr_" . $a_tref_import_id,
"text") .
1079 " ORDER BY n.creation_date DESC ");
1080 while ($rec =
$ilDB->fetchAssoc($set)) {
1082 $template_ids[$t] = $rec[
"obj_id"];
1086 $skill_node_type =
"skll";
1088 $set =
$ilDB->query(
"SELECT * FROM skl_tree_node n JOIN skl_tree t ON (n.obj_id = t.child) " .
1089 " WHERE n.import_id = " .
$ilDB->quote(
"il_" . ((
int) $a_source_inst_id) .
"_" . $skill_node_type .
"_" . $a_skill_import_id,
"text") .
1090 " ORDER BY n.creation_date DESC ");
1092 while ($rec =
$ilDB->fetchAssoc($set)) {
1093 $matching_trefs = array();
1094 if ($a_tref_import_id > 0) {
1095 $skill_template_id = $tree->getTopParentNodeId($rec[
"obj_id"]);
1098 foreach ($template_ids as $templ => $tref) {
1099 if ($skill_template_id == $templ) {
1100 $matching_trefs[] = $tref;
1104 $matching_trefs = array(0);
1107 foreach ($matching_trefs as $t) {
1108 $results[] = array(
"skill_id" => $rec[
"obj_id"],
"tref_id" => $t,
"creation_date" => $rec[
"creation_date"]);
1125 $ilDB = $DIC->database();
1127 $set =
$ilDB->query(
"SELECT * FROM skl_level l JOIN skl_tree t ON (l.skill_id = t.child) " .
1128 " WHERE l.import_id = " .
$ilDB->quote(
"il_" . ((
int) $a_source_inst_id) .
"_sklv_" . $a_level_import_id,
"text") .
1129 " ORDER BY l.creation_date DESC ");
1131 while ($rec =
$ilDB->fetchAssoc($set)) {
1132 $results[] = array(
"level_id" => $rec[
"id"],
"creation_date" => $rec[
"creation_date"]);
1145 $level_id_data = self::getLevelIdForImportId($a_source_inst_id, $a_level_import_id);
1146 $skill_data = self::getCommonSkillIdForImportId($a_source_inst_id, $a_skill_import_id, $a_tref_import_id);
1148 foreach ($level_id_data as $l) {
1150 foreach ($skill_data as $s) {
1153 "level_id" => $l[
"level_id"],
1154 "creation_date" => $l[
"creation_date"],
1155 "skill_id" => $s[
"skill_id"],
1156 "tref_id" => $s[
"tref_id"]
Get info on usages of skills.
getShortTitleForCertificate()
Get short title for certificate.
setType($a_type)
Set type.
addLevel($a_title, $a_description, $a_import_id="")
Add new level.
getDescription()
Get description.
getLevelData($a_id=0)
Get level data.
static lookupLevelTitle($a_id)
Lookup level title.
getLastLevelPerObject($a_tref_id, $a_object_id, $a_user_id=0, $a_self_eval=0)
Get last level set per object.
static getLevelIdForImportId($a_source_inst_id, $a_level_import_id)
Get level ids for import IDs (newest first)
getMaxLevel($a_tref_id, $a_user_id=0, $a_self_eval=0)
Get max levels per object.
getSkillForLevelId($a_level_id)
Get skill for level id.
static getNewAchievementsPerUser($a_timestamp, $a_timestamp_to=null, $a_user_id=0, $a_self_eval=0)
Get new achievements.
getMaxLevelNr()
Get maximum level nr.
static _lookupTitle($a_id)
lookup object title
getSelfEvaluation()
Get self evaluation.
static getUsageInfoGeneric( $a_cskill_ids, &$a_usages, $a_usage_type, $a_table, $a_key_field, $a_skill_field="skill_id", $a_tref_field="tref_id")
Get standard usage query.
static now()
Return current timestamp in Y-m-d H:i:s format.
deleteLevel($a_id)
Delete level.
getOrderNr()
Get order nr.
static getLevelIdForImportIdMatchSkill($a_source_inst_id, $a_level_import_id, $a_skill_import_id, $a_tref_import_id=0)
Get level ids for import Ids matching common skills.
static getUsageInfo($a_cskill_ids, &$a_usages)
Get usage info.
static writeLevelProperty($a_id, $a_prop, $a_value, $a_type)
Write level property.
static writeLevelDescription($a_id, $a_description)
Write level description.
fixLevelNumbering()
Fix level numbering.
static isInTree($a_id)
Is id in tree?
read()
Read data from database.
static _lookupObjId($a_id)
static writeLevelTitle($a_id, $a_title)
Write level title.
getMaxLevelPerType($a_tref_id, $a_type, $a_user_id=0, $a_self_eval=0)
Get max levels per type.
static lookupLevelProperty($a_id, $a_prop)
Lookup level property.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static _lookupType($a_id, $a_reference=false)
lookup object type
static lookupLevelDescription($a_id)
Lookup level description.
static removeAllUserSkillLevelStatusOfObject($a_user_id, $a_trigger_obj_id, $a_self_eval=false, $a_unique_identifier="")
Remove a user skill completely.
static _lookupCertificate($a_skill_id, $a_skill_level_id)
Checks whether a skill level has a certificate or not.
getTitleForCertificate()
Get title for certificate.
getMaxLevelPerObject($a_tref_id, $a_object_id, $a_user_id=0, $a_self_eval=0)
Get max levels per object.
updateLevelOrder($order)
Update level order.
static removeAllUserData($a_user_id)
Remove all data of a user.
__construct(Container $dic, ilPlugin $plugin)
A node in the skill tree.
static writeUserSkillLevelStatus( $a_level_id, $a_user_id, $a_trigger_ref_id, $a_tref_id=0, $a_status=ilBasicSkill::ACHIEVED, $a_force=false, $a_self_eval=false, $a_unique_identifier="")
Write skill level status.
static hasRecentSelfEvaluation($a_user_id, $a_skill_id, $a_tref_id=0, $a_trigger_ref_id=0)
Has recent self evaluation.
getAllHistoricLevelEntriesOfUser($a_tref_id, $a_user_id=0, $a_eval_by=0)
Get all historic level entries.
static lookupLevelSkillId($a_id)
Lookup level skill id.
__construct($a_id=0)
Constructor public.
static hasSelfEvaluated($a_user_id, $a_skill_id, $a_tref_id)
Has use self evaluated a skill?
getLastUpdatePerObject($a_tref_id, $a_object_id, $a_user_id=0, $a_self_eval=0)
Get last update per object.
getAllLevelEntriesOfUser($a_tref_id, $a_user_id=0, $a_self_eval=0)
Get all level entries.
static getCommonSkillIdForImportId($a_source_inst_id, $a_skill_import_id, $a_tref_import_id=0)
Get common skill ids for import IDs (newest first)
static resetUserSkillLevelStatus($a_user_id, $a_skill_id, $a_tref_id=0, $a_trigger_ref_id=0, $a_self_eval=false)
Reset skill level status.