diff --git a/Modules/Test/classes/class.ilTestQuestionRelatedObjectivesList.php b/Modules/Test/classes/class.ilTestQuestionRelatedObjectivesList.php index 1e99a377658b..8c9c72e065cb 100644 --- a/Modules/Test/classes/class.ilTestQuestionRelatedObjectivesList.php +++ b/Modules/Test/classes/class.ilTestQuestionRelatedObjectivesList.php @@ -90,8 +90,8 @@ public function loadObjectivesTitles() */ public function getQuestionRelatedObjectiveTitles($questionId): string { - if (!isset($this->objectivesByQuestion['questionId']) - || !is_array($this->objectivesByQuestion['questionId'])) { + if (!isset($this->objectivesByQuestion[$questionId]) + || !is_array($this->objectivesByQuestion[$questionId])) { return ''; } @@ -137,8 +137,8 @@ public function getObjectives(): array public function isQuestionRelatedToObjective($questionId, $objectiveId): bool { - if (!isset($this->objectivesByQuestion['questionId']) - || !is_array($this->objectivesByQuestion['questionId'])) { + if (!isset($this->objectivesByQuestion[$questionId]) + || !is_array($this->objectivesByQuestion[$questionId])) { return false; }