Fixing whoisonline due recent changes in templates

skala
Julio Montoya 12 years ago
parent a19561bfd1
commit 4bc0525d3e
  1. 12
      whoisonline.php
  2. 30
      whoisonlinesession.php

@ -154,17 +154,13 @@ 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->set_help('Groups');
$tpl->assign('social_left_content', $social_left_content);
//$tpl->assign('social_left_menu', $social_left_menu);
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template('layout/social_layout.tpl');
$content = $tpl->fetch($social_layout);
$tpl->display($social_layout);
} else {
$content = $social_right_content;
}
$tpl->assign('actions', $actions);
$tpl->assign('message', $show_message);
$tpl->assign('header', get_lang('UsersOnLineList'));
$tpl->assign('content', $content);
$tpl->assign('content', $social_right_content);
$tpl->display_one_col_template();
}

@ -1,5 +1,5 @@
<?php
/* For licensing terms, see /dokeos_license.txt */
/* For licensing terms, see /license.txt */
/**
* Shows who is online in a specific session
* @package chamilo.main
@ -50,35 +50,7 @@ echo Display::page_header(get_lang('UserOnlineListSession'));
<?php
$session_is_coach = array();
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());
$students_online = array();
$now = api_get_utc_datetime();

Loading…
Cancel
Save