Skill: Fix assignment of subskill to user - refs BT#22372

pull/6065/head
Yannick Warnier 9 months ago
parent b3c191e515
commit 68813ee8ff
  1. 2
      public/main/skills/assign.php
  2. 4
      public/main/skills/issued.php
  3. 4
      public/main/skills/issued_all.php

@ -198,7 +198,7 @@ if (!empty($skillIdFromGet)) {
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 = [];

@ -150,7 +150,7 @@ foreach ($skillRelUserComments as $comment) {
}
$acquiredLevel = [];
$profile = $skillRepo->find($skillId)->getProfile();
$profile = $skillRepo->find($skillId)->getLevelProfile();
if (!$profile) {
$skillRelSkill = new SkillRelSkillModel();
@ -160,7 +160,7 @@ if (!$profile) {
foreach ($parents as $parent) {
$skillParentId = $parent['skill_id'];
$profile = $skillRepo->find($skillParentId)->getProfile();
$profile = $skillRepo->find($skillParentId)->getLevelProfile();
if ($profile) {
break;

@ -108,7 +108,7 @@ foreach ($userSkills as $index => $skillRelUser) {
}
$acquiredLevel = [];
$profile = $skillRepo->find($skillId)->getProfile();
$profile = $skillRepo->find($skillId)->getLevelProfile();
if (!$profile) {
$skillRelSkill = new SkillRelSkillModel();
@ -118,7 +118,7 @@ foreach ($userSkills as $index => $skillRelUser) {
foreach ($parents as $parent) {
$skillParentId = $parent['skill_id'];
$profile = $skillRepo->find($skillParentId)->getProfile();
$profile = $skillRepo->find($skillParentId)->getLevelProfile();
if ($profile) {
break;

Loading…
Cancel
Save