ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilBasicSkill.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
6 include_once("./Services/Skill/interfaces/interface.ilSkillUsageInfo.php");
7 
17 {
18  const ACHIEVED = 1;
19  const NOT_ACHIEVED = 0;
20 
21  var $id;
22 
27  function __construct($a_id = 0)
28  {
30  $this->setType("skll");
31  }
32 
36  function read()
37  {
38  parent::read();
39  }
40 
45  function create()
46  {
48  }
49 
53  function delete()
54  {
55  global $ilDB;
56 
57  $ilDB->manipulate("DELETE FROM skl_level WHERE "
58  ." skill_id = ".$ilDB->quote($this->getId(), "integer")
59  );
60 
61  $ilDB->manipulate("DELETE FROM skl_user_has_level WHERE "
62  ." skill_id = ".$ilDB->quote($this->getId(), "integer")
63  );
64 
66  }
67 
71  function copy()
72  {
73  $skill = new ilBasicSkill();
74  $skill->setTitle($this->getTitle());
75  $skill->setType($this->getType());
76  $skill->setSelfEvaluation($this->getSelfEvaluation());
77  $skill->setOrderNr($this->getOrderNr());
78  $skill->create();
79 
80  $levels = $this->getLevelData();
81  if (sizeof($levels))
82  {
83  foreach($levels as $item)
84  {
85  $skill->addLevel($item["title"], $item["description"]);
86  }
87  }
88  $skill->update();
89 
90  return $skill;
91  }
92 
93  //
94  //
95  // Skill level related methods
96  //
97  //
98 
105  function addLevel($a_title, $a_description)
106  {
107  global $ilDB;
108 
109  $nr = $this->getMaxLevelNr();
110  $nid = $ilDB->nextId("skl_level");
111  $ilDB->insert("skl_level", array(
112  "id" => array("integer", $nid),
113  "skill_id" => array("integer", $this->getId()),
114  "nr" => array("integer", $nr+1),
115  "title" => array("text", $a_title),
116  "description" => array("clob", $a_description)
117  ));
118 
119  }
120 
126  function getMaxLevelNr()
127  {
128  global $ilDB;
129 
130  $set = $ilDB->query("SELECT MAX(nr) mnr FROM skl_level WHERE ".
131  " skill_id = ".$ilDB->quote($this->getId(), "integer")
132  );
133  $rec = $ilDB->fetchAssoc($set);
134  return (int) $rec["mnr"];
135  }
136 
142  function getLevelData($a_id = 0)
143  {
144  global $ilDB;
145 
146  if ($a_id > 0)
147  {
148  $and = " AND id = ".$ilDB->quote($a_id, "integer");
149  }
150 
151  $set = $ilDB->query("SELECT * FROM skl_level WHERE ".
152  " skill_id = ".$ilDB->quote($this->getId(), "integer").
153  $and.
154  " ORDER BY nr"
155  );
156  $levels = array();
157  while ($rec = $ilDB->fetchAssoc($set))
158  {
159  if ($a_id > 0)
160  {
161  return $rec;
162  }
163  $levels[] = $rec;
164  }
165  return $levels;
166  }
167 
174  protected static function lookupLevelProperty($a_id, $a_prop)
175  {
176  global $ilDB;
177 
178  $set = $ilDB->query("SELECT $a_prop FROM skl_level WHERE ".
179  " id = ".$ilDB->quote($a_id, "integer")
180  );
181  $rec = $ilDB->fetchAssoc($set);
182  return $rec[$a_prop];
183  }
184 
191  static function lookupLevelTitle($a_id)
192  {
193  return ilBasicSkill::lookupLevelProperty($a_id, "title");
194  }
195 
202  static function lookupLevelDescription($a_id)
203  {
204  return ilBasicSkill::lookupLevelProperty($a_id, "description");
205  }
206 
213  static function lookupLevelTrigger($a_id)
214  {
215 die("ilBasicSkill::lookupLevelTrigger is deprecated.");
216  $ref_id = ilBasicSkill::lookupLevelProperty($a_id, "trigger_ref_id");
217  $obj_id = ilBasicSkill::lookupLevelProperty($a_id, "trigger_obj_id");
218  return array("ref_id" => $ref_id, "obj_id" => $obj_id);
219  }
220 
227  static function lookupLevelSkillId($a_id)
228  {
229  return ilBasicSkill::lookupLevelProperty($a_id, "skill_id");
230  }
231 
238  static protected function writeLevelProperty($a_id, $a_prop, $a_value, $a_type)
239  {
240  global $ilDB;
241 
242  $ilDB->update("skl_level", array(
243  $a_prop => array($a_type, $a_value),
244  ), array(
245  "id" => array("integer", $a_id),
246  ));
247  }
248 
255  static function writeLevelTitle($a_id, $a_title)
256  {
257  ilBasicSkill::writeLevelProperty($a_id, "title", $a_title, "text");
258  }
259 
266  static function writeLevelDescription($a_id, $a_description)
267  {
268  ilBasicSkill::writeLevelProperty($a_id, "description", $a_description, "clob");
269  }
270 
277  static function writeLevelTrigger($a_id, $a_trigger_ref_id)
278  {
279 die("ilBasicSkill::writeLevelTrigger is deprecated.");
280  $a_trigger_obj_id = 0;
281  if ($a_trigger_ref_id > 0)
282  {
283  $a_trigger_obj_id = ilObject::_lookupObjId($a_trigger_ref_id);
284  }
285  ilBasicSkill::writeLevelProperty($a_id, "trigger_ref_id", $a_trigger_ref_id, "integer");
286  ilBasicSkill::writeLevelProperty($a_id, "trigger_obj_id", $a_trigger_obj_id, "integer");
287  }
288 
295  function updateLevelOrder($order)
296  {
297  global $ilDB;
298 
299  asort($order);
300 
301  $cnt = 1;
302  foreach ($order as $id => $o)
303  {
304  $ilDB->manipulate("UPDATE skl_level SET ".
305  " nr = ".$ilDB->quote($cnt, "integer").
306  " WHERE id = ".$ilDB->quote($id, "integer")
307  );
308  $cnt++;
309  }
310  }
311 
318  function deleteLevel($a_id)
319  {
320  global $ilDB;
321 
322  $ilDB->manipulate("DELETE FROM skl_level WHERE "
323  ." id = ".$ilDB->quote($a_id, "integer")
324  );
325 
326  }
327 
334  function fixLevelNumbering()
335  {
336  global $ilDB;
337 
338  $set = $ilDB->query("SELECT id, nr FROM skl_level WHERE ".
339  " skill_id = ".$ilDB->quote($this->getId(), "integer").
340  " ORDER BY nr ASC"
341  );
342  $cnt = 1;
343  while ($rec = $ilDB->fetchAssoc($set))
344  {
345  $ilDB->manipulate("UPDATE skl_level SET ".
346  " nr = ".$ilDB->quote($cnt, "integer").
347  " WHERE id = ".$ilDB->quote($rec["id"], "integer")
348  );
349  $cnt++;
350  }
351  }
352 
359  function lookupLevelsForTriggerRefId($a_ref_id)
360  {
361  global $ilDB;
362 die("ilBasicSkill::lookupLevelsForTriggerRefId is deprecated.");
363  $set = $ilDB->query("SELECT id FROM skl_level WHERE ".
364  " trigger_ref_id = ".$ilDB->quote($a_ref_id, "integer")
365  );
366  $levels = array();
367  while ($rec = $ilDB->fetchAssoc($set))
368  {
369  $levels[] = $rec["id"];
370  }
371  return $levels;
372  }
373 
380  function getSkillForLevelId($a_level_id)
381  {
382  global $ilDB;
383 
384  $set = $ilDB->query("SELECT * FROM skl_level WHERE ".
385  " id = ".$ilDB->quote($a_level_id, "integer")
386  );
387  $skill = null;
388  if ($rec = $ilDB->fetchAssoc($set))
389  {
390  if (ilSkillTreeNode::isInTree($rec["skill_id"]))
391  {
392  $skill = new ilBasicSkill($rec["skill_id"]);
393  }
394  }
395  return $skill;
396  }
397 
398  //
399  //
400  // User skill (level) related methods
401  //
402  //
403 
404 
409  public static function updateAllUserSkillLevels()
410  {
411  global $ilDB;
412 die("ilBasicSkill::updateAllUserSkillLevels is deprecated.");
413  $set = $ilDB->query("SELECT id, trigger_obj_id FROM skl_level WHERE ".
414  " trigger_obj_id > ".$ilDB->quote(0, "integer")
415  );
416  while ($rec = $ilDB->fetchAssoc($set)) // all trigger objects
417  {
418  $skill_level_id = $rec["id"];
419  $tr_obj_id = $rec["trigger_obj_id"];
420 
421  if (ilObject::_hasUntrashedReference($tr_obj_id))
422  {
423  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
424  $completed = ilLPStatusWrapper::_lookupCompletedForObject($tr_obj_id);
425  foreach ($completed as $user_id)
426  {
428  $user_id, ilBasicSkill::ACHIEVED);
429  }
430  }
431  }
432  }
433 
438  public static function updateSkillLevelsByTriggerRef($a_user_id, $a_ref_id)
439  {
440  global $ilDB;
441 die("ilBasicSkill::updateSkillLevelsByTriggerRef is deprecated.");
442  $set = $ilDB->query("SELECT id, trigger_obj_id FROM skl_level WHERE ".
443  " trigger_ref_id = ".$ilDB->quote($a_ref_id, "integer")
444  );
445  while ($rec = $ilDB->fetchAssoc($set)) // all trigger objects
446  {
447  $skill_level_id = $rec["id"];
448  $tr_obj_id = $rec["trigger_obj_id"];
449 
450  if (ilObject::_hasUntrashedReference($tr_obj_id))
451  {
452  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
453  $completed = ilLPStatusWrapper::_lookupCompletedForObject($tr_obj_id);
454  foreach ($completed as $user_id)
455  {
456  if ($a_user_id == $user_id)
457  {
459  $user_id, ilBasicSkill::ACHIEVED);
460  }
461  }
462  }
463  }
464  }
465 
473  static function writeUserSkillLevelStatus($a_level_id, $a_user_id,
474  $a_trigger_ref_id, $a_tref_id = 0, $a_status = ilBasicSkill::ACHIEVED, $a_force = false)
475  {
476  global $ilDB;
477 
478  $skill_id = ilBasicSkill::lookupLevelSkillId($a_level_id);
479  $trigger_ref_id = $a_trigger_ref_id;
480  $trigger_obj_id = ilObject::_lookupObjId($trigger_ref_id);
481  $trigger_title = ilObject::_lookupTitle($trigger_obj_id);
482  $trigger_type = ilObject::_lookupType($trigger_obj_id);
483 
484  $save = false;
485 
486  if ($a_force)
487  {
488  $save = true;
489  }
490  else
491  {
492  // check whether current skill user level is identical
493  // to the one that should be set (-> no change required)
494  $ilDB->setLimit(1);
495  $set = $ilDB->query("SELECT status, valid FROM skl_user_skill_level WHERE ".
496  "level_id = ".$ilDB->quote($a_level_id, "integer")." AND ".
497  "user_id = ".$ilDB->quote($a_user_id, "integer")." AND ".
498  "tref_id = ".$ilDB->quote((int) $a_tref_id, "integer")." AND ".
499  "trigger_obj_id = ".$ilDB->quote($trigger_obj_id, "integer").
500  " ORDER BY status_date DESC"
501  );
502  $rec = $ilDB->fetchAssoc($set);
503  if (!$rec["valid"] || $rec["status"] != $a_status)
504  {
505  $save = true;
506  }
507  }
508 
509  if ($save)
510  {
511  $now = ilUtil::now();
512  $ilDB->manipulate("INSERT INTO skl_user_skill_level ".
513  "(level_id, user_id, tref_id, status_date, skill_id, status, valid, trigger_ref_id,".
514  "trigger_obj_id, trigger_obj_type, trigger_title) VALUES (".
515  $ilDB->quote($a_level_id, "integer").",".
516  $ilDB->quote($a_user_id, "integer").",".
517  $ilDB->quote((int) $a_tref_id, "integer").",".
518  $ilDB->quote($now, "timestamp").",".
519  $ilDB->quote($skill_id, "integer").",".
520  $ilDB->quote($a_status, "integer").",".
521  $ilDB->quote(1, "integer").",".
522  $ilDB->quote($trigger_ref_id, "integer").",".
523  $ilDB->quote($trigger_obj_id, "integer").",".
524  $ilDB->quote($trigger_type, "text").",".
525  $ilDB->quote($trigger_title, "text").
526  ")");
527 
528  $ilDB->manipulate("DELETE FROM skl_user_has_level WHERE "
529  ." user_id = ".$ilDB->quote($a_user_id, "integer")
530  ." AND level_id = ".$ilDB->quote($a_level_id, "integer")
531  ." AND tref_id = ".$ilDB->quote((int) $a_tref_id, "integer")
532  ." AND trigger_obj_id = ".$ilDB->quote($trigger_obj_id, "integer")
533  );
534 
535  if ($a_status == ilBasicSkill::ACHIEVED)
536  {
537  $ilDB->manipulate("INSERT INTO skl_user_has_level ".
538  "(level_id, user_id, tref_id, status_date, skill_id, trigger_ref_id, trigger_obj_id, trigger_obj_type, trigger_title) VALUES (".
539  $ilDB->quote($a_level_id, "integer").",".
540  $ilDB->quote($a_user_id, "integer").",".
541  $ilDB->quote($a_tref_id, "integer").",".
542  $ilDB->quote($now, "timestamp").",".
543  $ilDB->quote($skill_id, "integer").",".
544  $ilDB->quote($trigger_ref_id, "integer").",".
545  $ilDB->quote($trigger_obj_id, "integer").",".
546  $ilDB->quote($trigger_type, "text").",".
547  $ilDB->quote($trigger_title, "text").
548  ")");
549  }
550  }
551  }
552 
559  function getMaxLevelPerType($a_tref_id, $a_type, $a_user_id = 0)
560  {
561  global $ilDB, $ilUser;
562 
563  if ($a_user_id == 0)
564  {
565  $a_user_id = $ilUser->getId();
566  }
567 
568  $set = $ilDB->query($q = "SELECT level_id FROM skl_user_has_level ".
569  " WHERE trigger_obj_type = ".$ilDB->quote($a_type, "text").
570  " AND skill_id = ".$ilDB->quote($this->getId(), "integer").
571  " AND tref_id = ".$ilDB->quote((int) $a_tref_id, "integer").
572  " AND user_id = ".$ilDB->quote($a_user_id, "integer")
573  );
574 
575  $has_level = array();
576  while ($rec = $ilDB->fetchAssoc($set))
577  {
578  $has_level[$rec["level_id"]] = true;
579  }
580  $max_level = 0;
581  foreach ($this->getLevelData() as $l)
582  {
583  if (isset($has_level[$l["id"]]))
584  {
585  $max_level = $l["id"];
586  }
587  }
588  return $max_level;
589  }
590 
597  function getAllLevelEntriesOfUser($a_tref_id, $a_user_id = 0)
598  {
599  global $ilDB, $ilUser;
600 
601  if ($a_user_id == 0)
602  {
603  $a_user_id = $ilUser->getId();
604  }
605 
606  $set = $ilDB->query($q = "SELECT * FROM skl_user_has_level ".
607  " WHERE skill_id = ".$ilDB->quote($this->getId(), "integer").
608  " AND tref_id = ".$ilDB->quote((int) $a_tref_id, "integer").
609  " AND user_id = ".$ilDB->quote($a_user_id, "integer").
610  " ORDER BY status_date DESC"
611  );
612 
613  $levels = array();
614  while ($rec = $ilDB->fetchAssoc($set))
615  {
616  $levels[] = $rec;
617  }
618  return $levels;
619  }
620 
627  function getMaxLevelPerObject($a_tref_id, $a_object_id, $a_user_id = 0)
628  {
629  global $ilDB, $ilUser;
630 
631  if ($a_user_id == 0)
632  {
633  $a_user_id = $ilUser->getId();
634  }
635 
636  $set = $ilDB->query($q = "SELECT level_id FROM skl_user_has_level ".
637  " WHERE trigger_obj_id = ".$ilDB->quote($a_object_id, "integer").
638  " AND skill_id = ".$ilDB->quote($this->getId(), "integer").
639  " AND tref_id = ".$ilDB->quote((int) $a_tref_id, "integer").
640  " AND user_id = ".$ilDB->quote($a_user_id, "integer")
641  );
642 
643  $has_level = array();
644  while ($rec = $ilDB->fetchAssoc($set))
645  {
646  $has_level[$rec["level_id"]] = true;
647  }
648  $max_level = 0;
649  foreach ($this->getLevelData() as $l)
650  {
651  if (isset($has_level[$l["id"]]))
652  {
653  $max_level = $l["id"];
654  }
655  }
656  return $max_level;
657  }
658 
665  static function getCompletionDateForTriggerRefId($a_user_id, $a_ref_id = null)
666  {
667  global $ilDB;
668 die("ilBasicSkill::getCompletionDateForTriggerRefId is deprecated.");
669  if ($a_ref_id == "")
670  {
671  $a_ref_id = null;
672  }
673  else if (!is_array($a_ref_id))
674  {
675  $a_ref_id = array($a_ref_id);
676  }
677  if (!is_array($a_user_id))
678  {
679  $a_user_id = array($a_user_id);
680  }
681 
682  if ($a_ref_id != null)
683  {
684  if (!is_array($a_ref_id))
685  {
686  $a_ref_id = array($a_ref_id);
687  }
688 
689  $set = $ilDB->query($q = "SELECT user_id, status_date, trigger_ref_id FROM skl_user_has_level WHERE ".
690  $ilDB->in("user_id", $a_user_id, false, "integer")." AND ".
691  $ilDB->in("trigger_ref_id", $a_ref_id, false, "integer")
692  );
693 
694  $completion = array();
695  while ($rec = $ilDB->fetchAssoc($set))
696  {
697  if (!isset($completion[$rec["user_id"]][$rec["trigger_ref_id"]]))
698  {
699  $completion[$rec["user_id"]][$rec["trigger_ref_id"]] = $rec["status_date"];
700  }
701  else if ($rec["status_date"] < $completion[$rec["user_id"]][$rec["trigger_ref_id"]])
702  {
703  $completion[$rec["user_id"]][$rec["trigger_ref_id"]] = $rec["status_date"];
704  }
705  }
706 
707  foreach ($a_ref_id as $ref_id)
708  {
709  foreach ($a_user_id as $user_id)
710  {
711  if (!isset($completion[$user_id][$ref_id]))
712  {
713  $completion[$user_id][$ref_id] = false;
714  }
715  }
716  }
717  }
718  else
719  {
720  $completion = array();
721  foreach ($a_user_id as $user_id)
722  {
723  include_once 'Services/Membership/classes/class.ilParticipants.php';
724  $a_ref_id = ilParticipants::_getMembershipByType($user_id, 'crs', true);
725 
726  $set = $ilDB->query($q = "SELECT user_id, status_date, trigger_ref_id FROM skl_user_has_level WHERE ".
727  "user_id = ".$ilDB->quote($user_id, "integer")." AND ".
728  $ilDB->in("trigger_ref_id", $a_ref_id, false, "integer")
729  );
730 
731  while ($rec = $ilDB->fetchAssoc($set))
732  {
733  if (!isset($completion[$user_id][$rec["trigger_ref_id"]]))
734  {
735  $completion[$user_id][$rec["trigger_ref_id"]] = $rec["status_date"];
736  }
737  else if ($rec["status_date"] < $completion[$user_id][$rec["trigger_ref_id"]])
738  {
739  $completion[$user_id][$rec["trigger_ref_id"]] = $rec["status_date"];
740  }
741  }
742  foreach ($a_ref_id as $ref_id)
743  {
744  if (!isset($completion[$user_id][$ref_id]))
745  {
746  $completion[$user_id][$ref_id] = false;
747  }
748  }
749  }
750 
751  }
752  return $completion;
753  }
754 
761  static function checkUserCertificateForTriggerRefId($a_user_id, $a_ref_id)
762  {
763  global $ilDB;
764 die("ilBasicSkill::checkUserCertificateForTriggerRefId is deprecated.");
765  if (!is_array($a_ref_id))
766  {
767  $a_ref_id = array($a_ref_id);
768  }
769  if (!is_array($a_user_id))
770  {
771  $a_user_id = array($a_user_id);
772  }
773  $set = $ilDB->query($q = "SELECT user_id, status_date, trigger_ref_id, level_id, skill_id FROM skl_user_has_level WHERE ".
774  $ilDB->in("user_id", $a_user_id, false, "integer")." AND ".
775  $ilDB->in("trigger_ref_id", $a_ref_id, false, "integer")
776  );
777 
778  $completion = array();
779 
780  $completion = array();
781  while ($rec = $ilDB->fetchAssoc($set))
782  {
783  if (!isset($completion[$rec["user_id"]][$rec["trigger_ref_id"]])
784  && ilBasicSkill::_lookupCertificate($rec["skill_id"], $rec["level_id"]))
785  {
786  $completion[$rec["user_id"]][$rec["trigger_ref_id"]] = true;
787  }
788  }
789 
790  foreach ($a_ref_id as $ref_id)
791  {
792  foreach ($a_user_id as $user_id)
793  {
794  if (!isset($completion[$user_id][$ref_id]))
795  {
796  $completion[$user_id][$ref_id] = false;
797  }
798  }
799  }
800  return $completion;
801 
802  }
803 
810  function lookupLevelAchievementDate($a_user_id, $a_level_id)
811  {
812  global $ilDB;
813 die("ilBasicSkill::lookupLevelAchievementDate is deprecated.");
814  $set = $ilDB->query("SELECT user_id, status_date, trigger_ref_id, level_id, skill_id FROM skl_user_has_level WHERE ".
815  " user_id = ".$ilDB->quote($a_user_id, "integer").
816  " AND user_id = ".$ilDB->quote($a_user_id, "integer")
817  );
818  if ($rec = $ilDB->fetchAssoc($set))
819  {
820  return $rec["status_date"];
821  }
822 
823  return false;
824  }
825 
832  static function getTriggerOfAllCertificates($a_user_id)
833  {
834  global $ilDB, $tree;
835 die("ilBasicSkill::getTriggerOfAllCertificates is deprecated.");
836  if (!is_array($a_user_id))
837  {
838  $a_user_id = array($a_user_id);
839  }
840 
841  $set = $ilDB->query($q = "SELECT user_id, status_date, trigger_ref_id, level_id, skill_id FROM skl_user_has_level WHERE ".
842  $ilDB->in("user_id", $a_user_id, false, "integer")
843  );
844 
845  $completion = array();
846 
847  while ($rec = $ilDB->fetchAssoc($set))
848  {
849  if ((!is_array($completion[$rec["user_id"]]) || !in_array($rec["trigger_ref_id"], $completion[$rec["user_id"]]))
850  && ilBasicSkill::_lookupCertificate($rec["skill_id"], $rec["level_id"]))
851  {
852  if ($tree->isInTree($rec["trigger_ref_id"]))
853  {
854  $completion[$rec["user_id"]][] = $rec["trigger_ref_id"];
855  }
856  }
857  }
858 
859  foreach ($a_user_id as $user_id)
860  {
861  if (!is_array($completion[$user_id]))
862  {
863  $completion[$user_id] = array();
864  }
865  }
866  return $completion;
867  }
868 
875  static function getSkillLevelsForTrigger($a_ref_id)
876  {
877  global $ilDB;
878 die("ilBasicSkill::getSkillLevelsForTrigger is deprecated.");
879  $set = $ilDB->query($q = "SELECT id FROM skl_level".
880  " WHERE trigger_ref_id = ".$ilDB->quote($a_ref_id, "integer"));
881 
882  $skill_levels = array();
883  while ($rec = $ilDB->fetchAssoc($set))
884  {
885  $skill_levels[] = $rec["id"];
886  }
887 
888  return $skill_levels;
889 
890  }
891 
892  //
893  //
894  // Certificate related methods
895  //
896  //
897 
905  {
906  return $this->getTitle();
907  }
908 
915  function getLevelTitleForCertificate($a_level_id)
916  {
917 die("ilBasicSkill::getLevelTitleForCertificate is deprecated.");
918  return ilBasicSkill::lookupLevelTitle($a_level_id);
919  }
920 
927  function getTriggerTitleForCertificate($a_level_id)
928  {
929 die("ilBasicSkill::getTriggerTitleForCertificate is deprecated.");
930  $tr = ilBasicSkill::lookupLevelTrigger($a_level_id);
931  return ilObject::_lookupTitle($tr["obj_id"]);
932  }
933 
941  {
942  return "Skill";
943  }
944 
951  public static function _lookupCertificate($a_skill_id, $a_skill_level_id)
952  {
953  $certificatefile = CLIENT_WEB_DIR."/certificates/skill/".
954  ((int)$a_skill_id)."/".((int) $a_skill_level_id)."/certificate.xml";
955  if (@file_exists($certificatefile))
956  {
957  return true;
958  }
959  else
960  {
961  return false;
962  }
963  }
964 
971  static public function getUsageInfo($a_cskill_ids, &$a_usages)
972  {
973  global $ilDB;
974 
975  include_once("./Services/Skill/classes/class.ilSkillUsage.php");
977  "skl_user_skill_level", "user_id");
978  }
979 
980 
981 }
982 ?>