diff --git a/chamilo_license.txt b/chamilo_license.txt old mode 100755 new mode 100644 index cd5e69a452..201e1293e0 --- a/chamilo_license.txt +++ b/chamilo_license.txt @@ -1,8 +1,8 @@ =============================================================================== - Dokeos - elearning and course management software + Chamilo - elearning and course management software + Copyright (c) 2008-2010 Dokeos Latinoamérica SAC Copyright (c) 2004-2009 Dokeos SPRL - Copyright (c) 2009 Dokeos Latinoamérica SAC Copyright (c) 2003-2007 Ghent University (UGent) Copyright (c) 2001 Universite catholique de Louvain (UCL) Copyright (c) 2003-2008 Vrije Universiteit Brussel (VUB) @@ -10,7 +10,7 @@ Copyright (c) Facultad de Matematicas, UADY (México) (Message plugin) For a full list of contributors detaining copyrights over parts of - the Dokeos software, see "documentation/credits.html". + the Chamilo software, see "documentation/credits.html". The full license can be read in "documentation/license.html". This program is free software; you can redistribute it and/or @@ -20,7 +20,6 @@ See the GNU General Public License for more details. - Contact address: Dokeos, Rue du Corbeau, 108, B-1030 Brussels, Belgium - Mail: info@dokeos.com + Mail: info@chamilo.org =============================================================================== This license is referenced throughout the code using the following header line: diff --git a/main/admin/index.php b/main/admin/index.php index aad8a0e420..069e42feb4 100755 --- a/main/admin/index.php +++ b/main/admin/index.php @@ -273,11 +273,11 @@ if(api_is_platform_admin()){ }*/ ?>
-

Dokeos.com

+

Chamilo.org

- Read about this problem in Support Forum

+ Read about this problem in Support Forum

Please go back to step 5.

'; diff --git a/main/messages/inbox.php b/main/messages/inbox.php index 0efe2c5940..9cdd1b848f 100755 --- a/main/messages/inbox.php +++ b/main/messages/inbox.php @@ -6,7 +6,7 @@ // name of the language file that needs to be included $language_file = array('registration','messages','userInfo'); -$cidReset=true; +$cidReset = true; require_once '../inc/global.inc.php'; require_once api_get_path(LIBRARY_PATH).'message.lib.php'; @@ -124,7 +124,7 @@ $table_message = Database::get_main_table(TABLE_MESSAGE); //api_display_tool_title(api_xml_http_response_encode(get_lang('Inbox'))); if ($_GET['f']=='social') { $this_section = SECTION_SOCIAL; - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Social')); + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Inbox')); } else { $this_section = SECTION_MYPROFILE; diff --git a/main/messages/new_message.php b/main/messages/new_message.php index 76c6026cae..5d6212f4b5 100755 --- a/main/messages/new_message.php +++ b/main/messages/new_message.php @@ -255,7 +255,7 @@ function manage_form ($default, $select_from_user_list = null) { */ if ($_GET['f']=='social') { $this_section = SECTION_SOCIAL; - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Social')); + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); $interbreadcrumb[]= array ('url' => '#','name' => $nameTools); } else { $this_section = SECTION_MYPROFILE; diff --git a/main/messages/outbox.php b/main/messages/outbox.php index 9bf155f326..8f6ac3e699 100755 --- a/main/messages/outbox.php +++ b/main/messages/outbox.php @@ -68,7 +68,7 @@ function deselect_all(formita) //api_display_tool_title(api_xml_http_response_encode(get_lang('Inbox'))); if ($_GET['f']=='social') { $this_section = SECTION_SOCIAL; - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Social')); + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox')); } else { $this_section = SECTION_MYPROFILE; @@ -153,7 +153,11 @@ echo '
'; MessageManager::delete_message_by_user_sender(api_get_user_id(), $delete_list_id[$i]); } $delete_list_id=array(); + + //------------------------ outbox_display(); + //------------------------ + } elseif ($_REQUEST['action']=='deleteone') { $delete_list_id=array(); $id=Security::remove_XSS($_GET['id']); diff --git a/main/messages/view_message.php b/main/messages/view_message.php index fd937f43f9..89ae62f2b6 100755 --- a/main/messages/view_message.php +++ b/main/messages/view_message.php @@ -21,7 +21,7 @@ require_once api_get_path(LIBRARY_PATH).'message.lib.php'; */ if ($_REQUEST['f']=='social') { $this_section = SECTION_SOCIAL; - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Social')); + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); $interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox')); } else { $this_section = SECTION_MYPROFILE; diff --git a/main/social/home.php b/main/social/home.php index a3e3a0fb92..ba9997a701 100755 --- a/main/social/home.php +++ b/main/social/home.php @@ -7,6 +7,7 @@ $language_file = array('userInfo'); $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'; @@ -19,7 +20,6 @@ $show_full_profile = true; $this_section = SECTION_SOCIAL; $interbreadcrumb[]= array ('url' => 'home.php','name' => get_lang('Social')); -$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Home')); api_block_anonymous_users(); $htmlHeadXtra[] = ''; //jQuery @@ -54,7 +54,7 @@ if (api_get_setting('profile', 'picture') == 'true') { } } -Display :: display_header(null); +Display :: display_header(get_lang('Home')); $user_info = UserManager :: get_user_info_by_id(api_get_user_id()); $user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'),true); $user_online_count = count($user_online_list); diff --git a/main/social/invitations.php b/main/social/invitations.php index bbf23bea5c..8027a7fb48 100755 --- a/main/social/invitations.php +++ b/main/social/invitations.php @@ -72,13 +72,15 @@ if (is_array($_GET) && count($_GET)>0) { foreach($_GET as $key => $value) { switch ($key) { case 'accept': - $user_role = GroupPortalManager::get_user_group_role(api_get_user_id(), $value); + $user_role = GroupPortalManager::get_user_group_role(api_get_user_id(), $value); if (in_array($user_role , array(GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER,GROUP_USER_PERMISSION_PENDING_INVITATION))) { GroupPortalManager::update_user_role(api_get_user_id(), $value, GROUP_USER_PERMISSION_READER); $show_message = get_lang('UserIsSubscribedToThisGroup'); + } elseif (in_array($user_role , array(GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_MODERATOR))) { + $show_message = get_lang('UserIsAlreadySubscribedToThisGroup'); } else { $show_message = get_lang('UserIsNotSubscribedToThisGroup'); - } + } break 2; case 'deny': // delete invitation @@ -88,15 +90,10 @@ if (is_array($_GET) && count($_GET)>0) { } } } - - - $language_variable = get_lang('PendingInvitations'); $language_comment = get_lang('SocialInvitesComment'); - - echo '
'; echo '
'; @@ -110,118 +107,123 @@ echo '
'; Display :: display_normal_message($show_message); } - echo '
'; - $list_get_invitation=array(); - $user_id = api_get_user_id(); - - $list_get_invitation = SocialManager::get_list_invitation_of_friends_by_user_id($user_id); - $list_get_invitation_sent = SocialManager::get_list_invitation_sent_by_user_id($user_id); - $pending_invitations = GroupPortalManager::get_groups_by_user($user_id, GROUP_USER_PERMISSION_PENDING_INVITATION); - - $number_loop=count($list_get_invitation); - - if ($number_loop != 0) { - echo '

'.get_lang('InvitationReceived').'

'; - - foreach ($list_get_invitation as $invitation) { - $sender_user_id = $invitation['user_sender_id'] - ?> -
- - - - - - - - -
- - /> - - -
- -
-
- -
-
- - -
-
-
-
'; + echo '
'; + $list_get_invitation=array(); + $user_id = api_get_user_id(); + + $list_get_invitation = SocialManager::get_list_invitation_of_friends_by_user_id($user_id); + $list_get_invitation_sent = SocialManager::get_list_invitation_sent_by_user_id($user_id); + $pending_invitations = GroupPortalManager::get_groups_by_user($user_id, GROUP_USER_PERMISSION_PENDING_INVITATION); + $number_loop = count($list_get_invitation); + + $total_invitations = $number_loop + count($list_get_invitation_sent); + if ($total_invitations == 0 ) { + echo ''.get_lang('TryAndFindSomeFriends').''; + } + + + if ($number_loop != 0) { + echo '

'.get_lang('InvitationReceived').'

'; - if (count($list_get_invitation_sent) > 0 ){ - echo '

'.get_lang('InvitationSent').'

'; - foreach ($list_get_invitation_sent as $invitation) { - $sender_user_id = $invitation['user_receiver_id'];?> -
- - - - - - - - -
- - /> - - -
- -
-
- -
-
-
+ foreach ($list_get_invitation as $invitation) { + $sender_user_id = $invitation['user_sender_id'] + ?> +
+ + + + + + + + +
+ + /> + + +
+ +
+
+ +
+
+ + +
+
+
0) { - echo '

'.get_lang('GroupsWaitingApproval').'

'; - $new_invitation = array(); - foreach ($pending_invitations as $invitation) { - $picture = GroupPortalManager::get_picture_group($invitation['id'], $invitation['picture_uri'],80); - $img = ''; - - $invitation['picture_uri'] = ''.$img.''; - $invitation['name'] = ''.cut($invitation['name'],120,true).''; - $invitation['join'] = ''.get_lang('AcceptInvitation').''; - $invitation['deny'] = ''.get_lang('DenyInvitation').''; - $invitation['description'] = cut($invitation['description'],220,true); - //$invitation['send_message'] = ''; - //$invitation['send_message'] .= Display::return_icon('message_new.png').'  '.get_lang('SendMessage').''; - $new_invitation[]=$invitation; - } - Display::display_sortable_grid('waiting_user', array(), $new_invitation, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false,false,true,true,true,true)); + } + echo '
'; + + if (count($list_get_invitation_sent) > 0 ){ + echo '

'.get_lang('InvitationSent').'

'; + foreach ($list_get_invitation_sent as $invitation) { + $sender_user_id = $invitation['user_receiver_id'];?> +
+ + + + + + + + +
+ + /> + + +
+ +
+
+ +
+
+
+ 0) { + echo '

'.get_lang('GroupsWaitingApproval').'

'; + $new_invitation = array(); + foreach ($pending_invitations as $invitation) { + $picture = GroupPortalManager::get_picture_group($invitation['id'], $invitation['picture_uri'],80); + $img = ''; + + $invitation['picture_uri'] = ''.$img.''; + $invitation['name'] = ''.cut($invitation['name'],120,true).''; + $invitation['join'] = ''.get_lang('AcceptInvitation').''; + $invitation['deny'] = ''.get_lang('DenyInvitation').''; + $invitation['description'] = cut($invitation['description'],220,true); + //$invitation['send_message'] = ''; + //$invitation['send_message'] .= Display::return_icon('message_new.png').'  '.get_lang('SendMessage').''; + $new_invitation[]=$invitation; + } + Display::display_sortable_grid('waiting_user', array(), $new_invitation, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false,false,true,true,true,true)); + } echo '
'; echo '
'; diff --git a/whoisonline.php b/whoisonline.php index c90e3b7085..9b9e32d90f 100755 --- a/whoisonline.php +++ b/whoisonline.php @@ -117,6 +117,7 @@ if ($_GET['chatid'] != '') { // This if statement prevents users accessing the who's online feature when it has been disabled. if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) || ((api_get_setting('showonline', 'users') == 'true' || api_get_setting('showonline', 'course') == 'true') && $_user['user_id'])) { + if(isset($_GET['cidReq']) && strlen($_GET['cidReq']) > 0) { $user_list = Who_is_online_in_this_course($_user['user_id'], api_get_setting('time_limit_whosonline'), $_GET['cidReq']); } else { @@ -124,42 +125,45 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) || } $total = count($user_list); - if (!isset($_GET['id'])) { + if (!isset($_GET['id'])) { + Display::display_header(get_lang('UsersOnLineList')); - - echo '
'; - //this include the social menu div - if (!api_is_anonymous()) { - SocialManager::show_social_menu('whoisonline'); - } - echo '
'; - - if ($_GET['id'] == '') { - echo '

'.get_lang('Refresh').'

'; + + if (api_get_setting('allow_social_tool') == 'true') { + echo '
'; + //this include the social menu div + if (!api_is_anonymous()) { + SocialManager::show_social_menu('whoisonline'); + } + echo '
'; + + if ($_GET['id'] == '') { + echo '

'.get_lang('Refresh').'

'; + } /*else { + if (0) { + // if ($_user['user_id'] && $_GET["id"] != $_user['user_id']) { + echo ''.get_lang('SendChatRequest').''; + } + }*/ } else { - if (0) { - // if ($_user['user_id'] && $_GET["id"] != $_user['user_id']) { - echo ''.get_lang('SendChatRequest').''; - } + echo '
'; + echo get_lang('UsersOnLineList'); + echo '
'; } + } if ($user_list) { if (!isset($_GET['id'])) { - - echo '
'; - //this include the social menu div - if (!api_is_anonymous()) { - echo UserManager::get_search_form($_GET['q']); - } + if (api_get_setting('allow_social_tool') == 'true') { + echo '
'; + //this include the social menu div + if (!api_is_anonymous()) { + echo UserManager::get_search_form($_GET['q']); + } + } SocialManager::display_user_list($user_list); echo '
'; - /* - if (!api_is_anonymous()) { - echo UserManager::get_search_form($_GET['q']); - } - SocialManager::display_user_list($user_list); - */ } else { //individual user information - also displays header info SocialManager::display_individual_user(Security::remove_XSS($_GET['id']));