Browse Source

Merge branch 'aragonc-1.10.x' into 1.10.x

Yannick Warnier 9 years ago
parent
commit
38d5734b0f

+ 147 - 165
app/Resources/public/css/base.css

@@ -36,6 +36,10 @@ footer #footer_right{
 select {
   width : auto;
 }
+a.thumbnail:hover{
+  border:1px solid #dddddd;
+  box-shadow: 0 4px 8px #C8C8C8;
+}
 /*------------------------------*/
 .admin-block-version{
  font-size: 12px;
@@ -3461,12 +3465,10 @@ div#no-data-view div.controls {
     text-indent: -9000px;
     z-index: 1;
 }
-
 /* remove halo effect in firefox   */
 a:active{
     outline: none;
 }
-
 .skills-profiles, .skills-users, .skills-skills {
     margin-top: 10px;
     margin-bottom: 10px;
@@ -3480,30 +3482,6 @@ a:active{
     margin-bottom: 8px;
     border: 0px;
 }
-
-.offline_user {
-    display: block;
-    height: 20px;
-    width: 20px;
-    position:absolute;
-    background: url("../../main/img/offline.png") no-repeat scroll right center transparent;
-}
-
-.online_user {
-    display: block;
-    height: 20px;
-    width: 20px;
-    position:absolute;
-    background: url("../../main/img/online.png") no-repeat scroll right center transparent;
-}
-
-.online_user_in_text {
-    background: url("../../main/img/online.png") no-repeat scroll right center transparent;
-    height: 16px;
-    width: 17px;
-    display: inline-block;
-    margin-right: 4px;
-}
 .send_msg_in_text {
     background: url("../../main/img/mail_send.png") no-repeat scroll right center transparent;
     height: 16px;
@@ -3518,60 +3496,21 @@ a:active{
     display: inline-block;
     margin-right: 4px;
 }
-.teacher_online {
-    background: url("../../main/img/icons/16/teacher.png") no-repeat scroll right center transparent;
-    height: 16px;
-    width: 17px;
-    display: inline-block;
-    margin-right: 4px;
-}
-
-.student_online {
-    background: url("../../main/img/icons/16/user.png") no-repeat scroll right center transparent;
-    height: 16px;
-    width: 17px;
-    display: inline-block;
-    margin-right: 4px;
-}
-
-#online_grid_container .thumbnail .caption {
-    text-align:center;
-}
-
-.offline_user_in_text {
-    background: url("../../main/img/offline.png") no-repeat scroll right center transparent;
-    height: 16px;
-    width: 17px;
-    display: inline-block;
-    margin-right: 4px;
-}
-
-.subnav .nav .hide_menu {
-    display:none;
-}
-
-.homepage_notice {
-
-}
-
 .welcome_course li {
     float:left;
     list-style-type: none;
     width: 175px
 }
-
 .welcome_course li p {
     margin-left: auto;
     margin-right: auto;
     width: 88px;
 }
-
 .welcome_course li a {
     margin-left: auto;
     margin-right: auto;
     width: 120px;
 }
-
 /* Nanogong - exercise player*/
 
 .nanogong_player_container {
@@ -4565,14 +4504,6 @@ i.size-32.icon-new-work{
     z-index: 1010;
 }
 
-/* Balances ".thumbnail > img" from bootstrap */
-.thumbnail > a > img {
-    display: block;
-    margin-left: auto;
-    margin-right: auto;
-    max-width: 100%;
-}
-
 /* display the cookie usage warning validation */
 .cookieUsageValidation {
     padding: 5px;
@@ -4838,25 +4769,42 @@ i.size-32.icon-new-work{
 
 .social-avatar{
   text-align: center;
-  padding-top: 10px;
 }
-.social-avatar .avatar-profile{
+.social-avatar .img-profile{
   margin-bottom: 5px;
+  padding-left: 50px;
+  padding-right: 50px;
+  padding-top: 20px;
+}
+.social-avatar .social-profile{
+  text-align: center;
+  padding-top: 10px;
 }
-.social-avatar .avatar-profile .img-responsive{
+.social-avatar .social-profile .img-responsive{
   display: inline-block;
   margin: auto;
 }
 .social-avatar .lastname{
-  font-size: 18px;
+  font-size: 14px;
   font-weight: bold;
   color: #4d4d4d;
+  margin-bottom: 5px;
 }
 .social-avatar .firstname{
-  font-size: 16px;
+  font-size: 14px;
   font-weight: bold;
   color: #4d4d4d;
-  margin-bottom: 5px;
+  margin-bottom: 0px;
+}
+.social-avatar .social-avatar-email,
+.social-avatar .social-avatar-chat{
+  font-size: 12px;
+  padding-top: 2px;
+  padding-bottom: 2px;
+  color: #666666;
+}
+.social-avatar .social-avatar-chat{
+  margin-bottom: 15px;
 }
 .social-avatar .edit-profile{
   margin-top: 15px;
@@ -4870,6 +4818,14 @@ i.size-32.icon-new-work{
   font-weight: bold;
   font-size: 14px;
 }
+.social-profile .group-description{
+  font-size: 12px;
+  padding-left: 10px;
+  padding-right: 10px;
+  color: #666666;
+  margin-bottom: 10px;
+  margin-top: 10px;
+}
 .social-skill .list-badges{
   list-style: none;
   padding-left: 8px;
@@ -4966,7 +4922,7 @@ i.size-32.icon-new-work{
 }
 .top-mediapost .user-image .avatar-thumb,
 .sub-mediapost .user-image .avatar-thumb{
-  padding: 5px;
+  padding: 2px;
   border: 1px solid #dddddd;
   margin-bottom: 5px;
   margin-right: 5px;
@@ -5197,48 +5153,6 @@ ul.holder li.bit-box{
 #panel-thematic .views ul li{
   font-size: 12px;
 }
-/* end thematic progress*/
-.card {
-  overflow: hidden;
-  position: relative;
-  border: 1px solid #CCC;
-  border-radius: 8px;
-  text-align: center;
-  padding: 0;
-  /* background-color: #284c79; */
-  color: rgb(136, 172, 217);
-  margin-bottom: 20px;
-}
-.card .header-bg {
-  /* This stretches the canvas across the entire hero unit */
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 70px;
-  border-bottom: 1px #FFF solid;
-  /* This positions the canvas under the text */
-  z-index: 1;
-}
-
-.card .avatar {
-  position: relative;
-  margin-top: 15px;
-  z-index: 100;
-}
-
-.card .content {
-  margin-bottom: 15px;
-}
-
-.card .avatar img {
-  width: 100px;
-  height: 100px;
-  -webkit-border-radius: 50%;
-  -moz-border-radius: 50%;
-  border-radius: 50%;
-  border: 5px solid rgba(0,0,30,0.8);
-}
 
 .question_options .exercise-unique-answer-image .radio{
   padding-left: 10px;
@@ -6183,117 +6097,185 @@ div#chat-remote-video video {
 .filler-report .filler-report-data-init{
   width: 60%;
 }
-
-
-
+#hot-course .items-course{
+  padding: 10px;
+  border: 1px solid #e6e6e6;
+  border-radius: 5px;
+  -moz-border-radius: 5px;
+  -webkit-border-radius: 5px;
+  min-height: 350px;
+  margin-bottom: 10px;
+}
+#hot-course .items-course .items-course-info .title{
+  font-size: 14px;
+  min-height: 32px;
+}
+#hot-course .items-course .items-course-info .teachers{
+  font-size: 12px;
+  color: #666666;
+}
+#hot-course .items-course .items-course-info .ranking{
+  font-size: 10px;
+  color: #666666;
+}
+.hot-course-head{
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+.hot-course-head .hot-course-title{
+  padding-bottom: 10px;
+  border-bottom: 1px solid #E5E5E5;
+  font-size: 21px;
+}
+.create-groups .separate td{
+  padding-left: 15px;
+  padding-right: 15px;
+  margin-right: 10px;
+}
+.create-groups .separate .btn-primary{
+  margin-top: 20px;
+}
+#session-properties td, #session-user-list td, #session-user-list th{
+  text-align: left;
+  padding-left: 15px;
+}
+/*form input.form-control{
+  margin-top: 10px;
+}*/
+#whoisonline .items-user{
+  text-align: center;
+  /*border:1px solid #dddddd; */
+  padding: 15px;
+  border-radius: 4px;
+  -moz-border-radius: 4px;
+  -webkit-border-radius: 4px;
+  box-shadow: 0 2px 3px #C8C8C8;
+  border: 1px solid #e6e6e6;
+  margin-bottom: 20px;
+  min-height: 240px;
+}
+#whoisonline .items-user-name{
+  font-size: 12px;
+  padding-top: 10px;
+  line-height: 15px;
+}
+.search-user label{
+  font-weight: normal;
+  padding-left: 10px;
+  padding-right: 10px;
+}
+.course-items .course-items-session{
+  font-size: 12px;
+}
+.course-items .course-items-title{
+  font-size:16px;
+}
+.report_section .table{
+  font-size: 12px;
+}
 /* CSS for the view by session My Course tab */
 .session-view-block {
-    font-size : 14px;
-    font-weight : normal;
+  font-size : 14px;
+  font-weight : normal;
 }
 
 .session-view-row {
-    padding: 8px 0;
+  padding: 8px 0;
 }
 
 .session-view-lvl-2 {
-    margin-left : 66px;
+  margin-left : 66px;
 }
 
 .session-view-lvl-3 {
-    padding-left : 92px;
+  padding-left : 92px;
 }
 
 .session-view-lvl-4 {
-    padding-left : 102px;
+  padding-left : 102px;
 }
 
 .session-view-lvl-5 {
-    padding-left : 128px;
-    font-weight : normal;
+  padding-left : 128px;
+  font-weight : normal;
 }
 
 .session-view-lvl-6 {
-    padding-left : 20px;
+  padding-left : 20px;
 }
 
 .session-view-lvl-7 {
-    padding-left : 48px;
+  padding-left : 48px;
 }
 
 img.sessionView {
-    padding-right: 10px;
+  padding-right: 10px;
 }
 
 a.sessionView {
-    font-weight : bold;
+  font-weight : bold;
 }
 
 .session-view-user-category {
-    font-weight : bold;
-    padding-bottom : 10px;
+  font-weight : bold;
+  padding-bottom : 10px;
 }
 
 .session-view-session-category {
-    font-weight : bold;
-    padding-bottom : 10px;
+  font-weight : bold;
+  padding-bottom : 10px;
 }
 
 .session-view-session {
-    font-weight : bold;
+  font-weight : bold;
 }
 
 /* Like the well class */
 .session-view-well {
-    min-height: 20px;
-    padding: 19px;
-    margin-bottom: 20px;
-    background-color: #F5F5F5;
-    border: 1px solid rgba(0, 0, 0, 0.05);
-    border-radius: 4px;
-    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05) inset;
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: #F5F5F5;
+  border: 1px solid rgba(0, 0, 0, 0.05);
+  border-radius: 4px;
+  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05) inset;
 }
 
 .session-view-button {
-    border : none;
-    min-width : 28px;
+  border : none;
+  min-width : 28px;
 }
 
 .view-by-session-link {
-    min-height: 38px;
+  min-height: 38px;
 }
 
 .view-by-session-teachers {
-    display : none; /* change this if you want to display teachers name in this view */
-    font-size : 10px;
-    overflow-x : auto;
-    overflow-y: auto;
-    max-height:50px;
+  display : none; /* change this if you want to display teachers name in this view */
+  font-size : 10px;
+  overflow-x : auto;
+  overflow-y: auto;
+  max-height:50px;
 }
 
 .view-by-session-right-actions {
-    float : right;
+  float : right;
 }
 
 .view-by-session-right-actions img {
-    width : 12px;
+  width : 12px;
 }
 
 .session-view-session-go-to-course-in-session {
-    font-size : 12px;
+  font-size : 12px;
 }
-
 #gradebook_list .centered {
     text-align:center;
     vertical-align:middle;
 }
-
 #gradebook_list .centered .badge-group {
     width: auto;
 }
-
-
-
 /* CSS NEW TOP ******************************************************************************/
 /* CSS Responsive */
 @media (min-width: 1025px) and (max-width: 1200px) {

+ 6 - 3
main/group/group_creation.php

@@ -132,10 +132,10 @@ if (isset($_POST['number_of_groups'])) {
 
 		// Modify the default templates
 		$renderer = $form->defaultRenderer();
-		$form_template = "<form {attributes}>\n<div>\n<table>\n{content}\n</table>\n</div>\n</form>";
+		$form_template = "<form {attributes}>\n<div class='create-groups'>\n<table>\n{content}\n</table>\n</div>\n</form>";
 		$renderer->setFormTemplate($form_template);
 		$element_template = <<<EOT
-	<tr>
+        <tr class="separate">
 		<td>
 			<!-- BEGIN required -->
 			<span class="form_required">*</span> <!-- END required -->{label}
@@ -208,10 +208,13 @@ EOT;
 
 	$create_groups_form = new FormValidator('create_groups', 'post', api_get_self().'?'.api_get_cidreq());
 	$create_groups_form->addElement('header', $nameTools);
-	$group_el = array ();
+	/* $group_el = array ();
 	$group_el[] = $create_groups_form->createElement('text', 'number_of_groups', array(get_lang('Create'), '1'));
 	$group_el[] = $create_groups_form->addButtonCreate(get_lang('ProceedToCreateGroup'), 'submit', true);
 	$create_groups_form->addGroup($group_el, 'create_groups', get_lang('NumberOfGroupsToCreate'), ' ', false);
+	*/
+    $create_groups_form->addText('number_of_groups',get_lang('NumberOfGroupsToCreate'),null,array('value'=>'1'));
+    $create_groups_form->addButton('submit', get_lang('ProceedToCreateGroup'),'plus','primary');
 	$defaults = array();
 	$defaults['number_of_groups'] = 1;
 	$create_groups_form->setDefaults($defaults);

BIN
main/img/session_default.png


+ 1 - 1
main/inc/lib/api.lib.php

@@ -1875,7 +1875,7 @@ function api_format_course_array($course_data)
     if (file_exists(api_get_path(SYS_COURSE_PATH).$course_data['directory'].'/course-pic.png')) {
         $url_image = api_get_path(WEB_COURSE_PATH).$course_data['directory'].'/course-pic.png';
     } else {
-        $url_image = Display::return_icon('course.png', null, null, ICON_SIZE_BIG, null, true);
+        $url_image = Display::return_icon('session_default.png',null,null,null,null,true);
     }
     $_course['course_image_large'] = $url_image;
 

+ 8 - 6
main/inc/lib/course.lib.php

@@ -3154,11 +3154,11 @@ class CourseManager
             $html .= '<small>' . $params['subtitle'] . '</small>';
         }
         if (!empty($params['teachers'])) {
-            $html .= '<h5>' . Display::return_icon('teacher.png', get_lang('Teacher'), array(),
+            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Teacher'), array(),
                     ICON_SIZE_TINY) . $params['teachers'] . '</h5>';
         }
         if (!empty($params['coaches'])) {
-            $html .= '<h5>' . Display::return_icon('teacher.png', get_lang('Coach'), array(),
+            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Coach'), array(),
                     ICON_SIZE_TINY) . $params['coaches'] . '</h5>';
         }
 
@@ -3233,7 +3233,7 @@ class CourseManager
 
         $html .= '<div class="col-md-10 ' . $param_class . '">';
         $html .= '<div class="pull-right">' . $params['right_actions'] . '</div>';
-        $html .= '<h4 class="title">' . $params['title'] . $notifications . '</h4> ';
+        $html .= '<h4 class="course-items-title">' . $params['title'] . $notifications . '</h4> ';
 
         if (isset($params['show_description'], $params['description']) && $params['show_description'] == 1) {
             $html .= '<p class="description-session">' . $params['description'] . '</p>';
@@ -3242,12 +3242,12 @@ class CourseManager
             $html .= '<div class="subtitle-session">' . $params['subtitle'] . '</div>';
         }
         if (!empty($params['teachers'])) {
-            $html .= '<h5>' .
+            $html .= '<h5 class="course-items-session">' .
                     Display::return_icon('teacher.png', get_lang('Teacher'), array(), ICON_SIZE_TINY) .
                 $params['teachers'] . '</h5>';
         }
         if (!empty($params['coaches'])) {
-            $html .= '<h5>' .
+            $html .= '<h5 class="course-items-session">' .
                 Display::return_icon('teacher.png', get_lang('Coach'), array(), ICON_SIZE_TINY) .
                 $params['coaches'] . '</h5>';
         }
@@ -4509,10 +4509,12 @@ class CourseManager
 
         $result = Database::query($sql);
         $courses = array();
+
         if (Database::num_rows($result)) {
             $courses = Database::store_result($result, 'ASSOC');
             $courses = self::process_hot_course_item($courses, $my_course_code_list);
         }
+
         return $courses;
     }
 
@@ -4571,7 +4573,7 @@ class CourseManager
             ) {
                 $my_course['extra_info']['description_button'] = Display::url(get_lang('Description'),
                     api_get_path(WEB_AJAX_PATH) . 'course_home.ajax.php?a=show_course_information&code=' . $course_info['code'],
-                    array('class' => 'btn btn-default ajax'));
+                    array('class' => 'btn btn-default btn-sm btn-block ajax'));
             }
 
             $my_course['extra_info']['teachers'] = CourseManager::get_teacher_list_from_course_code_to_string($course_info['code']);

+ 2 - 2
main/inc/lib/display.lib.php

@@ -1676,13 +1676,13 @@ class Display
         return self::page_subheader($title, $second_title);
     }
 
-    public static function page_subheader($title, $second_title = null)
+    public static function page_subheader($title, $second_title = null, $size = 'h4')
     {
         if (!empty($second_title)) {
             $second_title = Security::remove_XSS($second_title);
             $title .= "<small> $second_title<small>";
         }
-        return '<h3>'.Security::remove_XSS($title).'</h3>';
+        return '<'.$size.'>'.Security::remove_XSS($title).'</'.$size.'>';
     }
 
     public static function page_subheader2($title, $second_title = null)

+ 32 - 23
main/inc/lib/javascript/chat/css/chat.css

@@ -1,32 +1,42 @@
 .chatboxmain {
 	position: fixed;
-	position:expression("absolute");
-	width: 225px;	
+	width: 225px;
 	z-index: 9000;
-    bottom: 0px; 
-    right: 20px; 
-    display: block;
+  bottom: 0px;
+  right: 20px;
+  display: block;
 }
 .chatboxheadmain {	
 	padding: 5px;
-	color: #333333;		
-	background-color: #EBEEF4;		
-    border-top: 1px solid rgba(29, 49, 91, 0.3);
-    border-left: 1px solid rgba(29, 49, 91, 0.3);
-    border-right: 1px solid rgba(29, 49, 91, 0.3);
+	color: #333333;
+  color: #ffffff;
+  border-right:1px solid #222;
+  border-left:1px solid #222;
+  background-color: #222;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
+  background-image: -webkit-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  min-height: 34px;
 }
 
 #chatboxtitlemain {
-    font-weight: bold;
+  font-weight: normal;
 	float: left;
-	font-size: 13px;
-	width: 160px;
+	font-size: 12px;
+  padding-top: 2px;
 	cursor:pointer;
 }
-
-
 .user_status_main {
-	width:16px;
+	width:30px;
 	display:inline;
 	float:left;
 	padding: 0px 4px 0px 4px;	
@@ -48,15 +58,15 @@
 }
 
 .chatboxtitle {
-	font-weight: bold;
+	font-weight: normal;
 	float: left;
-	font-size: 13px;
+	font-size: 12px;
 	width: 130px;
 	cursor:pointer;
-        overflow: hidden;
-        padding-left: 2px;
-        text-overflow: ellipsis;
-        white-space: nowrap;
+  overflow: hidden;
+  padding-left: 2px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
 }
 
 .chatboxhead {
@@ -65,7 +75,6 @@
 	color: #ffffff;
 	border-right:1px solid #222;
 	border-left:1px solid #222;
-	
 	background-color: #222;	
 	background-repeat: repeat-x;
 	background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));

+ 1 - 1
main/inc/lib/javascript/chat/js/chat.js

@@ -110,7 +110,7 @@ function showChatConnect() {
     }
     $("<div />" ).attr("id","chatmain")
 	.addClass("chatboxmain")
-	.html('<div class="chatboxheadmain"><div class="user_status_main">'+button+'</div><div id="chatboxtitlemain">'+label+'</div><div class="chatboxoptions"></div><br clear="all"/></div></div>')
+	.html('<div class="chatboxheadmain"><div class="user_status_main">'+button+'</div><div id="chatboxtitlemain">'+label+'</div><div class="chatboxoptions"></div></div>')
 	.appendTo($( "body" ));
 }
 

+ 30 - 14
main/inc/lib/social.lib.php

@@ -559,6 +559,7 @@ class SocialManager extends UserManager
         if (in_array($show, $show_groups) && !empty($group_id)) {
             // Group image
             $userGroup = new UserGroup();
+
             $group_info = $userGroup->get($group_id);
 
             $userGroupImage = $userGroup->get_picture_group(
@@ -571,6 +572,7 @@ class SocialManager extends UserManager
             $template->assign('show_group', true);
             $template->assign('group_id', $group_id);
             $template->assign('user_group_image', $userGroupImage);
+            $template->assign('user_group', $group_info);
             $template->assign(
                 'user_is_group_admin',
                 $userGroup->is_group_admin(
@@ -869,6 +871,7 @@ class SocialManager extends UserManager
         }
         $column_size = '12';
         $add_row = false;
+        //var_dump(api_set_anonymous());
         if (api_is_anonymous()) {
             $add_row = true;
         }
@@ -883,9 +886,23 @@ class SocialManager extends UserManager
         $html .= '<div class="row">';
 
         foreach ($user_list as $uid) {
-            $user_info = api_get_user_info($uid);
-            $name = $user_info['complete_name'];
+            $user_info = api_get_user_info($uid, $checkIfUserOnline = true);
+            $lastname = $user_info['lastname'];
+            $firstname =  $user_info['firstname'];
+            $completeName = $firstname.', '.$lastname;
+
+            $user_rol = $user_info['status'] == 1 ? Display::return_icon('teacher.png',get_lang('Teacher'),null,ICON_SIZE_TINY) : Display::return_icon('user.png',get_lang('Student'),null,ICON_SIZE_TINY);
+            $status_icon_chat = null;
+            if ($user_info['user_is_online_in_chat'] == 1) {
+                $status_icon_chat = Display::return_icon('online.png', get_lang('Online'));
+            } else {
+                $status_icon_chat = Display::return_icon('offline.png', get_lang('Offline'));
+            }
 
+            $userPicture = $user_info['avatar'];
+            $img = '<img class="img-responsive img-circle" title="'.$completeName.'" alt="'.$completeName.'" src="'.$userPicture.'">';
+
+            $url =  null;
             // Anonymous users can't have access to the profile
             if (!api_is_anonymous()) {
                 if (api_get_setting('allow_social_tool') == 'true') {
@@ -893,23 +910,20 @@ class SocialManager extends UserManager
                 } else {
                     $url = '?id='.$uid.$course_url;
                 }
-            } else {
-                $url = '#';
-            }
 
-            $user_status = $user_info['status'] == 1 ? Display::span('', array('class' => 'teacher_online')) : Display::span('', array('class' => 'student_online'));
-            $status_icon = Display::span('', array('class' => 'online_user_in_text'));
-            $userPicture = $user_info['avatar'];
+            } else {
+                $url = null;
 
-            $img = '<img title = "'.$name.'" alt="'.$name.'" src="'.$userPicture.'">';
-            $name = '<a href="'.$url.'">'.$status_icon.$user_status.$name.'</a>';
+            }
+            $name = '<a href="'.$url.'">'.$firstname.'<br>'.$lastname.'</a>';
 
-            $html .= '<div class="col-md-4">
-                        <div class="card">
-                            <div class="avatar">'.$img.'</div>
-                            <div class="content">
+            $html .= '<div class="col-xs-6 col-md-2">
+                        <div class="items-user">
+                            <div class="items-user-avatar">'.$img.'</div>
+                            <div class="items-user-name">
                             '.$name.'
                             </div>
+                            <div class="items-user-status">'.$status_icon_chat.' '.$user_rol.'</div>
                         </div>
                       </div>';
 
@@ -1510,6 +1524,7 @@ class SocialManager extends UserManager
         }
 
         $userInfo = api_get_user_info($userId, true, false, true);
+
         $template->assign('user', $userInfo);
         $template->assign('socialAvatarBlock', $socialAvatarBlock);
         $template->assign('profileEditionLink', $profileEditionLink);
@@ -1526,6 +1541,7 @@ class SocialManager extends UserManager
         $templateName = $template->get_template('social/user_block.tpl');
 
         if (in_array($groupBlock, ['groups', 'group_edit', 'member_list'])) {
+
             $templateName = $template->get_template('social/group_block.tpl');
         }
 

+ 6 - 9
main/inc/lib/usergroup.lib.php

@@ -2018,16 +2018,13 @@ class UserGroup extends Model
         }
 
         if (!empty($links)) {
-            $html .= '<div class="well sidebar-nav"><ul class="nav nav-list">';
-            if (!empty($group_info['description'])) {
-                $html .= Display::tag(
-                    'li',
-                    Security::remove_XSS($group_info['description'], STUDENT, true),
-                    array('class'=>'group_description')
-                );
-            }
+            $html .= '<div class="panel panel-default">';
+            $html .= '<div class="panel-body">';
+            $html .= '<ul class="nav nav-pills nav-stacked">';
             $html .= $links;
-            $html .= '</ul></div>';
+            $html .= '</ul>';
+            $html .= '</div>';
+            $html .= '</div>';
         }
 
         return $html;

+ 2 - 2
main/inc/lib/userportal.lib.php

@@ -766,10 +766,10 @@ class IndexManager
 
             if (api_get_setting('allow_social_tool') == 'true') {
                 $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/social/home.php">
-                <img src="' . $userPicture . '" ></a>';
+                <img class="img-circle" src="' . $userPicture . '" ></a>';
             } else {
                 $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/auth/profile.php">
-                <img title="' . get_lang('EditProfile') . '" src="' . $userPicture. '" ></a>';
+                <img class="img-circle" title="' . get_lang('EditProfile') . '" src="' . $userPicture. '" ></a>';
             }
 
             $html = self::show_right_block(

+ 6 - 3
main/session/resume_session.php

@@ -108,7 +108,9 @@ switch ($action) {
 }
 
 $sessionHeader = Display::page_header(
-    Display::return_icon('session.png', get_lang('Session')).' '.$sessionInfo['name']
+    Display::return_icon('session.png', get_lang('Session')).' '.$sessionInfo['name'],
+    null,
+    'h3'
 );
 
 $url = Display::url(
@@ -121,6 +123,7 @@ $generalCoach = api_get_user_info($sessionInfo['id_coach']);
 
 $sessionField = new ExtraField('session');
 $extraFieldData = $sessionField->getDataAndFormattedValues($sessionId);
+
 $multiple_url_is_on = api_get_multiple_access_url();
 $urlList = [];
 if ($multiple_url_is_on) {
@@ -133,7 +136,7 @@ $url = Display::url(
 );
 $courseListToShow = Display::page_subheader(get_lang('CourseList').$url);
 
-$courseListToShow .= '<table class="data_table">
+$courseListToShow .= '<table id="session-list-course" class="data_table">
 <tr>
   <th width="35%">'.get_lang('CourseTitle').'</th>
   <th width="30%">'.get_lang('CourseCoach').'</th>
@@ -276,7 +279,7 @@ $userListToShow = Display::page_subheader(get_lang('UserList').$url);
 $userList = SessionManager::get_users_by_session($sessionId);
 
 if (!empty($userList)) {
-    $table = new HTML_Table(array('class' => 'data_table'));
+    $table = new HTML_Table(array('class' => 'data_table', 'id'=>'session-user-list'));
 
     $table->setHeaderContents(0, 0, get_lang('User'));
     $table->setHeaderContents(0, 1, get_lang('Status'));

+ 4 - 4
main/social/group_view.php

@@ -181,10 +181,10 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
     $content = MessageManager::display_messages_for_group($group_id);
     if ($is_group_member) {
         if (empty($content)) {
-            $create_thread_link =  '<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=800&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&action=add_message_group" class="ajax btn" title="'.get_lang('ComposeMessage').'">'.
+            $create_thread_link =  '<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=800&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&action=add_message_group" class="ajax btn btn-default" title="'.get_lang('ComposeMessage').'">'.
                 get_lang('YouShouldCreateATopic').'</a></li>';
         } else {
-            $create_thread_link = '<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&action=add_message_group" class="ajax btn" title="'.get_lang('ComposeMessage').'">'.
+            $create_thread_link = '<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&action=add_message_group" class="ajax btn btn-default" title="'.get_lang('ComposeMessage').'">'.
                 get_lang('NewTopic').'</a>';
         }
     }
@@ -216,14 +216,14 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
 
                 $member_content .= '<div class="">';
                 $member_name = Display::url(api_get_person_name(cut($member['firstname'],15),cut($member['lastname'],15)).'&nbsp;'.$icon, $member['user_info']['profile_url']);
-                $member_content .= Display::div('<img height="44" border="2" align="middle" vspace="10" class="social-groups-image" src="'.$userPicture.'"/>&nbsp'.$member_name);
+                $member_content .= Display::div('<img class="social-groups-image" src="'.$userPicture.'"/>&nbsp'.$member_name);
                 $member_content .= '</div>';
             }
         }
     }
 
     if (!empty($create_thread_link)) {
-        $create_thread_link =  Display::div($create_thread_link, array('style'=>'padding-top:2px;height:40px'));
+        $create_thread_link =  Display::div($create_thread_link, array('class'=>'pull-right'));
     }
     $headers = array(get_lang('Discussions'), get_lang('Members'));
     $social_right_content .= Display::tabs($headers, array($content, $member_content),'tabs');

+ 3 - 3
main/social/groups.php

@@ -81,7 +81,7 @@ if (is_array($results) && count($results) > 0) {
         }
 
         $picture = $usergroup->get_picture_group($result['id'], $result['picture'],80);
-        $result['picture'] = '<img class="social-groups-image" src="'.$picture['file'].'" hspace="4" height="50" border="2" align="left" width="50" />';
+        $result['picture'] = '<img class="social-groups-image" src="'.$picture['file'].'" />';
         $item_0  = Display::div($result['picture'], array('class'=>'box_description_group_image'));
         $members = Display::span($count_users_group, array('class'=>'box_description_group_member'));
         $item_1  = Display::div(Display::tag('h4', $url_open.$name.$url_close).$members, array('class'=>'box_description_group_title'));
@@ -118,7 +118,7 @@ foreach ($results as $result) {
 
     $name = cut($result['name'],GROUP_TITLE_LENGTH,true);
     $picture = $usergroup->get_picture_group($result['id'], $result['picture'],80);
-    $result['picture'] = '<img class="social-groups-image" src="'.$picture['file'].'" hspace="4" height="50" border="2" align="left" width="50" />';
+    $result['picture'] = '<img class="social-groups-image" src="'.$picture['file'].'" />';
 
     $item_0 = Display::div($result['picture'], array('class'=>'box_description_group_image'));
     $members = Display::span($count_users_group, array('class'=>'box_description_group_member'));
@@ -163,7 +163,7 @@ if (is_array($results) && count($results) > 0) {
 
         $name = cut($result['name'],GROUP_TITLE_LENGTH,true);
         $picture = $usergroup->get_picture_group($result['id'], $result['picture'],80);
-        $result['picture'] = '<img class="social-groups-image" src="'.$picture['file'].'" hspace="4" height="50" border="2" align="left" width="50" />';
+        $result['picture'] = '<img class="social-groups-image" src="'.$picture['file'].'" />';
 
         $item_0 = Display::div($result['picture'], array('class'=>'box_description_group_image'));
         $members = Display::span($count_users_group, array('class'=>'box_description_group_member'));

+ 1 - 1
main/social/profile_friends_and_groups.inc.php

@@ -117,7 +117,7 @@ if (isset($_GET['view']) && in_array($_GET['view'], $views)) {
                 }
 
                 $result['picture_uri'] = '<div class="box_shared_profile_group_image">
-                                          <img class="social-groups-image" src="' . $picture['file'] . '" hspace="4" height="50" border="2" align="left" width="50" /></div>';
+                                          <img class="social-groups-image" src="' . $picture['file'] . '" /></div>';
                 $item_actions = '';
                 if (api_get_user_id() == $user_id) {
                     $item_actions = '<div class="box_shared_profile_group_actions"><a href="group_view.php?id=' . $id . '">' .

+ 14 - 13
main/template/default/layout/hot_course_item.tpl

@@ -3,20 +3,21 @@
                     <div class="col-md-4">
                         <div class="items-course">
                             <div class="items-course-image">
-                                <img class="image-responsive" src="{{ hot_course.extra_info.course_image_large }}" alt="{{ hot_course.extra_info.title|e }}"/>
+                                <img class="img-responsive" src="{{ hot_course.extra_info.course_image_large }}" alt="{{ hot_course.extra_info.title|e }}"/>
                             </div>
-                        </div>
-                        <div class="items-course-info">
-                            <h4 class="title">{{ hot_course.extra_info.title}}</h4>
-                            <div class="teachers">{{ hot_course.extra_info.teachers }}</div>
-                            <div class="ranking">
-                                {{ hot_course.extra_info.rating_html }}
-                            </div>
-                            <div class="toolbar">
-                                {{ hot_course.extra_info.description_button }}
-                                {{ hot_course.extra_info.go_to_course_button }}
-                                {{ hot_course.extra_info.register_button }}
-                                {{ hot_course.extra_info.unsubscribe_button }}
+                            <div class="items-course-info">
+                                <h4 class="title">
+                                    <a title="{{ hot_course.extra_info.title}}" href="{{ hot_course.extra_info.course_public_url }}">{{ hot_course.extra_info.title}}</a>
+                                </h4>
+                                <div class="teachers">{{ hot_course.extra_info.teachers }}</div>
+                                <div class="ranking">
+                                    {{ hot_course.extra_info.rating_html }}
+                                </div>
+                                <div class="toolbar">
+                                    {{ hot_course.extra_info.description_button }}
+                                    {{ hot_course.extra_info.register_button }}
+                                    {{ hot_course.extra_info.unsubscribe_button }}
+                                </div>
                             </div>
                         </div>
                     </div>

+ 1 - 1
main/template/default/layout/hot_courses.tpl

@@ -33,7 +33,7 @@ $(document).ready( function() {
             {% endif %}
         </h4>
     </div>
-    <div class="hot-course-body">
+    <div id="hot-course">
         <div class="row">
             {% include template ~ '/layout/hot_course_item.tpl' %}
         </div>

+ 1 - 1
main/template/default/session/resume_session.tpl

@@ -5,7 +5,7 @@
 {{ session_header }}
 {{ title }}
 
-<table class="data_table">
+<table id="session-properties" class="data_table">
     <tr>
         <td>{{ 'GeneralCoach' | get_lang}} :</td>
         <td>{{ general_coach.complete_name }}</td>

+ 2 - 16
main/template/default/social/add_groups.tpl

@@ -8,22 +8,8 @@
             {{ social_menu_block }}
         </div>
     </div>
-    <div id="wallMessages" class="col-md-9" style="min-height:1px">
-        <div class="row">
-            <div class="col-md-12">
-                <div id="message_ajax_reponse" class=""></div>
-            </div>
-        </div>
-        <div class="row">
-            {{ social_right_content }}
-        </div>
-        <div id="display_response_id" class="col-md-5"></div>
-        {{ social_auto_extend_link }}
-    </div>
-    <div class="col-md-4">
-        <div class="row">
-            {{ social_right_information }}
-        </div>
+    <div class="col-md-9">
+       {{ social_right_content }}
     </div>
 </div>
 {% endblock %}

+ 14 - 11
main/template/default/social/avatar_block.tpl

@@ -1,19 +1,22 @@
-<div class="avatar-profile">
+<div class="social-profile">
     {% if show_group %}
+    <div class="img-profile">
         <a href="{{ _p.web_main ~ 'social/group_view.php?id=' ~ group_id }}">
-            <img src="{{ user_group_image.file }}" class="social-groups-image">
+            <img src="{{ user_group_image.file }}" class="img-responsive img-circle">
         </a>
-
-        {% if user_is_group_admin %}
-            <div id="edit_image">
-                <a href="{{ _p.web_main ~ 'social/group_edit.php?id=' ~ group_id }}">
-                    {{ 'EditGroup'|get_lang }}
-                </a>
-            </div>
-        {% endif %}
+    </div>
+    <div class="group-title"><h4>{{ user_group.name }}</h4></div>
+    <div class="group-description">{{ user_group.description }}</div>
+    {% if user_is_group_admin %}
+        <div id="edit_image">
+            <a class="btn btn-default" href="{{ _p.web_main ~ 'social/group_edit.php?id=' ~ group_id }}">
+                {{ 'EditGroup'|get_lang }}
+            </a>
+        </div>
+    {% endif %}
     {% elseif show_user %}
         <a href="{{ user_image.big }}" class="expand-image">
-            <img class="img-responsive" src="{{ user_image.normal }}">
+            <img class="img-responsive img-circle" src="{{ user_image.normal }}">
         </a>
     {% endif %}
 </div>

+ 1 - 1
main/template/default/social/group_block.tpl

@@ -1,4 +1,4 @@
-<div class="panel panel-info social-avatar">
+<div class="panel panel-default social-avatar">
     {{ socialAvatarBlock }}
     <p class="lead">{{ group_info.complete_name }}</p>
 </div>

+ 2 - 8
main/template/default/social/group_view.tpl

@@ -3,19 +3,13 @@
 {% block content %}
 <div class="row" xmlns="http://www.w3.org/1999/html">
     <div class="col-md-3">
-        <div class="social-menu">
+        <div class="social-groups">
             {{ social_avatar_block }}
             {{ social_menu_block }}
         </div>
     </div>
-    <div class="col-md-9" style="min-height:1px">
-
-        <div id="social-group-details">
-            <h4>{{ group_info.name }}</h4>
-        </div>
-
+    <div class="col-md-9">
         {{ create_link }}
-
         {% if is_group_member == false %}
             <div class="social-group-details-info">
                 {{ 'Privacy' | get_lang }}

+ 22 - 16
main/template/default/social/user_block.tpl

@@ -1,28 +1,34 @@
-<div class="panel panel-info social-avatar">
-    {{ socialAvatarBlock }}
-    <p class="lead">{{ user.complete_name }}</p>
-    <p>
-        <img src="{{ "instant_message.png" | icon }}" atl="{{ "Email" | get_lang }}">
-        {{ user.email}}
-    </p>
-    {% if user.user_is_online_in_chat != 0 %}
-        <p>
+<div class="social-avatar">
+    <div class="panel panel-default">
+        {{ socialAvatarBlock }}
+        <div class="social-avatar-name">
+            <p class="firstname">{{ user.firstname }}</p>
+            <p class="lastname">{{ user.lastname }}</p>
+        </div>
+        <div class="social-avatar-email">
+            <img src="{{ "instant_message.png" | icon }}" atl="{{ "Email" | get_lang }}">
+            {{ user.email}}
+        </div>
+        {% if user.user_is_online_in_chat != 0 %}
+        <div class="social-avatar-chat">
             <img src="{{ "online.png" | icon }}" alt="{{ "Online" | get_lang }}">
             {{ "Chat" | get_lang }} ({{ "Online" | get_lang }})
-        </p>
-    {% else %}
-        <p>
+        </div>
+        {% else %}
+        <div class="social-avatar-chat">
             <img src="{{ "offline.png" | icon }}" alt="{{ "Online" | get_lang }}">
             {{ "Chat" | get_lang }} ({{ "Offline" | get_lang }})
-        </p>
-    {% endif %}
+        </div>
+        {% endif %}
 
-    {% if not profileEditionLink is empty %}
+        {% if not profileEditionLink is empty %}
         <p>
             <a class="btn btn-link" href="{{ profileEditionLink }}">
                 <i class="fa fa-edit"></i>
                 {{ "EditProfile" | get_lang }}
             </a>
         </p>
-    {% endif %}
+        {% endif %}
+    </div>
 </div>
+

+ 21 - 0
main/template/default/social/whoisonline.tpl

@@ -0,0 +1,21 @@
+{% extends template ~ "/layout/layout_1_col.tpl" %}
+
+{% block content %}
+    <div class="row">
+        <div class="col-md-12">
+            <div class="search-user">
+                <div class="panel panel-default">
+                    <div class="panel-heading">
+                        {{ 'SearchUsers' | get_lang}}
+                    </div>
+                    <div class="panel-body">
+                        {{ social_search }}
+                    </div>
+                </div>
+            </div>
+            <div id="whoisonline">
+                {{ whoisonline }}
+            </div>
+        </div>
+    </div>
+{% endblock %}

+ 2 - 2
main/template/default/user_portal/session.tpl

@@ -39,11 +39,11 @@
                     {% endif %}
 
                     {% if session.teachers %}
-                        <h5>{{ "teacher.png"|icon(16) ~ session.teachers }}</h5>
+                        <h5 class="teacher-name">{{ "teacher.png"|icon(16) ~ session.teachers }}</h5>
                     {% endif %}
 
                     {% if session.coaches %}
-                        <h5>{{ "teacher.png"|icon(16) ~ session.coaches }}</h5>
+                        <h5 class="teacher-name">{{ "teacher.png"|icon(16) ~ session.coaches }}</h5>
                     {% endif %}
                 </div>
 

+ 14 - 70
whoisonline.php

@@ -17,79 +17,20 @@ if (isset($_GET['cidReq']) && strlen($_GET['cidReq']) > 0) {
 
 $_SESSION['who_is_online_counter'] = 2;
 
-$htmlHeadXtra[] = api_get_js('jquery.endless-scroll.js');
+//$htmlHeadXtra[] = api_get_js('jquery.endless-scroll.js');
 //social tab
 $this_section = SECTION_SOCIAL;
 // table definitions
 $track_user_table = Database::get_main_table(TABLE_MAIN_USER);
 $htmlHeadXtra[] = '<script>
 
-function show_image(image,width,height) {
-    width = parseInt(width) + 20;
-    height = parseInt(height) + 20;
-    window_x = window.open(image,\'windowX\',\'width=\'+ width + \', height=\'+ height + \'\');
-}
-
-$(document).ready(function (){
-    $("input#id_btn_send_invitation").bind("click", function(){
-        if (confirm("'.get_lang('SendMessageInvitation', '').'")) {
-            $("#form_register_friend").submit();
-        }
-    });
-});
-
-function display_hide () {
-    setTimeout("hide_display_message()",3000);
-}
-function hide_display_message () {
-    $("div#display_response_id").html("");
-    try {
-        $("#txt_subject_id").val("");
-        $("#txt_area_invite").val("");
-    }catch(e) {
-        $("#txt_area_invite").val("");
-    }
-}
-
-function show_icon_edit(element_html) {
-    ident="#edit_image";
-    $(ident).show();
-}
-
-function hide_icon_edit(element_html)  {
-    ident="#edit_image";
-    $(ident).hide();
-}
-
-$(document).ready(function() {
 
-    $("#link_load_more_items").click(function() {
-        page = $("#link_load_more_items").attr("data_link");
-        $.ajax({
-            beforeSend: function(objeto) {
-                $("#display_response_id").html("'.addslashes(get_lang('Loading')).'");
-            },
-            type: "GET",
-            url: "main/inc/ajax/online.ajax.php?a=load_online_user",
-            data: "online_page_nr="+page,
-            success: function(data) {
-                $("#display_response_id").html("");
-                if (data != "end") {
-                    $("#link_load_more_items").remove();
-                    var last = $("#online_grid_container li:last");
-                    last.after(data);
-                } else {
-                    $("#link_load_more_items").remove();
-                }
-            }
-        });
-    });
-});
 </script>';
 
 $social_right_content = null;
+$whoisonline_list = null;
 
-if (isset($_GET['chatid'])) {
+/* if (isset($_GET['chatid'])) {
     //send out call request
     $time = time();
     $time = date("Y-m-d H:i:s", $time);
@@ -102,7 +43,7 @@ if (isset($_GET['chatid'])) {
         exit;
     }
 }
-
+*/
 // 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'])
@@ -113,7 +54,7 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
     } else {
         $user_list = who_is_online(0, 9);
     }
-    if (!isset($_GET['id'])) {
+    /* if (!isset($_GET['id'])) {
         if (api_get_setting('allow_social_tool') == 'true') {
             if (!api_is_anonymous()) {
                 //this include the social menu div
@@ -121,19 +62,22 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
             }
         }
     }
-
+*/
     if ($user_list) {
         if (!isset($_GET['id'])) {
             if (api_get_setting('allow_social_tool') == 'true') {
                 if (!api_is_anonymous()) {
                     $query = isset($_GET['q']) ? $_GET['q']: null;
-                    $social_right_content .= UserManager::get_search_form($query);
+                    $social_search .= UserManager::get_search_form($query);
                 }
             }
-            $social_right_content .= SocialManager::display_user_list($user_list);
+            //$social_right_content .= SocialManager::display_user_list($user_list);
         }
     }
 
+    $whoisonline_list .= SocialManager::display_user_list($user_list);
+
+
     if (isset($_GET['id'])) {
         if (api_get_setting('allow_social_tool') == 'true' && api_user_is_login()) {
             header("Location: ".api_get_path(WEB_CODE_PATH)."social/profile.php?u=".intval($_GET['id']));
@@ -150,9 +94,9 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
 $tpl = new Template(get_lang('UsersOnLineList'));
 
 if (api_get_setting('allow_social_tool') == 'true' && !api_is_anonymous()) {
-    $tpl->assign('social_avatar_block', $social_left_content);
-    $tpl->assign('social_search_block', $social_right_content);
-    $social_layout = $tpl->get_template('social/home.tpl');
+    $tpl->assign('whoisonline', $whoisonline_list);
+    $tpl->assign('social_search', $social_search);
+    $social_layout = $tpl->get_template('social/whoisonline.tpl');
     $tpl->display($social_layout);
 } else {
     $content = $social_right_content;