4 require_once
"./Services/Badge/interfaces/interface.ilBadgeType.php";
5 require_once
"./Services/Badge/interfaces/interface.ilBadgeAuto.php";
27 return $lng->txt(
"badge_user_profile");
42 include_once
"Services/User/classes/Badges/class.ilUserProfileBadgeGUI.php";
46 public function evaluate($a_user_id, array $a_params, array $a_config)
57 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
62 if (!in_array(
$user->getPref(
"public_profile"), array(
"y",
"g"))) {
68 include_once(
"./Services/User/classes/class.ilUserProfile.php");
70 $pfields = $up->getStandardFields();
74 foreach ($a_config[
"profile"] as $field) {
75 $field = substr($field, 4);
77 if (substr($field, 0, 4) ==
"udf_") {
78 $udf_field_id = substr($field, 4);
79 if (
$user->getPref(
"public_udf_" . $udf_field_id) !=
"y") {
82 $udf =
$user->getUserDefinedData();
83 if ($udf[
"f_" . $udf_field_id] ==
"") {
89 if (
$user->getPref(
"public_" . $field) !=
"y") {
92 if ($field ==
"upload") {
93 if (!ilObjUser::_getPersonalPicturePath($a_user_id,
"xsmall",
true,
true)) {
99 if (isset($pfields[$field][
"method"])) {
100 $m = $pfields[$field][
"method"];
getId()
Get typ id (unique for component)
isSingleton()
Can only be created once?
getValidObjectTypes()
Get valid (repository) "parent" object types.
evaluate($a_user_id, array $a_params, array $a_config)
Evaluate if given user has earned badge.
getConfigGUIInstance()
Get GUI config instance.
static getDefaultPortfolio($a_user_id)
Get default portfolio of user.