diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index cea4f8db94..b4194dec35 100755 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -1161,10 +1161,12 @@ if (empty($details)) { $categories = array_merge($categories, $categoriesTempList); } + $userEntity = api_get_user_entity(api_get_user_id()); + /** @var CLpCategory $item */ foreach ($categories as $item) { $categoryId = $item->getId(); - if (!learnpath::categoryIsVisibleForStudent($item, api_get_user_entity(api_get_user_id()))) { + if (!learnpath::categoryIsVisibleForStudent($item, $userEntity)) { continue; }