58 $this->tabs =
$DIC->tabs();
59 $this->
user = $DIC->user();
60 $this->lng =
$DIC->language();
61 $this->setting =
$DIC->settings();
62 $this->tpl =
$DIC->ui()->mainTemplate();
63 $this->ctrl =
$DIC->ctrl();
70 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
73 $this->lng->loadLanguageModule(
"jsmath");
74 $this->lng->loadLanguageModule(
"pd");
75 $this->upload_error =
"";
76 $this->password_error =
"";
77 $this->lng->loadLanguageModule(
"user");
78 $this->ctrl->saveParameter($this,
"prompted");
96 $ilTabs =
$DIC[
'ilTabs'];
99 $next_class = $this->ctrl->getNextClass();
101 switch ($next_class) {
102 case "ilpublicuserprofilegui":
103 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
106 $pub_profile_gui->setBackUrl(
$ilCtrl->getLinkTarget($this,
"showPersonalData"));
107 $ilCtrl->forwardCommand($pub_profile_gui);
108 $tpl->printToStdout();
111 case "iluserprivacysettingsgui":
114 $ilTabs->activateTab(
"visibility_settings");
122 $cmd = $this->ctrl->getCmd(
"showPersonalData");
136 return $this->user_settings_config->isVisibleAndChangeable($setting);
145 return $this->user_settings_config->isVisible($setting);
154 return $this->user_settings_config->isChangeable($setting);
167 if (!$this->form->hasFileUpload(
"userfile")) {
168 if ($this->form->getItemByPostVar(
"userfile")->getDeletionFlag()) {
174 $image_dir = $webspace_dir .
"/usr_images";
175 $store_file =
"usr_" .
$ilUser->getID() .
"." .
"jpg";
178 $ilUser->setPref(
"profile_image", $store_file);
183 $pi = pathinfo($_FILES[
"userfile"][
"name"]);
184 $uploaded_file = $this->form->moveFileUpload(
187 "upload_" .
$ilUser->getId() .
"." . $pi[
"extension"]
189 if (!$uploaded_file) {
191 $this->ctrl->redirect($this,
"showProfile");
193 chmod($uploaded_file, 0770);
197 $show_file =
"$image_dir/usr_" .
$ilUser->getId() .
".jpg";
198 $thumb_file =
"$image_dir/usr_" .
$ilUser->getId() .
"_small.jpg";
199 $xthumb_file =
"$image_dir/usr_" .
$ilUser->getId() .
"_xsmall.jpg";
200 $xxthumb_file =
"$image_dir/usr_" .
$ilUser->getId() .
"_xxsmall.jpg";
208 ilUtil::execConvert($uploaded_file .
"[0] -geometry 200x200^ -gravity center -extent 200x200 -quality 100 JPEG:" . $show_file);
209 ilUtil::execConvert($uploaded_file .
"[0] -geometry 100x100^ -gravity center -extent 100x100 -quality 100 JPEG:" . $thumb_file);
210 ilUtil::execConvert($uploaded_file .
"[0] -geometry 75x75^ -gravity center -extent 75x75 -quality 100 JPEG:" . $xthumb_file);
211 ilUtil::execConvert($uploaded_file .
"[0] -geometry 30x30^ -gravity center -extent 30x30 -quality 100 JPEG:" . $xxthumb_file);
213 ilUtil::execConvert($uploaded_file .
"[0] -geometry 200x200 -quality 100 JPEG:" . $show_file);
214 ilUtil::execConvert($uploaded_file .
"[0] -geometry 100x100 -quality 100 JPEG:" . $thumb_file);
215 ilUtil::execConvert($uploaded_file .
"[0] -geometry 75x75 -quality 100 JPEG:" . $xthumb_file);
216 ilUtil::execConvert($uploaded_file .
"[0] -geometry 30x30 -quality 100 JPEG:" . $xxthumb_file);
257 if ((
$_POST[
"chk_pub"]) ==
"on") {
258 $ilUser->setPref(
"public_profile",
"y");
260 $ilUser->setPref(
"public_profile",
"n");
264 $val_array = array(
"institution",
"department",
"upload",
"street",
265 "zip",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
266 "fax",
"email",
"second_email",
"hobby",
"matriculation");
269 foreach ($val_array as $key => $value) {
270 if ((
$_POST[
"chk_" . $value]) ==
"on") {
271 $ilUser->setPref(
"public_" . $value,
"y");
273 $ilUser->setPref(
"public_" . $value,
"n");
278 foreach ($this->
settings as $key => $val) {
279 if (substr($key, 0, 8) ==
"require_") {
280 $require_keys[] = substr($key, 8);
284 foreach ($require_keys as $key => $val) {
286 $system_fields = array(
"login",
"default_role",
"passwd",
"passwd2");
287 if (!in_array($val, $system_fields)) {
289 if (isset($this->
settings[
"require_" . $val]) && $this->
settings[
"require_" . $val]) {
290 if (empty(
$_POST[
"usr_" . $val])) {
291 ilUtil::sendFailure($this->lng->txt(
"fill_out_all_required_fields") .
": " . $this->lng->txt($val));
390 if (
$_POST[
"usr_skin_style"] !=
"") {
391 $sknst = explode(
":",
$_POST[
"usr_skin_style"]);
393 if (
$ilUser->getPref(
"style") != $sknst[1] ||
394 $ilUser->getPref(
"skin") != $sknst[0]) {
395 $ilUser->setPref(
"skin", $sknst[0]);
396 $ilUser->setPref(
"style", $sknst[1]);
415 if (
$_POST[
"hits_per_page"] !=
"") {
428 if (
$_POST[
"chk_hide_own_online_status"] !=
"") {
429 $ilUser->setPref(
"hide_own_online_status",
"y");
431 $ilUser->setPref(
"hide_own_online_status",
"n");
448 $ilUser->setProfileIncomplete(
false);
457 include_once
'./Services/Search/classes/Lucene/class.ilLuceneIndexer.php';
463 if (!empty($this->password_error)) {
465 } elseif (!empty($this->upload_error)) {
469 ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"),
true);
470 $this->ctrl->redirect($this,
"");
472 ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"),
true);
494 $this->tabs->clearTargets();
495 $this->tabs->clearSubTabs();
497 $tpl = new \ilTemplate(
'tpl.view_terms_of_service.html',
true,
true,
'Services/Init');
499 $this->tpl->setTitle($this->lng->txt(
'usr_agreement'));
502 if ($handleDocument) {
503 $document = $this->termsOfServiceEvaluation->document();
504 $tpl->setVariable(
'TERMS_OF_SERVICE_CONTENT', $document->content());
507 'TERMS_OF_SERVICE_CONTENT',
509 $this->lng->txt(
'no_agreement_description'),
515 $this->tpl->setContent(
$tpl->get());
516 $this->tpl->setPermanentLink(
'usr',
null,
'agreement');
517 $this->tpl->printToStdout();
533 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
539 $this->lng->loadLanguageModule(
"maps");
547 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
549 $latitude = $def[
"latitude"];
550 $longitude = $def[
"longitude"];
551 $zoom = $def[
"zoom"];
556 $street = $this->lng->txt(
"street");
560 $city = $this->lng->txt(
"city");
564 $country = $this->lng->txt(
"country");
569 $this->lng->txt(
"location"),
572 $loc_prop->setLatitude($latitude);
573 $loc_prop->setLongitude($longitude);
574 $loc_prop->setZoom($zoom);
575 $loc_prop->setAddress($street .
"," . $city .
"," . $country);
585 $ilTabs =
$DIC[
'ilTabs'];
587 $ilHelp =
$DIC[
'ilHelp'];
589 $ilHelp->setScreenIdComponent(
"user");
594 $this->lng->txt(
"user_profile_data"),
595 $this->ctrl->getLinkTarget($this,
"showPersonalData")
601 $this->lng->txt(
"user_publish_options"),
602 $this->ctrl->getLinkTarget($this,
"showPublicProfile")
606 $txt_visibility = $this->checklist_status->anyVisibilitySettings()
607 ? $this->lng->txt(
"user_visibility_settings")
608 : $this->lng->txt(
"preview");
610 "visibility_settings",
612 $this->ctrl->getLinkTargetByClass(
"ilUserPrivacySettingsGUI",
"")
618 $this->lng->txt(
"export") .
"/" . $this->lng->txt(
"import"),
619 $this->ctrl->getLinkTarget($this,
"showExportImport")
639 if ($this->
userSettingVisible(
"matriculation") or count($this->user_defined_fields->getVisibleDefinitions())
640 or $d_set->get(
"user_profile") ==
"1") {
652 $user_defined_data =
$ilUser->getUserDefinedData();
653 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
655 $this->tpl->setCurrentBlock(
"field_text");
657 if (!$definition[
'changeable']) {
658 $this->tpl->setVariable(
"DISABLED_FIELD",
'disabled=\"disabled\"');
659 $this->tpl->setVariable(
"FIELD_NAME",
'udf[' . $definition[
'field_id'] .
']');
661 $this->tpl->setVariable(
"FIELD_NAME",
'udf[' . $definition[
'field_id'] .
']');
663 $this->tpl->parseCurrentBlock();
665 if ($definition[
'changeable']) {
666 $name =
'udf[' . $definition[
'field_id'] .
']';
672 $this->tpl->setCurrentBlock(
"field_select");
674 $user_defined_data[$field_id],
676 $this->user_defined_fields->fieldValuesToSelectArray(
677 $definition[
'field_values']
686 $this->tpl->parseCurrentBlock();
688 $this->tpl->setCurrentBlock(
"user_defined");
690 if ($definition[
'required']) {
691 $name = $definition[
'field_name'] .
"<span class=\"asterisk\">*</span>";
693 $name = $definition[
'field_name'];
695 $this->tpl->setVariable(
"TXT_FIELD_NAME",
$name);
696 $this->tpl->parseCurrentBlock();
703 foreach ($this->user_defined_fields->getVisibleDefinitions() as $definition) {
704 $field_id = $definition[
'field_id'];
705 if ($definition[
'required'] and !strlen(
$_POST[
'udf'][$field_id])) {
717 $this->tpl->setTitle($this->lng->txt(
'personal_profile'));
735 $ilTabs =
$DIC[
'ilTabs'];
738 $ilTabs->activateTab(
"personal_data");
742 if (
$_GET[
"prompted"] == 1) {
743 $it = $prompt_service->data()->getSettings()->getPromptText(
$ilUser->getLanguage());
746 $it = $prompt_service->data()->getSettings()->getInfoText(
$ilUser->getLanguage());
748 if (trim($it) !==
"") {
749 $pub_prof = in_array(
$ilUser->prefs[
"public_profile"], array(
"y",
"n",
"g"))
750 ?
$ilUser->prefs[
"public_profile"]
752 $box =
$DIC->ui()->factory()->messageBox()->info($it);
753 if ($pub_prof ===
"n") {
754 $box = $box->withLinks(
755 [
$DIC->ui()->factory()->link()->standard(
756 $lng->txt(
"user_make_profile_public"),
757 $ctrl->getLinkTarget($this,
"showPublicProfile")
761 $it =
$DIC->ui()->renderer()->render($box);
770 if (
$ilUser->getProfileIncomplete()) {
774 $this->tpl->setContent($it . $this->form->getHTML());
776 $this->tpl->printToStdout();
789 $styleDefinition =
$DIC[
'styleDefinition'];
790 $rbacreview =
$DIC[
'rbacreview'];
792 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
794 $this->form->setFormAction($this->ctrl->getFormAction($this));
797 $user_defined_data =
$ilUser->getUserDefinedData();
800 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
801 $value = $user_defined_data[
"f_" . $field_id];
803 include_once
'./Services/User/classes/class.ilCustomUserFieldsHelper.php';
806 $definition[
'changeable'],
810 $this->input[
'udf_' . $definition[
'field_id']] = $fprop;
815 include_once(
"./Services/User/classes/class.ilUserProfile.php");
817 $up->skipField(
"password");
818 $up->skipGroup(
"settings");
819 $up->skipGroup(
"preferences");
821 $up->setAjaxCallback(
822 $this->ctrl->getLinkTargetByClass(
'ilPublicUserProfileGUI',
'doProfileAutoComplete',
'',
true)
826 $up->addStandardFieldsToForm($this->form,
$ilUser, $this->input);
830 $this->form->addCommandButton(
"savePersonalData",
$lng->txt(
"user_save_continue"));
848 if ($this->form->checkInput()) {
853 "firstname" =>
"FirstName",
854 "lastname" =>
"LastName",
856 "sel_country" =>
"SelectedCountry",
857 "phone_office" =>
"PhoneOffice",
858 "phone_home" =>
"PhoneHome",
859 "phone_mobile" =>
"PhoneMobile",
860 "referral_comment" =>
"Comment",
861 "interests_general" =>
"GeneralInterests",
862 "interests_help_offered" =>
"OfferingHelp",
863 "interests_help_looking" =>
"LookingForHelp"
865 include_once(
"./Services/User/classes/class.ilUserProfile.php");
867 foreach ($up->getStandardFields() as
$f => $p) {
869 $item = $this->form->getItemByPostVar(
"usr_" .
$f);
870 if ($item && !$item->getDisabled()) {
871 $value = $this->form->getInput(
"usr_" .
$f);
874 $value = $item->getDate();
880 $ilUser->setSecondEmail($value);
884 if (isset($map[
$f])) {
895 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
898 $location = $this->form->getInput(
"location");
902 $ilUser->setLatitude(is_numeric($lat) ? $lat :
null);
903 $ilUser->setLongitude(is_numeric($long) ? $long :
null);
904 $ilUser->setLocationZoom(is_numeric($zoom) ? $zoom :
null);
908 $defs = $this->user_defined_fields->getVisibleDefinitions();
910 foreach ($defs as $definition) {
911 $f =
"udf_" . $definition[
'field_id'];
912 $item = $this->form->getItemByPostVar(
$f);
913 if ($item && !$item->getDisabled()) {
914 $udf[$definition[
'field_id']] = $this->form->getInput(
$f);
917 $ilUser->setUserDefinedData($udf);
920 $un = $this->form->getInput(
'username');
921 if ((
int)
$ilSetting->get(
'allow_change_loginname') &&
925 $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'login_invalid'));
929 $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'loginname_already_exists'));
938 $this->form->getItemByPostVar(
'username')->setAlert(
$e->getMessage());
949 $ilUser->setProfileIncomplete(
false);
958 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
960 $ilCtrl->redirect($this,
"showPublicProfile");
964 $this->form->setValuesByPost();
979 $ilTabs = $this->tabs;
981 $ilTabs->activateTab(
"public_profile");
987 $this->initPublicProfileForm();
990 $this->tpl->setContent($this->form->getHTML());
991 $this->tpl->printToStdout();
1007 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
1025 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1028 $this->form->setTitle(
$lng->txt(
"user_publish_options"));
1029 $this->form->setDescription(
$lng->txt(
"user_public_profile_info"));
1030 $this->form->setFormAction($this->ctrl->getFormAction($this));
1032 $portfolio_id = $this->getProfilePortfolio();
1034 if (!$portfolio_id) {
1037 $info = $this->lng->txt(
"user_activate_public_profile_info");
1039 $pub_prof = $profile_mode->getMode();
1040 $radg->setValue($pub_prof);
1041 $op1 =
new ilRadioOption(
$lng->txt(
"usr_public_profile_disabled"),
"n",
$lng->txt(
"usr_public_profile_disabled_info"));
1042 $radg->addOption($op1);
1044 $radg->addOption($op2);
1045 if (
$ilSetting->get(
'enable_global_profiles')) {
1047 $radg->addOption($op3);
1049 $this->form->addItem($radg);
1054 $prtf =
"<br />" .
$lng->txt(
"user_profile_portfolio");
1055 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToPortfolio\">» " .
1056 $lng->txt(
"user_portfolios") .
"</a>";
1060 $radg->setInfo($info);
1062 $prtf =
$lng->txt(
"user_profile_portfolio_selected");
1063 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToPortfolio&prt_id=" . $portfolio_id .
"\">» " .
1064 $lng->txt(
"portfolio") .
"</a>";
1067 $info->setHTML($prtf);
1068 $this->form->addItem($info);
1069 $this->showPublicProfileFields($this->form,
$ilUser->prefs);
1072 if (is_object($op2)) {
1073 $this->showPublicProfileFields($this->form,
$ilUser->prefs, $op2,
false,
"-1");
1075 if (is_object($op3)) {
1076 $this->showPublicProfileFields($this->form,
$ilUser->prefs, $op3,
false,
"-2");
1078 $this->form->setForceTopButtons(
true);
1079 $this->form->addCommandButton(
"savePublicProfile",
$lng->txt(
"user_save_continue"));
1091 ilPropertyformGUI $form,
1094 $anonymized =
false,
1101 $birthday =
$ilUser->getBirthday();
1105 $gender =
$ilUser->getGender();
1107 $gender = $this->lng->txt(
"gender_" . $gender);
1110 if (
$ilUser->getSelectedCountry() !=
"") {
1111 $this->lng->loadLanguageModule(
"meta");
1112 $txt_sel_country = $this->lng->txt(
"meta_c_" .
$ilUser->getSelectedCountry());
1118 $pic =
"<img src=\"" . $pic .
"\" />";
1123 "title" =>
$ilUser->getUTitle(),
1124 "birthday" => $birthday,
1125 "gender" => $gender,
1127 "interests_general" =>
$ilUser->getGeneralInterestsAsText(),
1128 "interests_help_offered" =>
$ilUser->getOfferingHelpAsText(),
1129 "interests_help_looking" =>
$ilUser->getLookingForHelpAsText(),
1130 "org_units" =>
$ilUser->getOrgUnitsRepresentation(),
1131 "institution" =>
$ilUser->getInstitution(),
1132 "department" =>
$ilUser->getDepartment(),
1133 "street" =>
$ilUser->getStreet(),
1134 "zipcode" =>
$ilUser->getZipcode(),
1136 "country" =>
$ilUser->getCountry(),
1137 "sel_country" => $txt_sel_country,
1138 "phone_office" =>
$ilUser->getPhoneOffice(),
1139 "phone_home" =>
$ilUser->getPhoneHome(),
1140 "phone_mobile" =>
$ilUser->getPhoneMobile(),
1142 "email" =>
$ilUser->getEmail(),
1143 "second_email" =>
$ilUser->getSecondEmail(),
1144 "hobby" =>
$ilUser->getHobby(),
1145 "matriculation" =>
$ilUser->getMatriculation()
1149 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
1151 $val_array[
"location"] = ((int)
$ilUser->getLatitude() + (int)
$ilUser->getLongitude() + (int)
$ilUser->getLocationZoom() > 0)
1155 foreach ($val_array as $key => $value) {
1156 if (in_array($value, [
"",
"-"]) && !$anonymized) {
1163 if ($this->userSettingVisible($key)) {
1167 $caption =
"personal_picture";
1171 $caption =
"person_title";
1177 $cb =
new ilCheckboxInputGUI($this->lng->txt($caption),
"chk_" . $key . $key_suffix);
1178 if ($prefs[
"public_" . $key] ==
"y") {
1179 $cb->setChecked(
true);
1182 $cb->setOptionTitle($value);
1185 $form->addItem($cb);
1187 $parent->addSubItem($cb);
1193 $user_defined_data = array();
1195 $user_defined_data =
$ilUser->getUserDefinedData();
1197 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
1199 $cb =
new ilCheckboxInputGUI($definition[
"field_name"],
"chk_udf_" . $definition[
"field_id"]);
1200 $cb->setOptionTitle($user_defined_data[
"f_" . $definition[
"field_id"]]);
1201 if ($prefs[
"public_udf_" . $definition[
"field_id"]] ==
"y") {
1202 $cb->setChecked(
true);
1206 $form->addItem($cb);
1208 $parent->addSubItem($cb);
1213 include_once
"Services/Badge/classes/class.ilBadgeHandler.php";
1215 if ($handler->isActive()) {
1216 $badge_options = array();
1218 include_once
"Services/Badge/classes/class.ilBadgeAssignment.php";
1219 include_once
"Services/Badge/classes/class.ilBadge.php";
1222 if ($ass->getPosition()) {
1223 $badge =
new ilBadge($ass->getBadgeId());
1224 $badge_options[] = $badge->getTitle();
1228 if (
sizeof($badge_options) > 1) {
1230 $badge_order->setMultiValues($badge_options);
1231 $badge_order->setValue(array_shift($badge_options));
1232 $badge_order->setMulti(
true,
true,
false);
1235 $form->addItem($badge_order);
1237 $parent->addSubItem($badge_order);
1247 $form->addItem($ne);
1249 $parent->addSubItem($ne);
1267 $this->initPublicProfileForm();
1268 if ($this->form->checkInput()) {
1270 if (isset(
$_POST[
"public_profile"])) {
1271 $ilUser->setPref(
"public_profile",
$_POST[
"public_profile"]);
1275 $val_array = array(
"title",
"birthday",
"gender",
"org_units",
"institution",
"department",
"upload",
1276 "street",
"zipcode",
"city",
"country",
"sel_country",
"phone_office",
"phone_home",
"phone_mobile",
1277 "fax",
"email",
"second_email",
"hobby",
"matriculation",
"location",
1278 "interests_general",
"interests_help_offered",
"interests_help_looking");
1281 $checked_values = $this->getCheckedValues();
1282 foreach ($val_array as $key => $value) {
1283 if (($checked_values[
"chk_" . $value])) {
1284 $ilUser->setPref(
"public_" . $value,
"y");
1286 $ilUser->setPref(
"public_" . $value,
"n");
1291 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
1292 if (($checked_values[
"chk_udf_" . $definition[
"field_id"]])) {
1293 $ilUser->setPref(
"public_udf_" . $definition[
"field_id"],
"y");
1295 $ilUser->setPref(
"public_udf_" . $definition[
"field_id"],
"n");
1301 switch (
$_POST[
"public_profile"]) {
1310 include_once
"Services/Badge/classes/class.ilBadgeHandler.php";
1312 if ($handler->isActive()) {
1313 $badgePositions = [];
1314 if (isset(
$_POST[
"bpos" . $key_suffix]) && is_array(
$_POST[
"bpos" . $key_suffix])) {
1315 $badgePositions =
$_POST[
"bpos" . $key_suffix];
1318 if (count($badgePositions) > 0) {
1319 include_once
"Services/Badge/classes/class.ilBadgeAssignment.php";
1325 include_once
'./Services/Search/classes/Lucene/class.ilLuceneIndexer.php';
1328 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
1336 } elseif ($redirect =
$_SESSION[
'profile_complete_redirect']) {
1337 unset(
$_SESSION[
'profile_complete_redirect']);
1340 $ilCtrl->redirectByClass(
"iluserprivacysettingsgui",
"");
1343 $this->form->setValuesByPost();
1344 $tpl->showPublicProfile(
true);
1354 $checked_values = [];
1355 foreach (
$_POST as $k => $v) {
1356 if (substr($k, 0, 4) ==
"chk_") {
1357 $k = str_replace(
"-1",
"", $k);
1358 $k = str_replace(
"-2",
"", $k);
1359 $checked_values[$k] = $v;
1362 return $checked_values;
1376 $ilToolbar =
$DIC[
'ilToolbar'];
1379 $ilTabs =
$DIC[
'ilTabs'];
1382 $ilTabs->activateTab(
"export");
1385 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
1387 $button->setCaption(
"pd_export_profile");
1388 $button->setUrl(
$ilCtrl->getLinkTarget($this,
"exportPersonalData"));
1389 $ilToolbar->addStickyItem($button);
1391 $exp_file =
$ilUser->getPersonalDataExportFile();
1392 if ($exp_file !=
"") {
1393 $ilToolbar->addSeparator();
1394 $ilToolbar->addButton(
1395 $this->lng->txt(
"pd_download_last_export_file"),
1396 $ilCtrl->getLinkTarget($this,
"downloadPersonalData")
1400 $ilToolbar->addSeparator();
1401 $ilToolbar->addButton(
1402 $this->lng->txt(
"pd_import_personal_data"),
1403 $ilCtrl->getLinkTarget($this,
"importPersonalDataSelection")
1406 $tpl->printToStdout();
1420 $ilUser->exportPersonalData();
1421 $ilUser->sendPersonalDataFile();
1422 $ilCtrl->redirect($this,
"showExportImport");
1437 $ilUser->sendPersonalDataFile();
1453 $ilTabs =
$DIC[
'ilTabs'];
1455 $ilTabs->activateTab(
"export");
1458 $this->initPersonalDataImportForm();
1460 $tpl->setContent($this->form->getHTML());
1461 $tpl->printToStdout();
1477 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1482 $fi->setRequired(
true);
1483 $fi->setSuffixes(array(
"zip"));
1484 $this->form->addItem($fi);
1488 $this->form->addItem($cb);
1492 $this->form->addItem($cb);
1496 $this->form->addItem($cb);
1500 $this->form->addItem($cb);
1502 $this->form->addCommandButton(
"importPersonalData",
$lng->txt(
"import"));
1503 $this->form->addCommandButton(
"showExportImport",
$lng->txt(
"cancel"));
1505 $this->form->setTitle(
$lng->txt(
"pd_import_personal_data"));
1506 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
1523 $ilTabs =
$DIC[
'ilTabs'];
1525 $this->initPersonalDataImportForm();
1526 if ($this->form->checkInput()) {
1529 (
int)
$_POST[
"profile_data"],
1530 (
int)
$_POST[
"settings"],
1534 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1537 $ilTabs->activateTab(
"export");
1539 $this->form->setValuesByPost();
1540 $tpl->setContent($this->form->getHtml());
1541 $tpl->printToStdout();
1554 $main_tpl->setRightContent($this->checklist->render($active_step));
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
static getInstancesByUserId($a_user_id)
static updatePositions($a_user_id, array $a_positions)
static getInstance()
Constructor.
static getInstance()
Get instance.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static updateLuceneIndex($a_obj_ids)
Update lucene index.
static isActivated()
Checks whether Map feature is activated.
static getDefaultSettings()
Get default longitude, latitude and zoom.
This class represents a non editable value in a property form.
static getDefaultPortfolio($a_user_id)
Get default portfolio of user.
static _getPersonalPicturePath( $a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
getLatitude()
Get Latitude.
getCountry()
Get country (free text)
getLongitude()
Get Longitude.
getLocationZoom()
Get Location Zoom.
getStreet()
get street @access public
getCity()
get city @access public
static _loginExists($a_login, $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
GUI class for personal profile.
saveProfile()
save user profile data
initPersonalDataImportForm()
Init personal data import form.
showPersonalData($a_no_init=false, $a_migration_started=false)
Personal data form.
getCheckedValues()
Get checked values.
importPersonalData()
Import personal data.
showPublicProfile($a_no_init=false)
Public profile form.
__construct(\ilTermsOfServiceDocumentEvaluation $termsOfServiceEvaluation=null)
constructor
executeCommand()
execute command
userSettingEnabled(string $setting)
$termsOfServiceEvaluation
initPersonalDataForm()
Init personal form.
savePersonalData()
Save personal data form.
savePublicProfile()
Save public profile form.
exportPersonalData()
Export personal data.
userSettingVisible(string $setting)
removeUserPicture()
remove user image
__checkUserDefinedRequiredFields()
getProfilePortfolio()
has profile set to a portfolio?
showExportImport()
Show export/import.
__showUserDefinedFields()
workWithUserSetting(string $setting)
uploadUserPicture()
Upload user image.
downloadPersonalData()
Download personal data export file.
showPublicProfileFields(ilPropertyformGUI $form, array $prefs, $parent=null, $anonymized=false, $key_suffix="")
Add fields to form.
__showOtherInformations()
importPersonalDataSelection()
Import personal data selection.
initPublicProfileForm()
Init public profile form.
showProfile()
show profile form
showChecklist($active_step)
Show checklist.
addLocationToForm(ilPropertyFormGUI $a_form, ilObjUser $a_user)
Add location fields to form if activated.
Personal profile publishing mode of a iser.
const STEP_VISIBILITY_OPTIONS
const STEP_PUBLISH_OPTIONS
GUI class for public user profile presentation.
This class represents an option in a radio group.
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.
static _getInstance()
Get instance.
Class for user related exception handling in ILIAS.
User privacy settings (currently located under "Profile and Privacy")
User profile prompt subservice.
User settings configuration (what preferences can be visible/changed/...)
static isConvertVersionAtLeast($a_version)
Compare convert version numbers.
static escapeShellArg($a_arg)
static getWebspaceDir($mode="filesystem")
get webspace directory
static execConvert($args)
execute convert command
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static is_email($a_email, ilMailRfc822AddressParserFactory $mailAddressParserFactory=null)
This preg-based function checks whether an e-mail address is formally valid.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
Interface ilTermsOfServiceDocumentEvaluation.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl