ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.SelfEvaluationManager.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 namespace ILIAS\Skill\Personal;
23 
25 
30 {
38  public function saveSelfEvaluation(
39  int $user_id,
40  int $top_skill,
41  int $tref_id,
42  int $basic_skill,
43  int $level
44  ): void {
45  if ($level > 0) {
47  $level,
48  $user_id,
49  0,
50  $tref_id,
52  false,
53  true
54  );
55  } else {
56  \ilBasicSkill::resetUserSkillLevelStatus($user_id, $basic_skill, $tref_id, 0, true);
57  }
58  }
59 
67  public function getSelfEvaluation(
68  int $user_id,
69  int $top_skill,
70  int $tref_id,
71  int $basic_skill
72  ): int {
73  $bs = new \ilBasicSkill($basic_skill);
74  return $bs->getLastLevelPerObject($tref_id, 0, $user_id, 1);
75  }
76 
84  public function getSelfEvaluationDate(
85  int $user_id,
86  int $top_skill,
87  int $tref_id,
88  int $basic_skill
89  ): string {
90  $bs = new \ilBasicSkill($basic_skill);
91  return $bs->getLastUpdatePerObject($tref_id, 0, $user_id, 1);
92  }
93 }
saveSelfEvaluation(int $user_id, int $top_skill, int $tref_id, int $basic_skill, int $level)
getSelfEvaluation(int $user_id, int $top_skill, int $tref_id, int $basic_skill)
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="")
getSelfEvaluationDate(int $user_id, int $top_skill, int $tref_id, int $basic_skill)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)