19 declare(strict_types=1);
37 return $lng->txt(
'badge_user_profile');
71 if (!in_array($user->getPref(
'public_profile'), [
'y',
'g'])) {
78 $pfields = $up->getStandardFields();
82 if ($config !==
null && isset($config[
'profile'])) {
83 foreach ($config[
'profile'] as $field) {
84 $field = substr($field, 4);
86 if (substr($field, 0, 4) ===
'udf_') {
87 $udf_field_id = substr($field, 4);
88 if ($user->getPref(
'public_udf_' . $udf_field_id) !==
'y') {
91 $udf = $user->getUserDefinedData();
92 if ($udf[
'f_' . $udf_field_id] ==
'') {
96 if ($user->getPref(
'public_' . $field) !==
'y') {
100 if ($field ===
'upload') {
101 if (!$user->hasProfilePicture()) {
104 } elseif (isset($pfields[$field][
'method'])) {
106 $m = $pfields[$field][
'method'];
107 if (!$user->{$m}()) {
evaluate(int $user_id, array $params, ?array $config)
Evaluate if given user has earned badge.
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getDefaultPortfolio(int $a_user_id)
getId()
Get typ id (unique for component)
Class ilUserProfileBadge.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
isSingleton()
Can only be created once?
getValidObjectTypes()
Get valid (repository) "parent" object types.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getConfigGUIInstance()
Get GUI config instance.