3declare(strict_types=1);
37 return $lng->txt(
'badge_user_profile');
55 public function evaluate(
int $a_user_id, array $a_params, ?array $a_config): bool
71 if (!in_array($user->getPref(
'public_profile'), [
'y',
'g'])) {
78 $pfields = $up->getStandardFields();
82 if ($a_config !==
null && isset($a_config[
'profile'])) {
83 foreach ($a_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') {
104 } elseif (isset($pfields[$field][
'method'])) {
106 $m = $pfields[$field][
'method'];
107 if (!$user->{$m}()) {
static getDefaultPortfolio(int $a_user_id)
Get default portfolio of user.
static _getPersonalPicturePath(int $a_usr_id, string $a_size="small", bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
evaluate(int $a_user_id, array $a_params, ?array $a_config)
Evaluate if given user has earned badge.
getValidObjectTypes()
Get valid (repository) "parent" object types.
getId()
Get typ id (unique for component)
getConfigGUIInstance()
Get GUI config instance.
isSingleton()
Can only be created once?
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...