Skip to content

Commit

Permalink
Skill: Fix assignment of subskill to user - refs BT#22372
Browse files Browse the repository at this point in the history
  • Loading branch information
ywarnier committed Jan 31, 2025
1 parent b3c191e commit 68813ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion public/main/skills/assign.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
foreach ($subSkillList as $subSkillId) {
$children = $skillManager->getChildren($subSkillId);

if (isset($subSkillList[$counter - 1])) {
if (isset($subSkillList[$counter - 1]) && isset($subSkillList[$counter])) {
$oldSkill = $skillRepo->find($subSkillList[$counter]);
}
$skillsOptions = [];
Expand Down
4 changes: 2 additions & 2 deletions public/main/skills/issued.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
}

$acquiredLevel = [];
$profile = $skillRepo->find($skillId)->getProfile();
$profile = $skillRepo->find($skillId)->getLevelProfile();

if (!$profile) {
$skillRelSkill = new SkillRelSkillModel();
Expand All @@ -160,7 +160,7 @@

foreach ($parents as $parent) {
$skillParentId = $parent['skill_id'];
$profile = $skillRepo->find($skillParentId)->getProfile();
$profile = $skillRepo->find($skillParentId)->getLevelProfile();

if ($profile) {
break;
Expand Down
4 changes: 2 additions & 2 deletions public/main/skills/issued_all.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
}

$acquiredLevel = [];
$profile = $skillRepo->find($skillId)->getProfile();
$profile = $skillRepo->find($skillId)->getLevelProfile();

if (!$profile) {
$skillRelSkill = new SkillRelSkillModel();
Expand All @@ -118,7 +118,7 @@

foreach ($parents as $parent) {
$skillParentId = $parent['skill_id'];
$profile = $skillRepo->find($skillParentId)->getProfile();
$profile = $skillRepo->find($skillParentId)->getLevelProfile();

if ($profile) {
break;
Expand Down

0 comments on commit 68813ee

Please sign in to comment.