diff --git a/main/css/base.css b/main/css/base.css index 120da8c554..88c2f044bf 100644 --- a/main/css/base.css +++ b/main/css/base.css @@ -4230,6 +4230,17 @@ a:active{ margin-right: 4px; } +.offline_user_in_text { + background: url("offline.png") no-repeat scroll right center transparent; + float: left; + height: 16px; + left: 0; + width: 17px; + display:block; + margin-right: 4px; +} + + .hide_menu{ display:none; diff --git a/main/inc/ajax/model.ajax.php b/main/inc/ajax/model.ajax.php index c781cccd8d..83eeff7221 100644 --- a/main/inc/ajax/model.ajax.php +++ b/main/inc/ajax/model.ajax.php @@ -267,8 +267,8 @@ switch ($action) { //var_dump($result); //5. Creating an obj to return a json -if (in_array($action, array('get_careers','get_promotions','get_usergroups','get_gradebooks', 'get_sessions','get_exercise_results'))) { - $response = new stdClass(); +if (in_array($action, array('get_careers', 'get_promotions', 'get_usergroups', 'get_gradebooks', 'get_sessions', 'get_exercise_results'))) { + $response = new stdClass(); $response->page = $page; $response->total = $total_pages; $response->records = $count; diff --git a/main/inc/ajax/online.ajax.php b/main/inc/ajax/online.ajax.php index 026e345a72..b212e0607b 100644 --- a/main/inc/ajax/online.ajax.php +++ b/main/inc/ajax/online.ajax.php @@ -11,20 +11,24 @@ $action = $_GET['a']; switch($action) { case 'load_online_user': $page = intval($_REQUEST['online_page_nr']); - if (isset($_GET['cidReq']) && strlen($_GET['cidReq']) > 0) { - $user_list = who_is_online_in_this_course(api_get_user_id(), api_get_setting('time_limit_whosonline'), $_GET['cidReq']); - } else { - $user_list = who_is_online(api_get_setting('time_limit_whosonline')); - } - if ($page == 2) { - $_SESSION['online_user_items'] = array(); - } - $max_page = round(count($user_list)/10); - if (!in_array($page, $_SESSION['online_user_items']) && $page <= $max_page) { - $_SESSION['online_user_items'][] = $page; - echo SocialManager::display_user_list($user_list); - } else { - echo 'end'; + + $max_page = round(who_is_online_count()/10); + + if (!in_array($page, $_SESSION['online_user_items']) && $page <= $max_page) { + if (isset($_GET['cidReq']) && strlen($_GET['cidReq']) > 0) { + $user_list = who_is_online_in_this_course(api_get_user_id(), api_get_setting('time_limit_whosonline'), $_GET['cidReq']); + } else { + $page_rows = $page*10; + $user_list = who_is_online($page_rows, $page_rows + 10); + } + if ($page == 1) { + $_SESSION['online_user_items'] = array(); + } + + $_SESSION['online_user_items'][] = $page; + if (!empty($user_list)) { + echo SocialManager::display_user_list($user_list); + } } break; default: diff --git a/main/inc/lib/group_portal_manager.lib.php b/main/inc/lib/group_portal_manager.lib.php index d4d9281554..975d093965 100644 --- a/main/inc/lib/group_portal_manager.lib.php +++ b/main/inc/lib/group_portal_manager.lib.php @@ -1025,8 +1025,8 @@ class GroupPortalManager { * */ public static function show_group_column_information($group_id, $user_id, $show = '') { - global $relation_group_title, $my_group_role; + $html = ''; $group_info = GroupPortalManager::get_group_data($group_id); $picture = GroupPortalManager::get_picture_group($group_id, $group_info['picture_uri'],160,GROUP_IMAGE_SIZE_MEDIUM); @@ -1039,7 +1039,7 @@ class GroupPortalManager { $my_group_role = self::get_user_group_role($user_id, $group_id); //@todo this must be move to default.css for dev use only - echo '