3 declare(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}()) {
evaluate(int $a_user_id, array $a_params, ?array $a_config)
Evaluate if given user has earned badge.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getDefaultPortfolio(int $a_user_id)
Get default portfolio of user.
getId()
Get typ id (unique for component)
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...
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.
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)