43 $a_user_image =
false, $a_profile_link =
false, $a_profile_back_link =
"",
44 $a_force_first_lastname =
false, $a_omit_login =
false, $a_sortable =
true)
48 if (!($return_as_array = is_array($a_user_id)))
49 $a_user_id = array($a_user_id);
57 b.value public_profile,
63 (a.usr_id = b.usr_id AND
67 (a.usr_id = c.usr_id AND
69 WHERE ' . $ilDB->in(
'a.usr_id', $a_user_id,
false,
'integer');
71 $userrow = $ilDB->queryF($sql, array(
'text',
'text'), array(
'public_profile',
'public_title'));
75 while (
$row = $ilDB->fetchObject($userrow))
77 if ($a_force_first_lastname ||
78 $has_public_profile = in_array(
$row->public_profile, array(
"y",
"g")))
81 if(
$row->public_title ==
"y" &&
$row->title)
83 $title =
$row->title .
" ";
87 $pres =
$row->lastname;
88 if(strlen(
$row->firstname))
90 $pres .= (
', '.$row->firstname.
' ');
96 if(strlen(
$row->firstname))
98 $pres .=
$row->firstname.
' ';
100 $pres .= (
$row->lastname.
' ');
107 $pres.=
"[".$row->login.
"]";
110 if ($a_profile_link && $has_public_profile)
112 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id",
$row->usr_id);
113 if ($a_profile_back_link !=
"")
115 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"back_url",
116 rawurlencode($a_profile_back_link));
118 $pres =
'<a href="'.$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML").
'">'.$pres.
'</a>';
124 $pres =
'<img border="0" src="'.$img.
'" alt="'.$lng->txt(
"icon").
125 " ".$lng->txt(
"user_picture").
'" /> '.$pres;
128 $names[
$row->usr_id] = $pres;
131 foreach($a_user_id as $id)
134 $names[$id] =
"unknown";
137 return $return_as_array ? $names : $names[$a_user_id[0]];
149 if($public_profile !=
'y' and $public_profile !=
'g')
154 $GLOBALS[
'ilCtrl']->setParameterByClass(
'ilpublicuserprofilegui',
'user',$a_usr_id);
155 return $GLOBALS[
'ilCtrl']->getLinkTargetByClass(
'ilpublicuserprofilegui',
'getHTML');
178 if($a_force_all || ($ilSetting->get(
'disable_my_offers') == 0 &&
179 $ilSetting->get(
'disable_my_memberships') == 0))
184 if($a_force_all || !$ilSetting->get(
"disable_personal_workspace"))
189 include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
191 if($a_force_all || $settings->isEnabled())
198 foreach($all as $idx =>
$lang)
200 $all[$idx] = $lng->txt(
$lang);
217 if($a_value == self::START_REPOSITORY_OBJ)
219 $a_ref_id = (int)$a_ref_id;
221 !$tree->isDeleted($a_ref_id))
223 $ilSetting->set(
"usr_starting_point", $a_value);
224 $ilSetting->set(
"usr_starting_point_ref_id", $a_ref_id);
228 $valid = array_keys(self::getPossibleStartingPoints());
229 if(in_array($a_value,
$valid))
231 $ilSetting->set(
"usr_starting_point", $a_value);
246 $valid = array_keys(self::getPossibleStartingPoints());
247 $current = $ilSetting->get(
"usr_starting_point");
248 if($current == self::START_REPOSITORY_OBJ)
252 else if(!$current || !in_array($current,
$valid))
257 if($ilSetting->get(
'disable_my_offers') == 0 &&
258 $ilSetting->get(
'disable_my_memberships') == 0 &&
259 $ilSetting->get(
'personal_items_default_view') == 1)
266 if($ilUser->getId() == ANONYMOUS_USER_ID)
283 if(self::hasPersonalStartingPoint())
286 if($current == self::START_REPOSITORY_OBJ)
294 if($current == self::START_REPOSITORY_OBJ)
301 case self::START_REPOSITORY:
302 case self::START_REPOSITORY_OBJ:
307 include_once(
'./Services/Link/classes/class.ilLink.php');
316 self::START_PD_OVERVIEW =>
'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSelectedItems',
317 self::START_PD_SUBSCRIPTION =>
'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToMemberships',
321 self::START_PD_WORKSPACE =>
'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace',
325 self::START_PD_CALENDAR =>
'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToCalendar',
331 return $map[$current];
344 return $ilSetting->get(
"usr_starting_point_ref_id");
356 $ilSetting->set(
"usr_starting_point_personal", (
bool)$a_value);
368 return $ilSetting->get(
"usr_starting_point_personal");
380 return (
bool)$ilUser->getPref(
"usr_starting_point");
392 $valid = array_keys(self::getPossibleStartingPoints());
393 $current = $ilUser->getPref(
"usr_starting_point");
394 if($current == self::START_REPOSITORY_OBJ)
398 else if(!$current || !in_array($current,
$valid))
418 $ilUser->setPref(
"usr_starting_point", null);
419 $ilUser->setPref(
"usr_starting_point_ref_id", null);
423 if($a_value == self::START_REPOSITORY_OBJ)
425 $a_ref_id = (int)$a_ref_id;
427 !$tree->isDeleted($a_ref_id))
429 $ilUser->setPref(
"usr_starting_point", $a_value);
430 $ilUser->setPref(
"usr_starting_point_ref_id", $a_ref_id);
434 $valid = array_keys(self::getPossibleStartingPoints());
435 if(in_array($a_value,
$valid))
437 $ilUser->setPref(
"usr_starting_point", $a_value);
452 $ref_id = $ilUser->getPref(
"usr_starting_point_ref_id");