Skip to content

Commit 68813ee

Browse files
committed
Skill: Fix assignment of subskill to user - refs BT#22372
1 parent b3c191e commit 68813ee

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

public/main/skills/assign.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
foreach ($subSkillList as $subSkillId) {
199199
$children = $skillManager->getChildren($subSkillId);
200200

201-
if (isset($subSkillList[$counter - 1])) {
201+
if (isset($subSkillList[$counter - 1]) && isset($subSkillList[$counter])) {
202202
$oldSkill = $skillRepo->find($subSkillList[$counter]);
203203
}
204204
$skillsOptions = [];

public/main/skills/issued.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
}
151151

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

155155
if (!$profile) {
156156
$skillRelSkill = new SkillRelSkillModel();
@@ -160,7 +160,7 @@
160160

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

165165
if ($profile) {
166166
break;

public/main/skills/issued_all.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
}
109109

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

113113
if (!$profile) {
114114
$skillRelSkill = new SkillRelSkillModel();
@@ -118,7 +118,7 @@
118118

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

123123
if ($profile) {
124124
break;

0 commit comments

Comments
 (0)