|
|
@ -1,5 +1,5 @@ |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
/* For licensing terms, see /dokeos_license.txt */ |
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Shows who is online in a specific session |
|
|
|
* Shows who is online in a specific session |
|
|
|
* @package chamilo.main |
|
|
|
* @package chamilo.main |
|
|
@ -50,35 +50,7 @@ echo Display::page_header(get_lang('UserOnlineListSession')); |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
$session_is_coach = array(); |
|
|
|
$session_is_coach = array(); |
|
|
|
if (isset($_user['user_id']) && $_user['user_id'] != '') { |
|
|
|
if (isset($_user['user_id']) && $_user['user_id'] != '') { |
|
|
|
|
|
|
|
|
|
|
|
/*$_user['user_id'] = intval($_user['user_id']); |
|
|
|
|
|
|
|
$result = Database::query("SELECT DISTINCT id, |
|
|
|
|
|
|
|
name, |
|
|
|
|
|
|
|
date_start, |
|
|
|
|
|
|
|
date_end |
|
|
|
|
|
|
|
FROM $tbl_session as session |
|
|
|
|
|
|
|
INNER JOIN $tbl_session_course_user as srcru |
|
|
|
|
|
|
|
ON srcru.id_user = ".$_user['user_id']." AND srcru.status=2 |
|
|
|
|
|
|
|
AND session.id = srcru.id_session |
|
|
|
|
|
|
|
ORDER BY date_start, date_end, name"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while ($session = Database:: fetch_array($result)) { |
|
|
|
|
|
|
|
$session_is_coach[$session['id']] = $session; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$result = Database::query("SELECT DISTINCT id, |
|
|
|
|
|
|
|
name, |
|
|
|
|
|
|
|
date_start, |
|
|
|
|
|
|
|
date_end |
|
|
|
|
|
|
|
FROM $tbl_session as session |
|
|
|
|
|
|
|
WHERE session.id_coach = ".$_user['user_id']." |
|
|
|
|
|
|
|
ORDER BY date_start, date_end, name"); |
|
|
|
|
|
|
|
while ($session = Database:: fetch_array($result)) { |
|
|
|
|
|
|
|
$session_is_coach[$session['id']] = $session; |
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$session_is_coach = SessionManager::get_sessions_coached_by_user(api_get_user_id()); |
|
|
|
$session_is_coach = SessionManager::get_sessions_coached_by_user(api_get_user_id()); |
|
|
|
|
|
|
|
|
|
|
|
$students_online = array(); |
|
|
|
$students_online = array(); |
|
|
|
$now = api_get_utc_datetime(); |
|
|
|
$now = api_get_utc_datetime(); |
|
|
|
|
|
|
|
|
|
|
|