|
|
|
@ -74,16 +74,16 @@ Display::display_introduction_section(TOOL_GROUP); |
|
|
|
|
* User wants to register in this group |
|
|
|
|
*/ |
|
|
|
|
if (!empty($_GET['selfReg']) && GroupManager :: is_self_registration_allowed($user_id, $current_group['id'])) { |
|
|
|
|
GroupManager :: subscribe_users($user_id, $current_group['id']); |
|
|
|
|
Display :: display_normal_message(get_lang('GroupNowMember')); |
|
|
|
|
GroupManager :: subscribe_users($user_id, $current_group['id']); |
|
|
|
|
Display :: display_normal_message(get_lang('GroupNowMember')); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
* User wants to unregister from this group |
|
|
|
|
*/ |
|
|
|
|
if (!empty($_GET['selfUnReg']) && GroupManager :: is_self_unregistration_allowed($user_id, $current_group['id'])) { |
|
|
|
|
GroupManager :: unsubscribe_users($user_id, $current_group['id']); |
|
|
|
|
Display::display_normal_message(get_lang('StudentDeletesHimself')); |
|
|
|
|
GroupManager :: unsubscribe_users($user_id, $current_group['id']); |
|
|
|
|
Display::display_normal_message(get_lang('StudentDeletesHimself')); |
|
|
|
|
} |
|
|
|
|
echo '<div class="actions">'; |
|
|
|
|
echo '<a href="group.php">'.Display::return_icon('back.png',get_lang('BackToGroupList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
@ -157,51 +157,51 @@ if (api_is_allowed_to_edit(false, true) OR GroupManager :: is_user_in_group(api_ |
|
|
|
|
if ($current_group['doc_state'] != GroupManager::TOOL_NOT_AVAILABLE ) { |
|
|
|
|
// Link to the documents area of this group |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../document/document.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('folder.png', get_lang('GroupDocument'), array(), 32) |
|
|
|
|
); |
|
|
|
|
'url' => '../document/document.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('folder.png', get_lang('GroupDocument'), array(), 32) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if ($current_group['calendar_state'] != GroupManager::TOOL_NOT_AVAILABLE) { |
|
|
|
|
// Link to a group-specific part of agenda |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../calendar/agenda.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), 32) |
|
|
|
|
'url' => '../calendar/agenda.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), 32) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if ($current_group['work_state'] != GroupManager::TOOL_NOT_AVAILABLE) { |
|
|
|
|
// Link to the works area of this group |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../work/work.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('work.png', get_lang('GroupWork'), array(), 32) |
|
|
|
|
'url' => '../work/work.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('work.png', get_lang('GroupWork'), array(), 32) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if ($current_group['announcements_state'] != GroupManager::TOOL_NOT_AVAILABLE) { |
|
|
|
|
// Link to a group-specific part of announcements |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../announcements/announcements.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), 32) |
|
|
|
|
'url' => '../announcements/announcements.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), 32) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($current_group['wiki_state'] != GroupManager::TOOL_NOT_AVAILABLE) { |
|
|
|
|
// Link to the wiki area of this group |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../wiki/index.php?'.api_get_cidreq().'&action=show&title=index&session_id='.api_get_session_id().'&group_id='.$current_group['id'], |
|
|
|
|
'content' => Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), 32) |
|
|
|
|
'url' => '../wiki/index.php?'.api_get_cidreq().'&action=show&title=index&session_id='.api_get_session_id().'&group_id='.$current_group['id'], |
|
|
|
|
'content' => Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), 32) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if ($current_group['chat_state'] != GroupManager::TOOL_NOT_AVAILABLE) { |
|
|
|
|
// Link to the chat area of this group |
|
|
|
|
if (api_get_course_setting('allow_open_chat_window')) { |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => "javascript: void(0);\" onclick=\"window.open('../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id']."','window_chat_group_".$_SESSION['_cid']."_".$_SESSION['_gid']."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no') \"", |
|
|
|
|
'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32) |
|
|
|
|
'url' => "javascript: void(0);\" onclick=\"window.open('../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id']."','window_chat_group_".$_SESSION['_cid']."_".$_SESSION['_gid']."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no') \"", |
|
|
|
|
'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32) |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => "../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id'], |
|
|
|
|
'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32) |
|
|
|
|
'url' => "../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id'], |
|
|
|
|
'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -230,50 +230,50 @@ if (api_is_allowed_to_edit(false, true) OR GroupManager :: is_user_in_group(api_ |
|
|
|
|
if ($current_group['doc_state'] == GroupManager::TOOL_PUBLIC) { |
|
|
|
|
// Link to the documents area of this group |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../document/document.php?cidReq='.api_get_course_id().'&origin='.$origin, |
|
|
|
|
'content' => Display::return_icon('folder.png', get_lang('GroupDocument'), array(), ICON_SIZE_MEDIUM) |
|
|
|
|
'url' => '../document/document.php?cidReq='.api_get_course_id().'&origin='.$origin, |
|
|
|
|
'content' => Display::return_icon('folder.png', get_lang('GroupDocument'), array(), ICON_SIZE_MEDIUM) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if ($current_group['calendar_state'] == GroupManager::TOOL_PUBLIC) { |
|
|
|
|
// Link to a group-specific part of agenda |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../calendar/agenda.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), ICON_SIZE_MEDIUM) |
|
|
|
|
'url' => '../calendar/agenda.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), ICON_SIZE_MEDIUM) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if ($current_group['work_state'] == GroupManager::TOOL_PUBLIC) { |
|
|
|
|
// Link to the works area of this group |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../work/work.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('work.png', get_lang('GroupWork'), array(), ICON_SIZE_MEDIUM) |
|
|
|
|
'url' => '../work/work.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('work.png', get_lang('GroupWork'), array(), ICON_SIZE_MEDIUM) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if ($current_group['announcements_state'] == GroupManager::TOOL_PUBLIC) { |
|
|
|
|
// Link to a group-specific part of announcements |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../announcements/announcements.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), ICON_SIZE_MEDIUM) |
|
|
|
|
'url' => '../announcements/announcements.php?'.api_get_cidreq(), |
|
|
|
|
'content' => Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), ICON_SIZE_MEDIUM) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if ($current_group['wiki_state'] == GroupManager::TOOL_PUBLIC) { |
|
|
|
|
// Link to the wiki area of this group |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => '../wiki/index.php?'.api_get_cidreq().'&action=show&title=index&session_id='.api_get_session_id().'&group_id='.$current_group['id'], |
|
|
|
|
'content' => Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), 32) |
|
|
|
|
'url' => '../wiki/index.php?'.api_get_cidreq().'&action=show&title=index&session_id='.api_get_session_id().'&group_id='.$current_group['id'], |
|
|
|
|
'content' => Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), 32) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if ($current_group['chat_state'] == GroupManager::TOOL_PUBLIC ) { |
|
|
|
|
// Link to the chat area of this group |
|
|
|
|
if (api_get_course_setting('allow_open_chat_window')) { |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => "javascript: void(0);\" onclick=\"window.open('../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id']."','window_chat_group_".$_SESSION['_cid']."_".$_SESSION['_gid']."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no') \"", |
|
|
|
|
'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32) |
|
|
|
|
'url' => "javascript: void(0);\" onclick=\"window.open('../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id']."','window_chat_group_".$_SESSION['_cid']."_".$_SESSION['_gid']."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no') \"", |
|
|
|
|
'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32) |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
$actions_array[] = array( |
|
|
|
|
'url' => "../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id'], |
|
|
|
|
'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32) |
|
|
|
|
'url' => "../chat/chat.php?".api_get_cidreq()."&toolgroup=".$current_group['id'], |
|
|
|
|
'content' => Display::return_icon('chat.png', get_lang('Chat'), array(), 32) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -473,6 +473,7 @@ function user_icon_filter($user_id) { |
|
|
|
|
$photo = '<center><img src="'.$image_repository.$existing_image.'" alt="'.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'" width="22" height="22" title="'.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'" /></center>'; |
|
|
|
|
return '<a href="../user/userInfo.php?origin='.$origin.'&uInfo='.$user_id.'">'.$photo; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Return user profile link around the given user name. |
|
|
|
|
* |
|
|
|
@ -484,7 +485,6 @@ function user_icon_filter($user_id) { |
|
|
|
|
* @return string HTML link |
|
|
|
|
*/ |
|
|
|
|
function user_name_filter($name, $url_params, $row) { |
|
|
|
|
global $origin; |
|
|
|
|
$tab_user_info = Database::get_user_info_from_id($row[0]); |
|
|
|
|
$username = api_htmlentities(sprintf(get_lang('LoginX'), $tab_user_info['username']), ENT_QUOTES); |
|
|
|
|
return '<a href="../user/userInfo.php?uInfo='.$row[0].'&'.$url_params.'" title="'.$username.'">'.$name.'</a>'; |
|
|
|
|