This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
|
static | getSelectedUserSkills (int $a_user_id) |
|
static | addPersonalSkill (int $a_user_id, int $a_skill_node_id) |
|
static | removeSkill (int $a_user_id, int $a_skill_node_id) |
|
static | removeSkills (int $a_user_id) |
|
static | assignMaterial (int $a_user_id, int $a_top_skill, int $a_tref_id, int $a_basic_skill, int $a_level, int $a_wsp_id) |
| Assign material to skill level. More...
|
|
static | getAssignedMaterial (int $a_user_id, int $a_tref_id, int $a_level) |
| Get assigned material (for a skill level and user) More...
|
|
static | countAssignedMaterial (int $a_user_id, int $a_tref_id, int $a_level) |
| Count assigned material (for a skill level and user) More...
|
|
static | removeMaterial (int $a_user_id, int $a_tref_id, int $a_level_id, int $a_wsp_id) |
|
static | removeMaterials (int $a_user_id) |
|
static | saveSelfEvaluation (int $a_user_id, int $a_top_skill, int $a_tref_id, int $a_basic_skill, int $a_level) |
|
static | getSelfEvaluation (int $a_user_id, int $a_top_skill, int $a_tref_id, int $a_basic_skill) |
|
static | getSelfEvaluationDate (int $a_user_id, int $a_top_skill, int $a_tref_id, int $a_basic_skill) |
|
static | getUsageInfo (array $a_cskill_ids) |
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Personal skill
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Definition at line 25 of file class.ilPersonalSkill.php.
◆ addPersonalSkill()
static ilPersonalSkill::addPersonalSkill |
( |
int |
$a_user_id, |
|
|
int |
$a_skill_node_id |
|
) |
| |
|
static |
Definition at line 54 of file class.ilPersonalSkill.php.
References $DIC, and $ilDB.
Referenced by ilPersonalSkillsGUI\addSkill(), ilObjPortfolioBase\clonePagesAndSettings(), ilSkillAppEventListener\handleEvent(), ilTestSkillEvaluation\handleSkillTriggering(), ilContainerMemberSkills\publish(), ilSurveySkill\writeAndAddAppraiseeSkills(), ilSurveySkill\writeAndAddIndFeedbackSkills(), and ilSurveySkill\writeAndAddSelfEvalSkills().
58 $ilDB = $DIC->database();
61 "SELECT * FROM skl_personal_skill " .
62 " WHERE user_id = " .
$ilDB->quote($a_user_id,
"integer") .
63 " AND skill_node_id = " .
$ilDB->quote($a_skill_node_id,
"integer")
65 if (!
$ilDB->fetchAssoc($set)) {
66 $ilDB->manipulate(
"INSERT INTO skl_personal_skill " .
67 "(user_id, skill_node_id) VALUES (" .
68 $ilDB->quote($a_user_id,
"integer") .
"," .
69 $ilDB->quote($a_skill_node_id,
"integer") .
◆ assignMaterial()
static ilPersonalSkill::assignMaterial |
( |
int |
$a_user_id, |
|
|
int |
$a_top_skill, |
|
|
int |
$a_tref_id, |
|
|
int |
$a_basic_skill, |
|
|
int |
$a_level, |
|
|
int |
$a_wsp_id |
|
) |
| |
|
static |
Assign material to skill level.
- Parameters
-
int | $a_user_id | user id |
int | $a_top_skill | the "selectable" top skill |
int | $a_tref_id | template reference id |
int | $a_basic_skill | the basic skill the level belongs to |
int | $a_level | level id |
int | $a_wsp_id | workspace object |
Definition at line 114 of file class.ilPersonalSkill.php.
References $DIC, and $ilDB.
Referenced by ilPersonalSkillsGUI\selectMaterial().
124 $ilDB = $DIC->database();
127 "SELECT * FROM skl_assigned_material " .
128 " WHERE user_id = " .
$ilDB->quote($a_user_id,
"integer") .
129 " AND top_skill_id = " .
$ilDB->quote($a_top_skill,
"integer") .
130 " AND tref_id = " .
$ilDB->quote($a_tref_id,
"integer") .
131 " AND skill_id = " .
$ilDB->quote($a_basic_skill,
"integer") .
132 " AND level_id = " .
$ilDB->quote($a_level,
"integer") .
133 " AND wsp_id = " .
$ilDB->quote($a_wsp_id,
"integer")
135 if (!
$ilDB->fetchAssoc($set)) {
136 $ilDB->manipulate(
"INSERT INTO skl_assigned_material " .
137 "(user_id, top_skill_id, tref_id, skill_id, level_id, wsp_id) VALUES (" .
138 $ilDB->quote($a_user_id,
"integer") .
"," .
139 $ilDB->quote($a_top_skill,
"integer") .
"," .
140 $ilDB->quote($a_tref_id,
"integer") .
"," .
141 $ilDB->quote($a_basic_skill,
"integer") .
"," .
142 $ilDB->quote($a_level,
"integer") .
"," .
143 $ilDB->quote($a_wsp_id,
"integer") .
◆ countAssignedMaterial()
static ilPersonalSkill::countAssignedMaterial |
( |
int |
$a_user_id, |
|
|
int |
$a_tref_id, |
|
|
int |
$a_level |
|
) |
| |
|
static |
Count assigned material (for a skill level and user)
Definition at line 180 of file class.ilPersonalSkill.php.
References $DIC, and $ilDB.
Referenced by ilPersonalSkillsGUI\getMaterials().
184 $ilDB = $DIC->database();
187 "SELECT count(*) as cnt FROM skl_assigned_material " .
188 " WHERE level_id = " .
$ilDB->quote($a_level,
"integer") .
189 " AND tref_id = " .
$ilDB->quote($a_tref_id,
"integer") .
190 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer")
192 $rec =
$ilDB->fetchAssoc($set);
193 return (
int) $rec[
"cnt"];
◆ getAssignedMaterial()
static ilPersonalSkill::getAssignedMaterial |
( |
int |
$a_user_id, |
|
|
int |
$a_tref_id, |
|
|
int |
$a_level |
|
) |
| |
|
static |
Get assigned material (for a skill level and user)
- Returns
- array{user_id: int, top_skill_id: int, skill_id: int, level_id: int, wsp_id: int, tref_id: int}[]
Definition at line 152 of file class.ilPersonalSkill.php.
References $DIC, $ilDB, and ILIAS\Repository\int().
Referenced by ilCOPageHTMLExport\collectPageElements(), ilSkillAssignMaterialsTableGUI\fillRow(), and ilPersonalSkillsGUI\getMaterials().
156 $ilDB = $DIC->database();
159 "SELECT * FROM skl_assigned_material " .
160 " WHERE level_id = " .
$ilDB->quote($a_level,
"integer") .
161 " AND tref_id = " .
$ilDB->quote($a_tref_id,
"integer") .
162 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer")
165 while ($rec =
$ilDB->fetchAssoc($set)) {
166 $rec[
'user_id'] = (
int) $rec[
'user_id'];
167 $rec[
'top_skill_id'] = (
int) $rec[
'top_skill_id'];
168 $rec[
'skill_id'] = (
int) $rec[
'skill_id'];
169 $rec[
'level_id'] = (
int) $rec[
'level_id'];
170 $rec[
'wsp_id'] = (
int) $rec[
'wsp_id'];
171 $rec[
'tref_id'] = (
int) $rec[
'tref_id'];
◆ getSelectedUserSkills()
static ilPersonalSkill::getSelectedUserSkills |
( |
int |
$a_user_id | ) |
|
|
static |
- Returns
- array<int, array{skill_node_id: int, title: string}>
Definition at line 30 of file class.ilPersonalSkill.php.
References $DIC, $ilDB, ilSkillTreeNode\_lookupTitle(), and ILIAS\Repository\int().
Referenced by ilPersonalSkillTableGUI\__construct(), ilObjPortfolioBase\clonePagesAndSettings(), ilObjPortfolioGUI\createPortfolioFromAssignment(), ilObjPortfolioGUI\initCreatePortfolioFromTemplateForm(), ilPCSkillsGUI\initForm(), ilPersonalSkillsGUI\listSkills(), and ilMStShowUserCompetencesGUI\showSkills().
34 $ilDB = $DIC->database();
36 $repo = $DIC->skills()->internal()->repo()->getTreeRepo();
39 "SELECT * FROM skl_personal_skill " .
40 " WHERE user_id = " .
$ilDB->quote($a_user_id,
"integer")
43 while ($rec =
$ilDB->fetchAssoc($set)) {
44 if ($repo->isInAnyTree($rec[
"skill_node_id"])) {
45 $pskills[(
int) $rec[
"skill_node_id"]] = array(
46 "skill_node_id" => (
int) $rec[
"skill_node_id"],
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
◆ getSelfEvaluation()
static ilPersonalSkill::getSelfEvaluation |
( |
int |
$a_user_id, |
|
|
int |
$a_top_skill, |
|
|
int |
$a_tref_id, |
|
|
int |
$a_basic_skill |
|
) |
| |
|
static |
- Parameters
-
int | $a_user_id | user id |
int | $a_top_skill | the "selectable" top skill |
int | $a_tref_id | template reference id |
int | $a_basic_skill | the basic skill the level belongs to |
- Returns
- int|null level id
Definition at line 262 of file class.ilPersonalSkill.php.
Referenced by ilSelfEvaluationSimpleTableGUI\__construct().
269 return $bs->getLastLevelPerObject($a_tref_id, 0, $a_user_id, 1);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ getSelfEvaluationDate()
static ilPersonalSkill::getSelfEvaluationDate |
( |
int |
$a_user_id, |
|
|
int |
$a_top_skill, |
|
|
int |
$a_tref_id, |
|
|
int |
$a_basic_skill |
|
) |
| |
|
static |
- Parameters
-
int | $a_user_id | user id |
int | $a_top_skill | the "selectable" top skill |
int | $a_tref_id | template reference id |
int | $a_basic_skill | the basic skill the level belongs to |
- Returns
- string|null status date
Definition at line 279 of file class.ilPersonalSkill.php.
Referenced by ilPersonalSkillsGUI\getFilteredEntriesForSkill().
286 return $bs->getLastUpdatePerObject($a_tref_id, 0, $a_user_id, 1);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ getUsageInfo()
static ilPersonalSkill::getUsageInfo |
( |
array |
$a_cskill_ids | ) |
|
|
static |
- Parameters
-
array{skill_id | int, tref_id: int}[] $a_cskill_ids |
- Returns
- array<string, array<string, array{key: string}[]>>
Implements ilSkillUsageInfo.
Definition at line 294 of file class.ilPersonalSkill.php.
References $DIC, $ilDB, ilSkillTemplateReference\_lookupTemplateId(), ilSkillUsage\getUsageInfoGeneric(), ILIAS\Repository\int(), ilSkillUsage\PERSONAL_SKILL, and ilSkillUsage\USER_MATERIAL.
298 $ilDB = $DIC->database();
304 "skl_assigned_material",
311 foreach ($a_cskill_ids as $cs) {
312 if ($cs[
"tref_id"] > 0) {
314 $pskill_ids[$cs[
"tref_id"]] = $cs[
"tref_id"];
315 $tref_ids[(
int) $cs[
"tref_id"]] = $cs[
"skill_id"];
318 $pskill_ids[$cs[
"skill_id"]] = $cs[
"skill_id"];
322 "SELECT skill_node_id, user_id FROM skl_personal_skill " .
323 " WHERE " .
$ilDB->in(
"skill_node_id", $pskill_ids,
false,
"integer") .
324 " GROUP BY skill_node_id, user_id" 326 while ($rec =
$ilDB->fetchAssoc($set)) {
327 if (isset($tref_ids[(
int) $rec[
"skill_node_id"]])) {
329 array(
"key" => $rec[
"user_id"]);
332 array(
"key" => $rec[
"user_id"]);
static _lookupTemplateId(int $a_obj_id)
static getUsageInfoGeneric(array $a_cskill_ids, string $a_usage_type, string $a_table, string $a_key_field, string $a_skill_field="skill_id", string $a_tref_field="tref_id")
Get standard usage query.
◆ removeMaterial()
static ilPersonalSkill::removeMaterial |
( |
int |
$a_user_id, |
|
|
int |
$a_tref_id, |
|
|
int |
$a_level_id, |
|
|
int |
$a_wsp_id |
|
) |
| |
|
static |
◆ removeMaterials()
static ilPersonalSkill::removeMaterials |
( |
int |
$a_user_id | ) |
|
|
static |
◆ removeSkill()
static ilPersonalSkill::removeSkill |
( |
int |
$a_user_id, |
|
|
int |
$a_skill_node_id |
|
) |
| |
|
static |
◆ removeSkills()
static ilPersonalSkill::removeSkills |
( |
int |
$a_user_id | ) |
|
|
static |
◆ saveSelfEvaluation()
static ilPersonalSkill::saveSelfEvaluation |
( |
int |
$a_user_id, |
|
|
int |
$a_top_skill, |
|
|
int |
$a_tref_id, |
|
|
int |
$a_basic_skill, |
|
|
int |
$a_level |
|
) |
| |
|
static |
- Parameters
-
int | $a_user_id | user id |
int | $a_top_skill | the "selectable" top skill |
int | $a_tref_id | template reference id |
int | $a_basic_skill | the basic skill the level belongs to |
int | $a_level | level id |
Definition at line 233 of file class.ilPersonalSkill.php.
References ilBasicSkill\ACHIEVED, ilBasicSkill\resetUserSkillLevelStatus(), and ilBasicSkill\writeUserSkillLevelStatus().
Referenced by ilPersonalSkillsGUI\saveSelfEvaluation().
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 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)
The documentation for this class was generated from the following file: