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();
47 parent::__construct($a_id);
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")
95 $skill->setType($this->
getType());
101 if (
sizeof($levels)) {
102 foreach ($levels as $item) {
103 $skill->addLevel($item[
"title"], $item[
"description"]);
123 public function addLevel($a_title, $a_description, $a_import_id =
"")
128 $nid =
$ilDB->nextId(
"skl_level");
129 $ilDB->insert(
"skl_level", array(
130 "id" => array(
"integer", $nid),
131 "skill_id" => array(
"integer", $this->
getId()),
132 "nr" => array(
"integer", $nr + 1),
133 "title" => array(
"text", $a_title),
134 "description" => array(
"clob", $a_description),
135 "import_id" => array(
"text", $a_import_id),
136 "creation_date" => array(
"timestamp",
ilUtil::now())
150 "SELECT MAX(nr) mnr FROM skl_level WHERE " .
151 " skill_id = " .
$ilDB->quote($this->getId(),
"integer")
153 $rec =
$ilDB->fetchAssoc($set);
154 return (
int) $rec[
"mnr"];
167 $and =
" AND id = " .
$ilDB->quote($a_id,
"integer");
171 "SELECT * FROM skl_level WHERE " .
172 " skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
177 while ($rec =
$ilDB->fetchAssoc($set)) {
196 $ilDB = $DIC->database();
199 "SELECT $a_prop FROM skl_level WHERE " .
200 " id = " .
$ilDB->quote($a_id,
"integer")
202 $rec =
$ilDB->fetchAssoc($set);
203 return $rec[$a_prop];
249 $ilDB = $DIC->database();
251 $ilDB->update(
"skl_level", array(
252 $a_prop => array(
$a_type, $a_value),
254 "id" => array(
"integer", $a_id),
293 foreach ($order as
$id => $o) {
295 "UPDATE skl_level SET " .
296 " nr = " .
$ilDB->quote($cnt,
"integer") .
297 " WHERE id = " .
$ilDB->quote(
$id,
"integer")
314 "DELETE FROM skl_level WHERE " 315 .
" id = " .
$ilDB->quote($a_id,
"integer")
330 "SELECT id, nr FROM skl_level WHERE " .
331 " skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
335 while ($rec =
$ilDB->fetchAssoc($set)) {
337 "UPDATE skl_level SET " .
338 " nr = " .
$ilDB->quote($cnt,
"integer") .
339 " WHERE id = " .
$ilDB->quote($rec[
"id"],
"integer")
356 "SELECT * FROM skl_level WHERE " .
357 " id = " .
$ilDB->quote($a_level_id,
"integer")
360 if ($rec =
$ilDB->fetchAssoc($set)) {
391 $db = $DIC->database();
394 include_once(
"./Services/Skill/exceptions/class.ilSkillException.php");
395 throw new ilSkillException(
"resetUserSkillLevelStatus currently only provided for self evaluations.");
398 $trigger_obj_id = ($a_trigger_ref_id > 0)
403 $status_date = self::hasRecentSelfEvaluation($a_user_id, $a_skill_id, $a_tref_id, $a_trigger_ref_id);
404 if ($status_date !=
"") {
412 "UPDATE skl_user_skill_level SET " .
413 " level_id = " .
$db->quote(0,
"integer") .
"," .
414 " status_date = " .
$db->quote($now,
"timestamp") .
415 " WHERE user_id = " .
$db->quote($a_user_id,
"integer") .
416 " AND status_date = " .
$db->quote($status_date,
"timestamp") .
417 " AND skill_id = " .
$db->quote($a_skill_id,
"integer") .
418 " AND status = " .
$db->quote(self::ACHIEVED,
"integer") .
419 " AND trigger_obj_id = " .
$db->quote($trigger_obj_id,
"integer") .
420 " AND tref_id = " .
$db->quote((
int) $a_tref_id,
"integer") .
421 " AND self_eval = " .
$db->quote($a_self_eval,
"integer")
425 $db->manipulate(
"INSERT INTO skl_user_skill_level " .
426 "(level_id, user_id, tref_id, status_date, skill_id, status, valid, trigger_ref_id," .
427 "trigger_obj_id, trigger_obj_type, trigger_title, self_eval, unique_identifier) VALUES (" .
428 $db->quote(0,
"integer") .
"," .
429 $db->quote($a_user_id,
"integer") .
"," .
430 $db->quote((
int) $a_tref_id,
"integer") .
"," .
431 $db->quote($now,
"timestamp") .
"," .
432 $db->quote($a_skill_id,
"integer") .
"," .
433 $db->quote(self::ACHIEVED,
"integer") .
"," .
434 $db->quote(1,
"integer") .
"," .
435 $db->quote($a_trigger_ref_id,
"integer") .
"," .
436 $db->quote($trigger_obj_id,
"integer") .
"," .
437 $db->quote(
"",
"text") .
"," .
438 $db->quote(
"",
"text") .
"," .
439 $db->quote($a_self_eval,
"integer") .
"," .
440 $db->quote(
"",
"text") .
445 "DELETE FROM skl_user_has_level WHERE " 446 .
" user_id = " .
$db->quote($a_user_id,
"integer")
447 .
" AND skill_id = " .
$db->quote($a_skill_id,
"integer")
448 .
" AND tref_id = " .
$db->quote((
int) $a_tref_id,
"integer")
449 .
" AND trigger_obj_id = " .
$db->quote($trigger_obj_id,
"integer")
450 .
" AND self_eval = " .
$db->quote($a_self_eval,
"integer")
465 $db = $DIC->database();
467 $trigger_obj_id = ($a_trigger_ref_id > 0)
475 "SELECT * FROM skl_user_skill_level WHERE " .
476 "skill_id = " .
$db->quote($a_skill_id,
"integer") .
" AND " .
477 "user_id = " .
$db->quote($a_user_id,
"integer") .
" AND " .
478 "tref_id = " .
$db->quote((
int) $a_tref_id,
"integer") .
" AND " .
479 "trigger_obj_id = " .
$db->quote($trigger_obj_id,
"integer") .
" AND " .
480 "self_eval = " .
$db->quote(1,
"integer") .
481 " ORDER BY status_date DESC" 483 $rec =
$db->fetchAssoc($set);
484 $status_day = substr($rec[
"status_date"], 0, 10);
487 $recent = $rec[
"status_date"];
503 $db = $DIC->database();
505 $to = (!is_null($a_timestamp_to))
506 ?
" AND status_date <= " .
$db->quote($a_timestamp_to,
"timestamp")
509 $user = ($a_user_id > 0)
510 ?
" AND user_id = " .
$db->quote($a_user_id,
"integer")
513 $set =
$db->query(
"SELECT * FROM skl_user_skill_level " .
514 " WHERE status_date >= " .
$db->quote($a_timestamp,
"timestamp") .
515 " AND valid = " .
$db->quote(1,
"integer") .
517 " AND self_eval = " .
$db->quote($a_self_eval,
"integer") .
520 " ORDER BY user_id, status_date ASC ");
521 $achievments = array();
522 while ($rec =
$db->fetchAssoc($set)) {
523 $achievments[$rec[
"user_id"]][] = $rec;
549 $a_self_eval =
false,
550 $a_unique_identifier =
"" 554 $ilDB = $DIC->database();
557 $trigger_ref_id = $a_trigger_ref_id;
565 if ($a_self_eval && self::hasRecentSelfEvaluation($a_user_id, $skill_id, $a_tref_id, $trigger_ref_id)) {
566 $status_date = self::hasRecentSelfEvaluation($a_user_id, $skill_id, $a_tref_id, $trigger_ref_id);
567 if ($status_date !=
"") {
576 "UPDATE skl_user_skill_level SET " .
577 " level_id = " .
$ilDB->quote($a_level_id,
"integer") .
"," .
578 " status_date = " .
$ilDB->quote($now,
"timestamp") .
579 " WHERE user_id = " .
$ilDB->quote($a_user_id,
"integer") .
580 " AND status_date = " .
$ilDB->quote($status_date,
"timestamp") .
581 " AND skill_id = " .
$ilDB->quote($skill_id,
"integer") .
582 " AND status = " .
$ilDB->quote($a_status,
"integer") .
583 " AND trigger_obj_id = " .
$ilDB->quote($trigger_obj_id,
"integer") .
584 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
585 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
588 if ($a_unique_identifier !=
"") {
590 "DELETE FROM skl_user_skill_level WHERE " .
591 " user_id = " .
$ilDB->quote($a_user_id,
"integer") .
592 " AND tref_id = " .
$ilDB->quote($a_tref_id,
"integer") .
593 " AND skill_id = " .
$ilDB->quote($skill_id,
"integer") .
594 " AND trigger_ref_id = " .
$ilDB->quote($trigger_ref_id,
"integer") .
595 " AND trigger_obj_id = " .
$ilDB->quote($trigger_obj_id,
"integer") .
596 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer") .
597 " AND unique_identifier = " .
$ilDB->quote($a_unique_identifier,
"text")
602 $ilDB->manipulate(
"INSERT INTO skl_user_skill_level " .
603 "(level_id, user_id, tref_id, status_date, skill_id, status, valid, trigger_ref_id," .
604 "trigger_obj_id, trigger_obj_type, trigger_title, self_eval, unique_identifier) VALUES (" .
605 $ilDB->quote($a_level_id,
"integer") .
"," .
606 $ilDB->quote($a_user_id,
"integer") .
"," .
607 $ilDB->quote((
int) $a_tref_id,
"integer") .
"," .
608 $ilDB->quote($now,
"timestamp") .
"," .
609 $ilDB->quote($skill_id,
"integer") .
"," .
610 $ilDB->quote($a_status,
"integer") .
"," .
611 $ilDB->quote(1,
"integer") .
"," .
612 $ilDB->quote($trigger_ref_id,
"integer") .
"," .
613 $ilDB->quote($trigger_obj_id,
"integer") .
"," .
614 $ilDB->quote($trigger_type,
"text") .
"," .
615 $ilDB->quote($trigger_title,
"text") .
"," .
616 $ilDB->quote($a_self_eval,
"integer") .
"," .
617 $ilDB->quote($a_unique_identifier,
"text") .
624 "DELETE FROM skl_user_has_level WHERE " 625 .
" user_id = " .
$ilDB->quote($a_user_id,
"integer")
626 .
" AND skill_id = " .
$ilDB->quote($skill_id,
"integer")
627 .
" AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer")
628 .
" AND trigger_obj_id = " .
$ilDB->quote($trigger_obj_id,
"integer")
629 .
" AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
633 $ilDB->manipulate(
"INSERT INTO skl_user_has_level " .
634 "(level_id, user_id, tref_id, status_date, skill_id, trigger_ref_id, trigger_obj_id, trigger_obj_type, trigger_title, self_eval) VALUES (" .
635 $ilDB->quote($a_level_id,
"integer") .
"," .
636 $ilDB->quote($a_user_id,
"integer") .
"," .
637 $ilDB->quote($a_tref_id,
"integer") .
"," .
638 $ilDB->quote($now,
"timestamp") .
"," .
639 $ilDB->quote($skill_id,
"integer") .
"," .
640 $ilDB->quote($trigger_ref_id,
"integer") .
"," .
641 $ilDB->quote($trigger_obj_id,
"integer") .
"," .
642 $ilDB->quote($trigger_type,
"text") .
"," .
643 $ilDB->quote($trigger_title,
"text") .
"," .
644 $ilDB->quote($a_self_eval,
"integer") .
662 $db = $DIC->database();
664 if ($a_trigger_obj_id == 0) {
670 $aff_rows =
$db->manipulate(
671 "DELETE FROM skl_user_skill_level WHERE " 672 .
" user_id = " .
$db->quote($a_user_id,
"integer")
673 .
" AND trigger_obj_id = " .
$db->quote($a_trigger_obj_id,
"integer")
674 .
" AND self_eval = " .
$db->quote($a_self_eval,
"integer")
675 .
" AND unique_identifier = " .
$db->quote($a_unique_identifier,
"text")
681 $aff_rows =
$db->manipulate(
682 "DELETE FROM skl_user_has_level WHERE " 683 .
" user_id = " .
$db->quote($a_user_id,
"integer")
684 .
" AND trigger_obj_id = " .
$db->quote($a_trigger_obj_id,
"integer")
685 .
" AND self_eval = " .
$db->quote($a_self_eval,
"integer")
702 $db = $DIC->database();
705 "DELETE FROM skl_user_skill_level WHERE " 706 .
" user_id = " .
$db->quote($a_user_id,
"integer")
709 "DELETE FROM skl_user_has_level WHERE " 710 .
" user_id = " .
$db->quote($a_user_id,
"integer")
726 if ($a_user_id == 0) {
731 $q =
"SELECT level_id FROM skl_user_has_level " .
732 " WHERE trigger_obj_type = " .
$ilDB->quote(
$a_type,
"text") .
733 " AND skill_id = " .
$ilDB->quote($this->
getId(),
"integer") .
734 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
735 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
736 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
739 $has_level = array();
740 while ($rec =
$ilDB->fetchAssoc($set)) {
741 $has_level[$rec[
"level_id"]] =
true;
745 if (isset($has_level[
$l[
"id"]])) {
746 $max_level = $l[
"id"];
763 if ($a_user_id == 0) {
768 $q =
"SELECT * FROM skl_user_has_level " .
769 " WHERE skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
770 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
771 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
772 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer") .
773 " ORDER BY status_date DESC" 777 while ($rec =
$ilDB->fetchAssoc($set)) {
794 if ($a_user_id == 0) {
798 $by = ($a_eval_by != self::EVAL_BY_ALL)
799 ?
" AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
803 $q =
"SELECT * FROM skl_user_skill_level " .
804 " WHERE skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
805 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
806 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
808 " ORDER BY status_date DESC" 811 while ($rec =
$ilDB->fetchAssoc($set)) {
829 if ($a_user_id == 0) {
834 $q =
"SELECT level_id FROM skl_user_has_level " .
835 " WHERE trigger_obj_id = " .
$ilDB->quote($a_object_id,
"integer") .
836 " AND skill_id = " .
$ilDB->quote($this->
getId(),
"integer") .
837 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
838 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
839 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
842 $has_level = array();
843 while ($rec =
$ilDB->fetchAssoc($set)) {
844 $has_level[$rec[
"level_id"]] =
true;
848 if (isset($has_level[
$l[
"id"]])) {
849 $max_level = $l[
"id"];
861 public function getMaxLevel($a_tref_id, $a_user_id = 0, $a_self_eval = 0)
866 if ($a_user_id == 0) {
871 $q =
"SELECT level_id FROM skl_user_has_level " .
872 " WHERE skill_id = " .
$ilDB->quote($this->getId(),
"integer") .
873 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
874 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
875 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer")
878 $has_level = array();
879 while ($rec =
$ilDB->fetchAssoc($set)) {
880 $has_level[$rec[
"level_id"]] =
true;
884 if (isset($has_level[
$l[
"id"]])) {
885 $max_level = $l[
"id"];
904 $db = $DIC->database();
907 $q =
"SELECT level_id FROM skl_user_has_level " .
908 " WHERE skill_id = " .
$db->quote((
int) $a_skill_id,
"integer") .
909 " AND tref_id = " .
$db->quote((
int) $a_tref_id,
"integer") .
910 " AND user_id = " .
$db->quote($a_user_id,
"integer") .
911 " AND self_eval = " .
$db->quote(1,
"integer")
914 if ($rec =
$db->fetchAssoc($set)) {
931 if ($a_user_id == 0) {
937 $q =
"SELECT level_id FROM skl_user_has_level " .
938 " WHERE trigger_obj_id = " .
$ilDB->quote($a_object_id,
"integer") .
939 " AND skill_id = " .
$ilDB->quote($this->
getId(),
"integer") .
940 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
941 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
942 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer") .
943 " ORDER BY status_date DESC" 946 $rec =
$ilDB->fetchAssoc($set);
948 return $rec[
"level_id"];
962 if ($a_user_id == 0) {
968 $q =
"SELECT status_date FROM skl_user_has_level " .
969 " WHERE trigger_obj_id = " .
$ilDB->quote($a_object_id,
"integer") .
970 " AND skill_id = " .
$ilDB->quote($this->
getId(),
"integer") .
971 " AND tref_id = " .
$ilDB->quote((
int) $a_tref_id,
"integer") .
972 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
973 " AND self_eval = " .
$ilDB->quote($a_self_eval,
"integer") .
974 " ORDER BY status_date DESC" 977 $rec =
$ilDB->fetchAssoc($set);
979 return $rec[
"status_date"];
1018 $certificatefile = CLIENT_WEB_DIR .
"/certificates/skill/" .
1019 ((int) $a_skill_id) .
"/" . ((int) $a_skill_level_id) .
"/certificate.xml";
1020 if (@file_exists($certificatefile)) {
1037 $ilDB = $DIC->database();
1039 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
1044 "skl_user_skill_level",
1061 $ilDB = $DIC->database();
1063 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
1064 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
1067 if ($a_source_inst_id == 0) {
1071 $template_ids = array();
1072 if ($a_tref_import_id > 0) {
1073 $skill_node_type =
"sktp";
1076 $set =
$ilDB->query(
"SELECT * FROM skl_tree_node n JOIN skl_tree t ON (n.obj_id = t.child) " .
1077 " WHERE n.import_id = " .
$ilDB->quote(
"il_" . ((
int) $a_source_inst_id) .
"_sktr_" . $a_tref_import_id,
"text") .
1078 " ORDER BY n.creation_date DESC ");
1079 while ($rec =
$ilDB->fetchAssoc($set)) {
1081 $template_ids[
$t] = $rec[
"obj_id"];
1085 $skill_node_type =
"skll";
1087 $set =
$ilDB->query(
"SELECT * FROM skl_tree_node n JOIN skl_tree t ON (n.obj_id = t.child) " .
1088 " WHERE n.import_id = " .
$ilDB->quote(
"il_" . ((
int) $a_source_inst_id) .
"_" . $skill_node_type .
"_" . $a_skill_import_id,
"text") .
1089 " ORDER BY n.creation_date DESC ");
1091 while ($rec =
$ilDB->fetchAssoc($set)) {
1092 $matching_trefs = array();
1093 if ($a_tref_import_id > 0) {
1094 $skill_template_id =
$tree->getTopParentNodeId($rec[
"obj_id"]);
1097 foreach ($template_ids as $templ => $tref) {
1098 if ($skill_template_id == $templ) {
1099 $matching_trefs[] = $tref;
1103 $matching_trefs = array(0);
1106 foreach ($matching_trefs as
$t) {
1107 $results[] = array(
"skill_id" => $rec[
"obj_id"],
"tref_id" => $t,
"creation_date" => $rec[
"creation_date"]);
1124 $ilDB = $DIC->database();
1126 $set =
$ilDB->query(
"SELECT * FROM skl_level l JOIN skl_tree t ON (l.skill_id = t.child) " .
1127 " WHERE l.import_id = " .
$ilDB->quote(
"il_" . ((
int) $a_source_inst_id) .
"_sklv_" . $a_level_import_id,
"text") .
1128 " ORDER BY l.creation_date DESC ");
1130 while ($rec =
$ilDB->fetchAssoc($set)) {
1131 $results[] = array(
"level_id" => $rec[
"id"],
"creation_date" => $rec[
"creation_date"]);
1144 $level_id_data = self::getLevelIdForImportId($a_source_inst_id, $a_level_import_id);
1145 $skill_data = self::getCommonSkillIdForImportId($a_source_inst_id, $a_skill_import_id, $a_tref_import_id);
1147 foreach ($level_id_data as
$l) {
1149 foreach ($skill_data as
$s) {
1152 "level_id" => $l[
"level_id"],
1153 "creation_date" => $l[
"creation_date"],
1154 "skill_id" => $s[
"skill_id"],
1155 "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.
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.
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.