diff --git a/main/css/public_admin/default.css b/main/css/public_admin/default.css index 9281f5197a..11270a9a70 100644 --- a/main/css/public_admin/default.css +++ b/main/css/public_admin/default.css @@ -2469,7 +2469,7 @@ div.image-social-content center.friend { } #social-profile-content { float:right; - width:48%; + width:47%; } #social-profile-right { float:right; diff --git a/main/social/profile.php b/main/social/profile.php index f8dc4e9c51..cfcecb426c 100644 --- a/main/social/profile.php +++ b/main/social/profile.php @@ -15,6 +15,7 @@ $cidReset = true; require '../inc/global.inc.php'; require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; require_once api_get_path(LIBRARY_PATH).'social.lib.php'; +require_once api_get_path(LIBRARY_PATH).'array.lib.php'; $user_id = api_get_user_id(); $show_full_profile = true; @@ -461,16 +462,23 @@ $personal_course_list = UserManager::get_personal_session_course_list($my_user_i $course_list_code = array(); $i=1; //print_r($personal_course_list); + + + if (is_array($personal_course_list)) { foreach ($personal_course_list as $my_course) { if ($i<=10) { $list[] = get_logged_user_course_html($my_course,$i); - $course_list_code[] = array('code'=>$my_course['c'],'dbName'=>$my_course['db'], 'title'=>$my_course['i']); + //$course_list_code[] = array('code'=>$my_course['c'],'dbName'=>$my_course['db'], 'title'=>$my_course['i']); cause double + $course_list_code[] = array('code'=>$my_course['c'],'dbName'=>$my_course['db']); + } else { break; } $i++; } + //to avoid repeted courses + $course_list_code = array_unique_dimensional($course_list_code); } echo '
'; // close div friend-header + $friend_html.= '
'.get_lang('TryAndFindSomeFriends').'
'; for ($i=0;$i<$count_pending_invitations;$i++) { //var_dump($invitations); echo '
'; echo '
'; + echo '
'; }*/ - + + // Extra information + if ($show_full_profile) { //-- Extra Data $t_uf = Database :: get_main_table(TABLE_MAIN_USER_FIELD); $t_ufo = Database :: get_main_table(TABLE_MAIN_USER_FIELD_OPTIONS); $extra_user_data = UserManager::get_extra_user_data($user_id); + $extra_information = ''; if (is_array($extra_user_data) && count($extra_user_data)>0 ) { - echo '
'; + $extra_information .='
'; + $extra_information_value .= ''.ucfirst($field_display_text).': '.implode(',',$data).'
'; } else { if ($field_type == 8) { $id_options = explode(';',$data); @@ -737,17 +749,26 @@ echo '
'; + $extra_information_value .= ''.ucfirst($field_display_text).': '.implode(' ',$value_options).'
'; } else { - echo ''.ucfirst($field_display_text).': '.$data.'
'; + $extra_information_value .= ''.ucfirst($field_display_text).': '.$data.'
'; } } } } - echo '
'; + // if there are information to show + if (!empty($extra_information_value)) { + $extra_information .= $extra_information_value; + } + $extra_information .= '
'; } + // if there are information to show + if (!empty($extra_information_value)) + echo $extra_information; + + // ---- My Agenda Items $my_agenda_items = show_simple_personal_agenda($user_id); if (!empty($my_agenda_items)) { @@ -789,7 +810,10 @@ echo '