29 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
36 $this->settings =
$ilias->getAllSettings();
37 $lng->loadLanguageModule(
"jsmath");
38 $lng->loadLanguageModule(
"pd");
39 $this->upload_error =
"";
40 $this->password_error =
"";
41 $lng->loadLanguageModule(
"user");
52 $next_class = $this->ctrl->getNextClass();
56 case "ilpublicuserprofilegui":
57 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
60 $pub_profile_gui->setBackUrl(
$ilCtrl->getLinkTarget($this,
"showPersonalData"));
61 $ilCtrl->forwardCommand($pub_profile_gui);
67 $cmd = $this->ctrl->getCmd(
"showPersonalData");
82 if ($this->settings[
"usr_settings_hide_".$setting] == 1)
86 if ($this->settings[
"usr_settings_disable_".$setting] == 1)
100 if (isset($this->settings[
"usr_settings_hide_".$setting]) &&
101 $this->settings[
"usr_settings_hide_".$setting] == 1)
115 if ($this->settings[
"usr_settings_disable_".$setting] == 1)
131 if (!$this->form->hasFileUpload(
"userfile"))
133 if ($this->form->getItemByPostVar(
"userfile")->getDeletionFlag())
142 $image_dir = $webspace_dir.
"/usr_images";
143 $store_file =
"usr_".$ilUser->getID().
".".
"jpg";
146 $ilUser->setPref(
"profile_image", $store_file);
150 $uploaded_file = $this->form->moveFileUpload($image_dir,
151 "userfile",
"upload_".
$ilUser->getId().
"pic");
156 $this->ctrl->redirect($this,
"showProfile");
158 chmod($uploaded_file, 0770);
162 $show_file =
"$image_dir/usr_".$ilUser->getId().
".jpg";
163 $thumb_file =
"$image_dir/usr_".$ilUser->getId().
"_small.jpg";
164 $xthumb_file =
"$image_dir/usr_".$ilUser->getId().
"_xsmall.jpg";
165 $xxthumb_file =
"$image_dir/usr_".$ilUser->getId().
"_xxsmall.jpg";
174 ilUtil::execConvert($uploaded_file .
"[0] -geometry 200x200^ -gravity center -extent 200x200 -quality 100 JPEG:".$show_file);
175 ilUtil::execConvert($uploaded_file .
"[0] -geometry 100x100^ -gravity center -extent 100x100 -quality 100 JPEG:".$thumb_file);
176 ilUtil::execConvert($uploaded_file .
"[0] -geometry 75x75^ -gravity center -extent 75x75 -quality 100 JPEG:".$xthumb_file);
177 ilUtil::execConvert($uploaded_file .
"[0] -geometry 30x30^ -gravity center -extent 30x30 -quality 100 JPEG:".$xxthumb_file);
181 ilUtil::execConvert($uploaded_file .
"[0] -geometry 200x200 -quality 100 JPEG:".$show_file);
182 ilUtil::execConvert($uploaded_file .
"[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
183 ilUtil::execConvert($uploaded_file .
"[0] -geometry 75x75 -quality 100 JPEG:".$xthumb_file);
184 ilUtil::execConvert($uploaded_file .
"[0] -geometry 30x30 -quality 100 JPEG:".$xxthumb_file);
220 if ((
$_POST[
"chk_pub"])==
"on")
222 $ilUser->setPref(
"public_profile",
"y");
226 $ilUser->setPref(
"public_profile",
"n");
230 $val_array = array(
"institution",
"department",
"upload",
"street",
231 "zip",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
232 "fax",
"email",
"hobby",
"matriculation");
235 foreach($val_array as $key => $value)
237 if ((
$_POST[
"chk_".$value]) ==
"on")
239 $ilUser->setPref(
"public_".$value,
"y");
243 $ilUser->setPref(
"public_".$value,
"n");
248 if ($d_set->get(
"user_profile"))
250 if ((
$_POST[
"chk_delicious"]) ==
"on")
252 $ilUser->setPref(
"public_delicious",
"y");
256 $ilUser->setPref(
"public_delicious",
"n");
262 foreach($this->settings as $key => $val)
264 if (substr($key,0,8) ==
"require_")
266 $require_keys[] = substr($key,8);
270 foreach($require_keys as $key => $val)
273 $system_fields = array(
"login",
"default_role",
"passwd",
"passwd2");
274 if (!in_array($val, $system_fields))
278 if (isset($this->settings[
"require_" . $val]) && $this->settings[
"require_" . $val])
280 if (empty(
$_POST[
"usr_" . $val]))
282 ilUtil::sendFailure($this->lng->txt(
"fill_out_all_required_fields") .
": " . $this->lng->txt($val));
318 $ilUser->setGender(
$_POST[
"usr_gender"]);
384 if ($d_set->get(
"user_profile"))
413 if (
$_POST[
"usr_skin_style"] !=
"")
415 $sknst = explode(
":",
$_POST[
"usr_skin_style"]);
417 if (
$ilUser->getPref(
"style") != $sknst[1] ||
418 $ilUser->getPref(
"skin") != $sknst[0])
420 $ilUser->setPref(
"skin", $sknst[0]);
421 $ilUser->setPref(
"style", $sknst[1]);
432 if (
$_POST[
"usr_language"] != $ilUser->getLanguage())
444 if (
$_POST[
"hits_per_page"] !=
"")
446 $ilUser->setPref(
"hits_per_page",
$_POST[
"hits_per_page"]);
453 $ilUser->setPref(
"show_users_online",
$_POST[
"show_users_online"]);
459 if (
$_POST[
"chk_hide_own_online_status"] !=
"")
461 $ilUser->setPref(
"hide_own_online_status",
"y");
465 $ilUser->setPref(
"hide_own_online_status",
"n");
482 $ilUser->setProfileIncomplete(
false);
491 include_once
'./Services/Search/classes/Lucene/class.ilLuceneIndexer.php';
497 if (!empty($this->password_error))
501 elseif (!empty($this->upload_error))
509 $this->ctrl->redirect($this,
"");
542 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
549 $this->lng->loadLanguageModule(
"maps");
557 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
560 $latitude = $def[
"latitude"];
561 $longitude = $def[
"longitude"];
562 $zoom = $def[
"zoom"];
568 $street = $this->lng->txt(
"street");
573 $city = $this->lng->txt(
"city");
578 $country = $this->lng->txt(
"country");
584 $loc_prop->setLatitude($latitude);
585 $loc_prop->setLongitude($longitude);
586 $loc_prop->setZoom($zoom);
587 $loc_prop->setAddress($street.
",".$city.
",".$country);
595 global $ilTabs,
$ilUser, $ilHelp;
597 $ilHelp->setScreenIdComponent(
"user");
600 $ilTabs->addTab(
"personal_data",
601 $this->lng->txt(
"personal_data"),
602 $this->ctrl->getLinkTarget($this,
"showPersonalData"));
605 $ilTabs->addTab(
"public_profile",
606 $this->lng->txt(
"public_profile"),
607 $this->ctrl->getLinkTarget($this,
"showPublicProfile"));
610 $ilTabs->addTab(
"export",
611 $this->lng->txt(
"export").
"/".$this->lng->txt(
"import"),
612 $this->ctrl->getLinkTarget($this,
"showExportImport"));
614 if(
$ilUser->getPref(
"public_profile") !=
"n" || $this->getProfilePortfolio())
617 $ilTabs->addNonTabbedLink(
"profile_preview",
618 $this->lng->txt(
"user_profile_preview"),
619 $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"view"));
627 if($this->
userSettingVisible(
"matriculation") or count($this->user_defined_fields->getVisibleDefinitions())
628 or $d_set->get(
"user_profile") ==
"1")
639 $user_defined_data =
$ilUser->getUserDefinedData();
640 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
644 $this->tpl->setCurrentBlock(
"field_text");
646 if(!$definition[
'changeable'])
648 $this->tpl->setVariable(
"DISABLED_FIELD",
'disabled=\"disabled\"');
649 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
653 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
655 $this->tpl->parseCurrentBlock();
659 if($definition[
'changeable'])
661 $name =
'udf['.$definition[
'field_id'].
']';
669 $this->tpl->setCurrentBlock(
"field_select");
670 $this->tpl->setVariable(
"SELECT_BOX",
ilUtil::formSelect($user_defined_data[$field_id],
672 $this->user_defined_fields->fieldValuesToSelectArray(
673 $definition[
'field_values']),
675 true,0,
'',
'',$disabled));
676 $this->tpl->parseCurrentBlock();
678 $this->tpl->setCurrentBlock(
"user_defined");
680 if($definition[
'required'])
682 $name = $definition[
'field_name'].
"<span class=\"asterisk\">*</span>";
686 $name = $definition[
'field_name'];
688 $this->tpl->setVariable(
"TXT_FIELD_NAME",$name);
689 $this->tpl->parseCurrentBlock();
696 foreach($this->user_defined_fields->getVisibleDefinitions() as $definition)
698 $field_id = $definition[
'field_id'];
699 if($definition[
'required'] and !strlen(
$_POST[
'udf'][$field_id]))
712 $this->tpl->setTitle($this->lng->txt(
'personal_profile'));
728 $ilTabs->activateTab(
"personal_data");
730 $settings =
$ilias->getAllSettings();
738 if ($ilUser->getProfileIncomplete())
743 $this->tpl->setContent($this->form->getHTML());
755 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
757 $this->form->setFormAction($this->ctrl->getFormAction($this));
760 $user_defined_data =
$ilUser->getUserDefinedData();
762 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
766 $this->input[
"udf_".$definition[
'field_id']] =
767 new ilTextInputGUI($definition[
'field_name'],
"udf_".$definition[
'field_id']);
768 $this->input[
"udf_".$definition[
'field_id']]->setMaxLength(255);
769 $this->input[
"udf_".$definition[
'field_id']]->setSize(40);
773 $this->input[
"udf_".$definition[
'field_id']] =
775 $this->input[
"udf_".$definition[
'field_id']]->setUseRte(
true);
779 $options = $this->user_defined_fields->fieldValuesToSelectArray($definition[
'field_values']);
780 $this->input[
"udf_".$definition[
'field_id']] =
781 new ilSelectInputGUI($definition[
'field_name'],
"udf_".$definition[
'field_id']);
782 $this->input[
"udf_".$definition[
'field_id']]->setOptions(
$options);
785 $value = $user_defined_data[
"f_".$field_id];
786 $this->input[
"udf_".$definition[
'field_id']]->setValue($value);
788 if($definition[
'required'])
790 $this->input[
"udf_".$definition[
'field_id']]->setRequired(
true);
792 if(!$definition[
'changeable'] && (!$definition[
'required'] || $value))
794 $this->input[
"udf_".$definition[
'field_id']]->setDisabled(
true);
801 $this->input[
"udf_".$definition[
'field_id']]->setOptions(
$options);
806 include_once(
"./Services/User/classes/class.ilUserProfile.php");
808 $up->skipField(
"password");
809 $up->skipGroup(
"settings");
810 $up->skipGroup(
"preferences");
812 $up->setAjaxCallback(
813 $this->ctrl->getLinkTargetByClass(
'ilPublicUserProfileGUI',
'doProfileAutoComplete',
'',
true)
817 $up->addStandardFieldsToForm($this->form,
$ilUser, $this->input);
821 $this->form->addCommandButton(
"savePersonalData",
$lng->txt(
"save"));
834 if ($this->form->checkInput())
840 "firstname" =>
"FirstName",
841 "lastname" =>
"LastName",
843 "sel_country" =>
"SelectedCountry",
844 "phone_office" =>
"PhoneOffice",
845 "phone_home" =>
"PhoneHome",
846 "phone_mobile" =>
"PhoneMobile",
847 "referral_comment" =>
"Comment",
848 "interests_general" =>
"GeneralInterests",
849 "interests_help_offered" =>
"OfferingHelp",
850 "interests_help_looking" =>
"LookingForHelp"
852 include_once(
"./Services/User/classes/class.ilUserProfile.php");
854 foreach($up->getStandardFields() as $f => $p)
857 $item = $this->form->getItemByPostVar(
"usr_".$f);
858 if($item && !$item->getDisabled())
860 $value = $this->form->getInput(
"usr_".$f);
864 if (is_array($value))
866 if (is_array($value[
'date']))
868 if (($value[
'd'] > 0) && ($value[
'm'] > 0) && ($value[
'y'] > 0))
870 $ilUser->setBirthday(sprintf(
"%04d-%02d-%02d", $value[
'y'], $value[
'm'], $value[
'd']));
879 $ilUser->setBirthday($value[
'date']);
900 $ilUser->setInstantMessengerId(
'icq', $this->form->getInput(
"usr_im_icq"));
901 $ilUser->setInstantMessengerId(
'yahoo', $this->form->getInput(
"usr_im_yahoo"));
902 $ilUser->setInstantMessengerId(
'msn', $this->form->getInput(
"usr_im_msn"));
903 $ilUser->setInstantMessengerId(
'aim', $this->form->getInput(
"usr_im_aim"));
904 $ilUser->setInstantMessengerId(
'skype', $this->form->getInput(
"usr_im_skype"));
905 $ilUser->setInstantMessengerId(
'jabber', $this->form->getInput(
"usr_im_jabber"));
906 $ilUser->setInstantMessengerId(
'voip', $this->form->getInput(
"usr_im_voip"));
910 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
914 $location = $this->form->getInput(
"location");
918 $ilUser->setLatitude(is_numeric($lat) ? $lat :
null);
919 $ilUser->setLongitude(is_numeric($long) ? $long :
null);
920 $ilUser->setLocationZoom(is_numeric($zoom) ? $zoom :
null);
924 $defs = $this->user_defined_fields->getVisibleDefinitions();
926 foreach ($defs as $definition)
928 $f =
"udf_".$definition[
'field_id'];
929 $item = $this->form->getItemByPostVar($f);
930 if ($item && !$item->getDisabled())
932 $udf[$definition[
'field_id']] = $this->form->getInput($f);
935 $ilUser->setUserDefinedData($udf);
938 $un = $this->form->getInput(
'username');
939 if((
int)
$ilSetting->get(
'allow_change_loginname') &&
945 $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'login_invalid'));
951 $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'loginname_already_exists'));
961 $ilAuth->setAuth(
$ilUser->getLogin());
967 $this->form->getItemByPostVar(
'username')->setAlert($e->getMessage());
979 $ilUser->setProfileIncomplete(
false);
997 unset(
$_SESSION[
'profile_complete_redirect']);
1002 $ilCtrl->redirect($this,
"showPersonalData");
1007 $this->form->setValuesByPost();
1024 $ilTabs->activateTab(
"public_profile");
1030 $this->initPublicProfileForm();
1033 $ptpl =
new ilTemplate(
"tpl.edit_personal_profile.html",
true,
true,
"Services/User");
1034 $ptpl->setVariable(
"FORM", $this->form->getHTML());
1035 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
1037 $ptpl->setVariable(
"PREVIEW", $pub_profile->getEmbeddable());
1038 $this->tpl->setContent($ptpl->get());
1053 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
1067 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1070 $this->form->setTitle(
$lng->txt(
"public_profile"));
1071 $this->form->setDescription(
$lng->txt(
"user_public_profile_info"));
1072 $this->form->setFormAction($this->ctrl->getFormAction($this));
1074 $portfolio_id = $this->getProfilePortfolio();
1080 $info = $this->lng->txt(
"user_activate_public_profile_info");
1081 $pub_prof = in_array(
$ilUser->prefs[
"public_profile"], array(
"y",
"n",
"g"))
1082 ?
$ilUser->prefs[
"public_profile"]
1084 if (!
$ilSetting->get(
'enable_global_profiles') && $pub_prof ==
"g")
1088 $radg->setValue($pub_prof);
1089 $op1 =
new ilRadioOption(
$lng->txt(
"usr_public_profile_disabled"),
"n",
$lng->txt(
"usr_public_profile_disabled_info"));
1090 $radg->addOption($op1);
1092 $radg->addOption($op2);
1093 if (
$ilSetting->get(
'enable_global_profiles'))
1096 $radg->addOption($op3);
1098 $this->form->addItem($radg);
1104 $prtf =
"<br />".$lng->txt(
"user_profile_portfolio");
1105 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio\">» ".
1106 $lng->txt(
"user_portfolios").
"</a>";
1110 $radg->setInfo($info);
1114 $prtf =
$lng->txt(
"user_profile_portfolio_selected");
1115 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio&prt_id=".$portfolio_id.
"\">» ".
1116 $lng->txt(
"portfolio").
"</a>";
1119 $info->setHTML($prtf);
1120 $this->form->addItem($info);
1123 $this->showPublicProfileFields($this->form,
$ilUser->prefs);
1125 $this->form->addCommandButton(
"savePublicProfile",
$lng->txt(
"save"));
1140 $birthday =
$ilUser->getBirthday();
1145 $gender =
$ilUser->getGender();
1148 $gender = $this->lng->txt(
"gender_".$gender);
1151 if (
$ilUser->getSelectedCountry() !=
"")
1153 $this->lng->loadLanguageModule(
"meta");
1154 $txt_sel_country = $this->lng->txt(
"meta_c_".
$ilUser->getSelectedCountry());
1161 $pic =
"<img src=\"".$pic.
"\" />";
1166 "title" =>
$ilUser->getUTitle(),
1167 "birthday" => $birthday,
1168 "gender" => $gender,
1170 "interests_general" =>
$ilUser->getGeneralInterestsAsText(),
1171 "interests_help_offered" =>
$ilUser->getOfferingHelpAsText(),
1172 "interests_help_looking" =>
$ilUser->getLookingForHelpAsText(),
1173 "institution" =>
$ilUser->getInstitution(),
1174 "department" =>
$ilUser->getDepartment(),
1175 "street" =>
$ilUser->getStreet(),
1176 "zipcode" =>
$ilUser->getZipcode(),
1178 "country" =>
$ilUser->getCountry(),
1179 "sel_country" => $txt_sel_country,
1180 "phone_office" =>
$ilUser->getPhoneOffice(),
1181 "phone_home" =>
$ilUser->getPhoneHome(),
1182 "phone_mobile" =>
$ilUser->getPhoneMobile(),
1184 "email" =>
$ilUser->getEmail(),
1185 "hobby" =>
$ilUser->getHobby(),
1186 "matriculation" =>
$ilUser->getMatriculation(),
1187 "delicious" =>
$ilUser->getDelicious()
1191 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
1194 $val_array[
"location"] =
"";
1197 foreach($val_array as $key => $value)
1204 if ($this->userSettingVisible($key))
1207 if ($key ==
"upload")
1215 if ($prefs[
"public_".$key] ==
"y")
1217 $cb->setChecked(
true);
1220 $cb->setOptionTitle($value);
1224 $form->addItem($cb);
1228 $parent->addSubItem($cb);
1233 $im_arr = array(
"icq",
"yahoo",
"msn",
"aim",
"skype",
"jabber",
"voip");
1234 if ($this->userSettingVisible(
"instant_messengers"))
1236 foreach ($im_arr as $im)
1241 $cb->setOptionTitle(
$ilUser->getInstantMessengerId($im));
1242 if ($prefs[
"public_im_".$im] !=
"n")
1244 $cb->setChecked(
true);
1249 $form->addItem($cb);
1253 $parent->addSubItem($cb);
1259 $user_defined_data = array();
1262 $user_defined_data =
$ilUser->getUserDefinedData();
1264 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
1267 $cb =
new ilCheckboxInputGUI($definition[
"field_name"],
"chk_udf_".$definition[
"field_id"]);
1268 $cb->setOptionTitle($user_defined_data[
"f_".$definition[
"field_id"]]);
1269 if ($prefs[
"public_udf_".$definition[
"field_id"]] ==
"y")
1271 $cb->setChecked(
true);
1276 $form->addItem($cb);
1280 $parent->addSubItem($cb);
1293 $this->initPublicProfileForm();
1294 if ($this->form->checkInput())
1297 if(isset(
$_POST[
"public_profile"]))
1299 $ilUser->setPref(
"public_profile",
$_POST[
"public_profile"]);
1303 $val_array = array(
"title",
"birthday",
"gender",
"institution",
"department",
"upload",
"street",
1304 "zipcode",
"city",
"country",
"sel_country",
"phone_office",
"phone_home",
"phone_mobile",
1305 "fax",
"email",
"hobby",
"matriculation",
"location",
1306 "interests_general",
"interests_help_offered",
"interests_help_looking");
1309 foreach($val_array as $key => $value)
1311 if ((
$_POST[
"chk_".$value]))
1313 $ilUser->setPref(
"public_".$value,
"y");
1317 $ilUser->setPref(
"public_".$value,
"n");
1321 $im_arr = array(
"icq",
"yahoo",
"msn",
"aim",
"skype",
"jabber",
"voip");
1322 if ($this->userSettingVisible(
"instant_messengers"))
1324 foreach ($im_arr as $im)
1326 if ((
$_POST[
"chk_im_".$im]))
1328 $ilUser->setPref(
"public_im_".$im,
"y");
1332 $ilUser->setPref(
"public_im_".$im,
"n");
1340 if ((
$_POST[
"chk_delicious"]))
1342 $ilUser->setPref(
"public_delicious",
"y");
1346 $ilUser->setPref(
"public_delicious",
"n");
1351 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
1353 if ((
$_POST[
"chk_udf_".$definition[
"field_id"]]))
1355 $ilUser->setPref(
"public_udf_".$definition[
"field_id"],
"y");
1359 $ilUser->setPref(
"public_udf_".$definition[
"field_id"],
"n");
1366 include_once
'./Services/Search/classes/Lucene/class.ilLuceneIndexer.php';
1370 $ilCtrl->redirect($this,
"showPublicProfile");
1372 $this->form->setValuesByPost();
1373 $tpl->showPublicProfile(
true);
1386 $ilTabs->activateTab(
"export");
1389 $ilToolbar->addButton($this->lng->txt(
"pd_export_profile"),
1390 $ilCtrl->getLinkTarget($this,
"exportPersonalData"));
1392 $exp_file =
$ilUser->getPersonalDataExportFile();
1393 if ($exp_file !=
"")
1395 $ilToolbar->addSeparator();
1396 $ilToolbar->addButton($this->lng->txt(
"pd_download_last_export_file"),
1397 $ilCtrl->getLinkTarget($this,
"downloadPersonalData"));
1400 $ilToolbar->addSeparator();
1401 $ilToolbar->addButton($this->lng->txt(
"pd_import_personal_data"),
1402 $ilCtrl->getLinkTarget($this,
"importPersonalDataSelection"));
1415 $ilUser->exportPersonalData();
1416 $ilUser->sendPersonalDataFile();
1417 $ilCtrl->redirect($this,
"showExportImport");
1430 $ilUser->sendPersonalDataFile();
1443 $ilTabs->activateTab(
"export");
1446 $this->initPersonalDataImportForm();
1448 $tpl->setContent($this->form->getHTML());
1462 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1467 $fi->setRequired(
true);
1468 $fi->setSuffixes(array(
"zip"));
1469 $this->form->addItem($fi);
1473 $this->form->addItem($cb);
1477 $this->form->addItem($cb);
1481 $this->form->addItem($cb);
1485 $this->form->addItem($cb);
1489 $this->form->addItem($cb);
1491 $this->form->addCommandButton(
"importPersonalData",
$lng->txt(
"import"));
1492 $this->form->addCommandButton(
"showExportImport",
$lng->txt(
"cancel"));
1494 $this->form->setTitle(
$lng->txt(
"pd_import_personal_data"));
1495 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
1510 $this->initPersonalDataImportForm();
1511 if ($this->form->checkInput())
1513 $ilUser->importPersonalData($_FILES[
"file"],
1514 (
int)
$_POST[
"profile_data"],
1515 (
int)
$_POST[
"settings"],
1516 (
int)
$_POST[
"bookmarks"],
1525 $ilTabs->activateTab(
"export");
1527 $this->form->setValuesByPost();
1528 $tpl->setContent($this->form->getHtml());
static formatDate(ilDateTime $date)
Format a date @access public.
static updateLuceneIndex($a_obj_ids)
Update lucene index.
static isActivated()
Checks whether Map feature is activated.
static getDefaultSettings()
Get default longitude, latitude and zoom.
static getDefaultPortfolio($a_user_id)
Get default portfolio of user.
getLatitude()
Get Latitude.
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
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
workWithUserSetting($setting)
Returns TRUE if working with the given user setting is allowed, FALSE otherwise.
initPersonalDataImportForm()
Init personal data import form.
showPublicProfileFields(ilPropertyformGUI $form, array $prefs, $parent=null, $anonymized=false)
Add fields to form.
importPersonalData()
Import personal data.
showPersonalData($a_no_init=false)
Personal data form.
showPublicProfile($a_no_init=false)
Public profile form.
ilPersonalProfileGUI()
constructor
initPersonalDataForm()
Init personal form.
savePersonalData()
Save personal data form.
savePublicProfile()
Save public profile form.
exportPersonalData()
Export personal data.
userSettingVisible($setting)
Returns TRUE if user setting is visible, FALSE otherwise.
removeUserPicture()
remove user image
__checkUserDefinedRequiredFields()
getProfilePortfolio()
has profile set to a portfolio?
showExportImport()
Show export/import.
__showUserDefinedFields()
& executeCommand()
execute command
uploadUserPicture()
Upload user image.
downloadPersonalData()
Download personal data export file.
userSettingEnabled($setting)
Returns TRUE if user setting is enabled, FALSE otherwise.
__showOtherInformations()
importPersonalDataSelection()
Import personal data selection.
initPublicProfileForm()
Init public profile form.
showProfile()
show profile form
addLocationToForm(ilPropertyFormGUI $a_form, ilObjUser $a_user)
Add location fields to form if activated.
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.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static _getInstance()
Get instance.
Class for user related exception handling in ILIAS.
static is_email($a_email)
This preg-based function checks whether an e-mail address is formally valid.
static isConvertVersionAtLeast($a_version)
Compare convert version numbers.
static escapeShellArg($a_arg)
static getWebspaceDir($mode="filesystem")
get webspace directory
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static execConvert($args)
execute convert command
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
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 prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
redirection script todo: (a better solution should control the processing via a xml file)
if(!is_array($argv)) $options