Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

pull/2487/head
Angel Fernando Quiroz Campos 9 years ago
commit bc446dfa9b
  1. 111
      app/Resources/public/css/base.css
  2. 13
      main/admin/skill_create.php
  3. 2
      main/inc/ajax/skill.ajax.php
  4. 6
      main/inc/lib/display.lib.php
  5. 44
      main/inc/lib/message.lib.php
  6. 33
      main/inc/lib/skill.lib.php
  7. 8
      main/inc/lib/usergroup.lib.php
  8. 14
      main/social/group_invitation.php
  9. 32
      main/social/group_view.php
  10. 4
      main/social/groups.php
  11. 18
      main/social/home.php
  12. 8
      main/social/invitations.php
  13. 8
      tests/README.md

@ -994,35 +994,32 @@ div.attendance-calendar-add div.row div.formw,div.attendance-calendar-edit div.r
#inbox-menu ul li {
padding:2px 0px;
}
.message-item {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
-moz-border-radius-bottomleft:8px;
-moz-border-radius-bottomright:8px;
-moz-border-radius-topleft:8px;
-moz-border-radius-topright:8px;
background:#F5F5F5 none repeat scroll 0 0;
margin:0 0 5px;
padding:10px;
}
.message-topic {
padding: 15px;
border-radius: 5px;
display: inline-block;
border: 1px solid #DDD;
border: 1px solid #ECF0F1;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
width: 100%;
}
.message-topic .avatar-author{
float: right;
.message-topic .avatar-author,
.message-post .avatar-author{
text-align: center;
}
.message-topic .avatar-author .img-responsive,
.message-post .avatar-author .img-responsive {
display: initial;
}
.message-topic h4{
font-weight: bold;
}
.thread-body{
padding-bottom: 20px;
padding-top: 20px;
}
.message-post{
border: 1px solid #DDD;
margin-bottom: 20px;
border: 1px solid #ECF0F1;
margin-bottom: 15px;
border-radius: 5px;
padding: 15px;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
@ -1047,6 +1044,16 @@ div.attendance-calendar-add div.row div.formw,div.attendance-calendar-edit div.r
margin-top:23px;
margin-left:20px;
}
.message-content .date{
font-size: 12px;
}
.message-content .username{
font-size: 14px;
font-weight: bold;
}
.message-content .message{
line-height: 22px;
}
/* styles from the my.profile.php file */
.message-content .message-delete {
position: absolute;
@ -1449,7 +1456,6 @@ div.admin_section h4 {
.invitation_profile_grid_container { width:100%;}
.invitation_profile_grid_item {
border:1px dotted #CCCCCC;
float:left;
height:110px;
margin:5px;
@ -1457,9 +1463,7 @@ div.admin_section h4 {
width:100px;
}
.invitation_profile_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
.invitation_profile_grid_element_0 img {width:50px;height:50px;border:3px solid #E6E6E6;}
.invitation_profile_grid_element_2 { width:100px; float:left; text-align:center;}
.invitation_profile_grid_element_3 { width:100px; float:left; text-align:center;}
.invitation_profile_grid_element_2 { width:100px; float:left; text-align:center; font-size: 12px;}
/* User boxes */
.search_users_grid_container { width:100%;}
@ -2094,20 +2098,17 @@ div.admin_section h4 {
margin: 5px;
padding: 15px;
}
.userportal-order-courses-link a {
float:right;
}
.course_social_content {
background : #EFEFEF;
margin:10px 21px;
padding:10px;
}
.topics_grid_item {
border-bottom: 1px solid #CCCCCC;
margin-bottom: 20px;
border-bottom: 1px solid #DDD;
margin-bottom: 10px;
}
#div_content_table {
border-bottom:1px solid #EAEAEA;
@ -2123,7 +2124,6 @@ div.row div.form_header {
border: 1px solid #E5EDF9;
font-size:20px;
}
span.form_required {
color: #f00;
}
@ -2132,28 +2132,22 @@ span.form_error {
font-size: x-small;
margin: 2px;
}
form .row {
margin-bottom: 18px;
}
form .formw .freeze {
display: block;
padding-top: 8px;
}
.course_activity_home {
width:100%;
}
.course_activity_home td {
line-height: normal;
padding: 4px;
text-align: left;
vertical-align: middle;
}
.show_element {
display: block !important;
}
@ -2244,7 +2238,6 @@ form .formw .freeze {
padding-left: 10px;
padding-right: 10px;
}
.data_table th {
padding: 8px 10px;
font-weight: normal;
@ -2326,19 +2319,15 @@ form .formw .freeze {
text-align: left;
width: auto;
}
.form-stacked .row div.formw {
margin-left: 0;
}
.form-stacked .row {
margin-bottom: 9px;
}
#install_form blockquote {
line-height: 16px;
}
#install_form .data_table_no_border td {
width:30%;
}
@ -3814,9 +3803,8 @@ i.size-32.icon-new-work{
margin-bottom: 5px;
}
#sm-groups .group-name a{
font-size: 14px;
font-size: 18px;
font-weight: bold;
color: #4D4D4D;
}
#sm-groups .count-username{
font-size: 12px;
@ -3824,18 +3812,15 @@ i.size-32.icon-new-work{
}
#sm-groups .description p{
color: #4D4D4D;
padding-top: 10px;
padding-top: 5px;
padding-bottom: 0px;
font-size: 11px;
line-height: 22px;
}
.sm-groups .social-profile .img-responsive{
display: inline-block;
}
.sm-groups-content .groups-messages{
padding-top: 10px;
padding-bottom: 20px;
padding-left: 20px;
padding-right: 20px;
padding:20px;
}
.social-post .mediaPost{
padding-top:10px;
@ -3954,7 +3939,8 @@ i.size-32.icon-new-work{
padding: 5px;
font-size: 12px;
}
.social-network-menu .nav-pills li.active a{
.social-network-menu .nav-pills li.active a,
#groups-acordeon .nav li.active a{
background: none;
color: #1ABC9C;
}
@ -5346,14 +5332,23 @@ div#chat-remote-video video {
padding-top: 20px;
}
.user-list{
padding-top: 20px;
padding-bottom: 20px;
padding-top: 10px;
padding-bottom: 10px;
}
.items-user{
text-align: center;
padding: 10px;
margin-bottom: 10px;
min-height: 170px;
border: 1px solid #ddd;
border-radius: 5px;
}
.items-user .name{
margin-top: 10px;
}
.items-user .avatar{
padding-top: 10px;
padding-bottom: 10px;
}
#whoisonline .items-user{
text-align: center;
@ -5890,6 +5885,24 @@ footer{
.page-blank{
padding: 20px 30px;
}
/* groups social */
.group-tool{
padding: 10px;
display: inline-block;
width: 100%;
}
.muted{
padding: 10px;
}
.group-title{
margin-bottom: 20px;
padding-bottom: 5px;
font-size: 16px;
border-bottom: 1px solid #ECF0F1;
}
.panel-invitations{
padding: 10px;
}
/* CSS NEW TOP ******************************************************************************/
/* CSS Responsive */
@media (min-width: 1025px) and (max-width: 1200px) {

@ -46,7 +46,18 @@ if ($skillParentId > 0) {
$allSkills = $objSkill->get_all();
$allGradebooks = $objGradebook->find('all');
$skillList = [0 => get_lang('None')];
// This procedure is for check if there is already a Skill with no Parent (Root by default)
$isAlreadyRootSkill = false;
foreach ($allSkills as $checkedSkill) {
if (intval($checkedSkill['parent_id']) > 0) {
$isAlreadyRootSkill = true;
break;
}
}
$skillList = $isAlreadyRootSkill ? [] : [0 => get_lang('None')];
$gradebookList = [];
foreach ($allSkills as $skill) {

@ -140,7 +140,7 @@ switch ($action) {
$userId = isset($_REQUEST['load_user']) && $_REQUEST['load_user'] == 1 ? api_get_user_id() : 0;
$skill_id = isset($_REQUEST['skill_id']) ? intval($_REQUEST['skill_id']) : 0;
$depth = isset($_REQUEST['main_depth']) ? intval($_REQUEST['main_depth']) : 2;
$all = $skill->get_skills_tree_json($userId, $skill_id, false, $depth);
$all = $skill->get_skills_tree_json($userId, $skill_id, false, $depth, true);
echo $all;
break;
case 'get_user_skill':

@ -446,6 +446,8 @@ class Display
* @param bool $filter (true) or not (false)
* @param bool $returnValue
*
* @deprecated use Display::addFlash with Display::return_message($message, 'normal');
*
* @return void
*/
public static function display_normal_message($message, $filter = true, $returnValue = false)
@ -462,6 +464,7 @@ class Display
* Displays an warning message. Use this if you want to draw attention to something
* This can also be used for instance with the hint in the exercises
*
* @deprecated use Display::addFlash with Display::return_message
*/
public static function display_warning_message($message, $filter = true, $returnValue = false)
{
@ -476,6 +479,7 @@ class Display
/**
* Displays an confirmation message. Use this if something has been done successfully
* @param bool Filter (true) or not (false)
* @deprecated use Display::addFlash with Display::return_message
* @return void
*/
public static function display_confirmation_message ($message, $filter = true, $returnValue = false)
@ -493,6 +497,8 @@ class Display
* @param string $message - include any additional html
* tags if you need them
* @param bool Filter (true) or not (false)
* @deprecated use Display::addFlash with Display::return_message
*
* @return void
*/
public static function display_error_message ($message, $filter = true, $returnValue = false)

@ -1246,7 +1246,7 @@ class MessageManager
$topic_page_nr = isset($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : null;
$links .= '<div class="pull-right">';
$links .= '<div class="btn-group">';
$links .= '<div class="btn-group btn-group-sm">';
if (($my_group_role == GROUP_USER_PERMISSION_ADMIN ||
$my_group_role == GROUP_USER_PERMISSION_MODERATOR) ||
@ -1313,21 +1313,30 @@ class MessageManager
$title = '<h4>' . Security::remove_XSS($main_message['title'], STUDENT, true) . $links . '</h4>';
$userPicture = $user_sender_info['avatar'];
$main_content .= '<div class="row">';
$main_content .= '<div class="col-md-2">';
$main_content .= '<div class="avatar-author">';
$main_content .= '<img src="' . $userPicture . '" alt="' . $name . '" class="img-responsive img-circle" width="64" height="64" title="' . $name . '" />';
$main_content .= '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $main_message['user_sender_id'] . '">' . $name . '</a>';
$main_content .= '<img width="60px" src="' . $userPicture . '" alt="' . $name . '" class="img-responsive img-circle" title="' . $name . '" />';
$main_content .= '</div>';
$main_content .= '</div>';
$date = '';
if ($main_message['send_date'] != $main_message['update_date']) {
if (!empty($main_message['update_date'])) {
$date = '<div class="message-date"> ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($main_message['update_date']) . '</div>';
$date = '<div class="date"> '. Display::returnFontAwesomeIcon('calendar') .' ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($main_message['update_date']) . '</div>';
}
} else {
$date = '<div class="message-date"> ' . get_lang('Created') . ' ' . date_to_str_ago($main_message['send_date']) . '</div>';
$date = '<div class="date"> ' . Display::returnFontAwesomeIcon('calendar') .' ' . get_lang('Created') . ' ' . date_to_str_ago($main_message['send_date']) . '</div>';
}
$attachment = '<div class="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '') . '</div>';
$main_content .= '<div class="message-content"> ' . $date . $main_message['content'] . $attachment . '</div>';
$main_content .= '<div class="col-md-10">';
$user_link = '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $main_message['user_sender_id'] . '">' . $name . '</a>';
$main_content .= '<div class="message-content"> ';
$main_content .= '<div class="username">' . $user_link . '</div>';
$main_content .= $date ;
$main_content .= '<div class="message">'. $main_message['content'] . $attachment . '</div></div>';
$main_content .= '</div>';
$main_content .= '</div>';
//$main_content = Security::remove_XSS($main_content, STUDENT, true);
$html .= Display::div(Display::div($title . $main_content, array('class' => 'message-topic')), array('class' => 'sm-groups-message'));
@ -1349,7 +1358,7 @@ class MessageManager
$files_attachments = self::get_links_message_attachment_files($topic['id']);
$name = $user_sender_info['complete_name'];
$links .= '<div class="btn-group">';
$links .= '<div class="btn-group btn-group-sm">';
if (($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR) || $topic['user_sender_id'] == $current_user_id) {
$links .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'social/message_for_group_form.inc.php?height=400&width=800&&user_friend=' . $current_user_id . '&group_id=' . $group_id . '&message_id=' . $topic['id'] . '&action=edit_message_group&anchor_topic=topic_' . $topic_id . '&topics_page_nr=' . $topic_page_nr . '&items_page_nr=' . $items_page_nr . '&topic_id=' . $topic_id . '" class="ajax btn btn-default" data-size="lg" data-title="' . get_lang('Edit') . '" title="' . get_lang('Edit') . '">' .
Display::returnFontAwesomeIcon('pencil') . '</a>';
@ -1361,20 +1370,29 @@ class MessageManager
$userPicture = $user_sender_info['avatar'];
$user_link = '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $topic['user_sender_id'] . '">' . $name . '&nbsp</a>';
$html_items .= '<div class="avatar-author"><img src="' . $userPicture . '" alt="' . $name . '" class="img-responsive img-circle" width="64" height="64" title="' . $name . '" />' . $user_link . '</div>';
$html_items .= '<div class="row">';
$html_items .= '<div class="col-md-2">';
$html_items .= '<div class="avatar-author"><img width="60px" src="' . $userPicture . '" alt="' . $name . '" class="img-responsive img-circle" title="' . $name . '" /></div>';
$html_items .= '</div>';
$date = '';
if ($topic['send_date'] != $topic['update_date']) {
if (!empty($topic['update_date'])) {
$date = '<div class="message-date"> ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($topic['update_date']) . '</div>';
$date = '<div class="date"> ' . Display::returnFontAwesomeIcon('calendar') .' '. get_lang('LastUpdate') . ' ' . date_to_str_ago($topic['update_date']) . '</div>';
}
} else {
$date = '<div class="message-date"> ' . get_lang('Created') . ' ' . date_to_str_ago($topic['send_date']) . '</div>';
$date = '<div class="date"> ' . Display::returnFontAwesomeIcon('calendar') . get_lang('Created') . ' ' . date_to_str_ago($topic['send_date']) . '</div>';
}
$attachment = '<div class="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '') . '</div>';
$html_items .= '<div class="message-content">' . $links . ' ' . $date . Security::remove_XSS($topic['content'], STUDENT, true) . $attachment . '</div>';
$html_items .= '<div class="col-md-10">';
$html_items .= '<div class="message-content">';
$html_items .= $links;
$html_items .= '<div class="username">' . $user_link . '</div>';
$html_items .= $date;
$html_items .= '<div class="message">' . Security::remove_XSS($topic['content'], STUDENT, true) . '</div>' . $attachment . '</div>';
$html_items .= '</div>';
$html_items .= '</div>';
$base_padding = 20;
if ($topic['indent_cnt'] == 0) {

@ -1089,18 +1089,28 @@ class Skill extends Model
* @param int skill id
* @param bool return a flat array or not
* @param int depth of the skills
*
* @param bool filter status
* @return json
*/
public function get_skills_tree_json($user_id = null, $skill_id = null, $return_flat_array = false, $main_depth = 2)
public function get_skills_tree_json($user_id = null, $skill_id = null, $return_flat_array = false, $main_depth = 2, $filter_status = false)
{
$tree = $this->get_skills_tree($user_id, $skill_id, $return_flat_array, true);
$simple_tree = array();
if (!empty($tree['children'])) {
foreach ($tree['children'] as $element) {
$simple_tree[] = array(
'name' => $element['name'],
'children' => $this->get_skill_json($element['children'], 1, $main_depth)
);
if ($filter_status) {
if (intval($element['status'])) {
$simple_tree[] = array(
'name' => $element['name'],
'children' => $this->get_skill_json($element['children'], 1, $main_depth, $filter_status)
);
}
} else {
$simple_tree[] = array(
'name' => $element['name'],
'children' => $this->get_skill_json($element['children'], 1, $main_depth)
);
}
}
}
@ -1112,21 +1122,28 @@ class Skill extends Model
* @param array $subtree
* @param int $depth
* @param int $max_depth
* @param bool $filter_status
* @return array|null
*/
public function get_skill_json($subtree, $depth = 1, $max_depth = 2)
public function get_skill_json($subtree, $depth = 1, $max_depth = 2, $filter_status = false)
{
$simple_sub_tree = array();
if (is_array($subtree)) {
$counter = 1;
foreach ($subtree as $elem) {
if ($filter_status) {
if (!intval($elem['status'])) {
break 1;
}
}
$tmp = array();
$tmp['name'] = $elem['name'];
$tmp['id'] = $elem['id'];
$tmp['isSearched'] = self::isSearched($elem['id']);
if (isset($elem['children']) && is_array($elem['children'])) {
$tmp['children'] = $this->get_skill_json($elem['children'], $depth + 1, $max_depth);
$tmp['children'] = $this->get_skill_json($elem['children'], $depth + 1, $max_depth, $filter_status);
} else {
//$tmp['colour'] = $this->colours[$depth][rand(0,3)];
}

@ -1375,7 +1375,7 @@ class UserGroup extends Model
public function get_picture_group($id, $picture_file, $height, $size_picture = GROUP_IMAGE_SIZE_MEDIUM , $style = '')
{
$picture = array();
$picture['style'] = $style;
//$picture['style'] = $style;
if ($picture_file == 'unknown.jpg') {
$picture['file'] = Display::returnIconPath($picture_file);
return $picture;
@ -1403,12 +1403,12 @@ class UserGroup extends Model
$file = $image_array_sys['dir'].$size_picture.$picture_file;
if (file_exists($file)) {
$picture['file'] = $image_array['dir'].$size_picture.$picture_file;
$picture['style'] = '';
//$picture['style'] = '';
if ($height > 0) {
$dimension = api_getimagesize($picture['file']);
$margin = (($height - $dimension['width']) / 2);
//@ todo the padding-top should not be here
$picture['style'] = ' style="padding-top:'.$margin.'px; width:'.$dimension['width'].'px; height:'.$dimension['height'].';" ';
//$picture['style'] = ' style="padding-top:'.$margin.'px; width:'.$dimension['width'].'px; height:'.$dimension['height'].';" ';
}
} else {
$file = $image_array_sys['dir'].$picture_file;
@ -1921,7 +1921,7 @@ class UserGroup extends Model
$where_relation_condition = "AND gu.relation_type IN ($relation_type) ";
}
$sql = "SELECT picture_uri as image, u.id, u.firstname, u.lastname, relation_type
$sql = "SELECT picture_uri as image, u.id, CONCAT (u.firstname,' ', u.lastname) as fullname, relation_type
FROM $tbl_user u
INNER JOIN $table_group_rel_user gu
ON (gu.user_id = u.id)

@ -143,7 +143,7 @@ if (is_array($Users) && count($Users) > 0 ) {
}
$social_left_content = SocialManager::show_social_menu('invite_friends', $group_id);
$social_right_content = '<h2>'.Security::remove_XSS($group_info['name'], STUDENT, true).'</h2>';
$social_right_content = '<h3 class="group-title">'.Security::remove_XSS($group_info['name'], STUDENT, true).'</h3>';
if (count($nosessionUsersList) == 0) {
$friends = SocialManager::get_friends(api_get_user_id());
@ -153,7 +153,7 @@ if (count($nosessionUsersList) == 0) {
$social_right_content .= Display::return_message(get_lang('YouAlreadyInviteAllYourContacts'), 'info');
}
$social_right_content .= '<div>';
$social_right_content .= '<a href="search.php" class="btn btn-default">'.get_lang('TryAndFindSomeFriends').' <em class="fa fa-search"></em></a>';
$social_right_content .= '<a href="search.php" class="btn btn-default btn-sm">'.Display::returnFontAwesomeIcon('search').' '.get_lang('TryAndFindSomeFriends').'</a>';
$social_right_content .= '</div>';
$social_right_content .= '<br />';
}
@ -182,18 +182,20 @@ $members = $usergroup->get_users_by_group(
if (is_array($members) && count($members)>0) {
foreach ($members as &$member) {
$image = UserManager::getUserPicture($member['id']);
$member['image'] = '<img src="'.$image.'" width="50px" height="50px" />';
$member['image'] = '<img class="img-circle" src="'.$image.'" width="50px" height="50px" />';
}
$social_right_content .= '<h3>'.get_lang('UsersAlreadyInvited').'</h3>';
$social_right_content .= Display::return_sortable_grid(
$userList .= Display::return_sortable_grid(
'invitation_profile',
array(),
$members,
array('hide_navigation' => true, 'per_page' => 100),
array(),
false,
array(true, false, true, true)
array(true, false, true, false)
);
$social_right_content .= Display::panel($userList, get_lang('UsersAlreadyInvited'));
}
$tpl = new Template(null);

@ -183,13 +183,21 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
if (!in_array($role,
array(GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER, GROUP_USER_PERMISSION_PENDING_INVITATION))
) {
$social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.
$social_right_content .= '<div class="group-tool">';
$social_right_content .= '<div class="pull-right">';
$social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.
get_lang('JoinGroup').'</a>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
} elseif ($role == GROUP_USER_PERMISSION_PENDING_INVITATION) {
$social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.
$social_right_content .= '<div class="group-tool">';
$social_right_content .= '<div class="pull-right">';
$social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.
Display::returnFontAwesomeIcon('envelope').' '.
get_lang('YouHaveBeenInvitedJoinNow').'</a>';
}
$social_right_content .= '<br />';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
}
$content = MessageManager::display_messages_for_group($group_id);
if ($is_group_member) {
@ -203,10 +211,11 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
'action' => 'add_message_group'
]);
$create_thread_link = Display::url(
Display::returnFontAwesomeIcon('commenting') . ' ' .
get_lang('YouShouldCreateATopic'),
$createThreadUrl,
[
'class' => 'ajax btn btn-default',
'class' => 'ajax btn btn-primary',
'title' => get_lang('ComposeMessage'),
'data-title' => get_lang('ComposeMessage'),
'data-size' => 'lg'
@ -222,6 +231,7 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
'action' => 'add_message_group',
]);
$create_thread_link = Display::url(
Display::returnFontAwesomeIcon('commenting') . ' ' .
get_lang('NewTopic'),
$createThreadUrl,
[
@ -246,10 +256,15 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
// Members
if (count($members) > 0) {
if ($role == GROUP_USER_PERMISSION_ADMIN) {
$member_content .= '<div class="group-tool">';
$member_content .= '<div class="pull-right">';
$member_content .= Display::url(
Display::return_icon('edit.gif', get_lang('EditMembersList')).' '.get_lang('EditMembersList'),
'group_members.php?id='.$group_id
Display::returnFontAwesomeIcon('pencil').' '.get_lang('EditMembersList'),
'group_members.php?id='.$group_id,
array('class'=>'btn btn-default btn-sm', 'title' => get_lang('EditMembersList'))
);
$member_content .= '</div>';
$member_content .= '</div>';
}
$member_content .= '<div class="user-list">';
$member_content .= '<div class="row">';
@ -268,10 +283,9 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
}
$userPicture = UserManager::getUserPicture($member['id']);
$member_content .= '<div class="col-md-2">';
$member_content .= '<div class="col-md-3">';
$member_content .= '<div class="items-user">';
$member_name = Display::url(api_get_person_name(cut($member['firstname'],15),cut($member['lastname'],15)).'&nbsp;'.$icon, $member['user_info']['profile_url']);
$member_name = Display::url(api_get_person_name(cut($member['user_info']['firstname'],15),cut($member['user_info']['lastname'],15)).'&nbsp;'.$icon, $member['user_info']['profile_url']);
$member_content .= Display::div('<img class="img-circle" src="'.$userPicture.'"/>', array('class' => 'avatar'));
$member_content .= Display::div($member_name, array('class' => 'name'));
$member_content .= '</div>';

@ -262,12 +262,12 @@ if (isset($_GET['view']) && in_array($_GET['view'], $allowed_views)) {
if (count($grid_newest_groups) > 0) {
$newest_content = Display::return_sortable_grid('mygroups', array(), $grid_newest_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false));
} else {
$newest_content = '<span class="muted">'.get_lang('GroupNone').'</span>';
$newest_content = '<div class="muted">'.get_lang('GroupNone').'</div>';
}
if (count($grid_pop_groups) > 0) {
$popular_content = Display::return_sortable_grid('mygroups', array(), $grid_pop_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,true,true));
} else {
$popular_content = '<span class="muted">'.get_lang('GroupNone').'</span>';
$popular_content = '<div class="muted">'.get_lang('GroupNone').'</div>';
}
}

@ -109,10 +109,11 @@ if (!empty($results)) {
$picture = $userGroup->get_picture_group(
$id,
$result['picture'],
80
null,
GROUP_IMAGE_SIZE_BIG
);
$result['picture'] = '<img class="group-image" src="' . $picture['file'] . '" />';
$result['picture'] = '<img class="img-responsive" src="' . $picture['file'] . '" />';
$group_actions = '<div class="group-more"><a href="groups.php?#tab_browse-2">' . get_lang('SeeMore') . '</a></div>';
$group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
$groups_newest[] = array(
@ -152,9 +153,10 @@ foreach ($results as $result) {
$picture = $userGroup->get_picture_group(
$id,
$result['picture'],
80
null,
GROUP_IMAGE_SIZE_BIG
);
$result['picture_uri'] = '<img class="group-image" src="' . $picture['file'] . '" />';
$result['picture_uri'] = '<img class="img-responsive" src="' . $picture['file'] . '" />';
$group_actions = '<div class="group-more" ><a href="groups.php?#tab_browse-3">' . get_lang('SeeMore') . '</a></div>';
$group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
$groups_pop[] = array(
@ -170,8 +172,8 @@ if ($list > 0) {
$social_group_block .= '<div class="group-title">' . get_lang('Newest') . '</div>';
for($i = 0;$i < $list; $i++){
$social_group_block.='<div class="row">';
$social_group_block.='<div class="col-md-2">' . $groups_newest[$i][0] . '</div>';
$social_group_block.='<div class="col-md-10">' . $groups_newest[$i][1];
$social_group_block.='<div class="col-md-3">' . $groups_newest[$i][0] . '</div>';
$social_group_block.='<div class="col-md-9">' . $groups_newest[$i][1];
$social_group_block.= $groups_newest[$i][2] . '</div>';
$social_group_block.="</div>";
}
@ -184,8 +186,8 @@ if ($list > 0) {
for($i = 0;$i < $list; $i++){
$social_group_block.='<div class="row">';
$social_group_block.='<div class="col-md-2">' . $groups_pop[$i][0] . '</div>';
$social_group_block.='<div class="col-md-10">' . $groups_pop[$i][1];
$social_group_block.='<div class="col-md-3">' . $groups_pop[$i][0] . '</div>';
$social_group_block.='<div class="col-md-9">' . $groups_pop[$i][1];
$social_group_block.= $groups_pop[$i][2] . '</div>';
$social_group_block.="</div>";
}

@ -198,15 +198,15 @@ if (count($pending_invitations) > 0) {
$picture = $userGroupModel->get_picture_group(
$invitation['id'],
$invitation['picture'],
80
null,
GROUP_IMAGE_SIZE_BIG
);
$img = '<img class="social-groups-image" src="'.$picture['file'].'" />';
$img = '<img class="img-responsive" src="'.$picture['file'].'" />';
$invitation['picture_uri'] = '<a href="group_view.php?id='.$invitation['id'].'">'.$img.'</a>';
$invitation['name'] = '<a href="group_view.php?id='.$invitation['id'].'">'.cut($invitation['name'],120,true).'</a>';
$invitation['description'] = cut($invitation['description'],220,true);
$new_invitation[]=$invitation;
$waitingInvitation .= '<div class="well"><div class="row">';
$waitingInvitation .= '<div class="panel-invitations"><div class="row">';
$waitingInvitation .= '<div class="col-md-3">'.$invitation['picture_uri'].'</div>';
$waitingInvitation .= '<div class="col-md-9">';
$waitingInvitation .= '<h4 class="tittle-profile">'.$invitation['name'].'</h4>';

@ -12,7 +12,13 @@ which should include the vendor/behat/behat/bin/behat executable.
Make sure you set the right base_url in behat.yml, then run (on the command
line, from the tests/ directory):
```
../vendor/behat/behat/bin/behat -v
../vendor/behat/behat/bin/behat features/login.feature
../vendor/behat/behat/bin/behat features/createUser.feature
../vendor/behat/behat/bin/behat features/createCourse.feature
../vendor/behat/behat/bin/behat features/courseTools.feature
../vendor/behat/behat/bin/behat features/forum.feature
../vendor/behat/behat/bin/behat features/socialGroup.feature
../vendor/behat/behat/bin/behat features/accessCompanyReports.feature
```
This should run all tests and all of them should pass.

Loading…
Cancel
Save