Admin can see all sesions. Fix PHP warnings.

1.10.x
Julio Montoya 11 years ago
parent 7f28bbe78e
commit 5ed5df6a70
  1. 2
      main/inc/ajax/course_home.ajax.php
  2. 8
      main/session/index.php

@ -176,6 +176,7 @@ switch ($action) {
$label = get_lang('LearnpathUpdated'); $label = get_lang('LearnpathUpdated');
} }
$icons = '';
if (strtotime($last_date) < strtotime($lp_date)) { if (strtotime($last_date) < strtotime($lp_date)) {
$icons = Display::return_icon($image, get_lang('TitleNotification').': '.$label.' - '.$lp_date); $icons = Display::return_icon($image, get_lang('TitleNotification').': '.$label.' - '.$lp_date);
} }
@ -434,6 +435,7 @@ switch ($action) {
$image = 'moderator_star.png'; $image = 'moderator_star.png';
$label = get_lang('LearnpathUpdated'); $label = get_lang('LearnpathUpdated');
} }
$icons = '';
if (strtotime($last_date) < strtotime($lp_date)) { if (strtotime($last_date) < strtotime($lp_date)) {
$icons = Display::return_icon($image, get_lang('TitleNotification').': '.$label.' - '.$lp_date); $icons = Display::return_icon($image, get_lang('TitleNotification').': '.$label.' - '.$lp_date);
} }

@ -131,7 +131,12 @@ $new_course_list = array();
if (!empty($course_list)) { if (!empty($course_list)) {
foreach ($course_list as $course_data) { foreach ($course_list as $course_data) {
if (in_array($course_data['code'], $user_course_list) || api_is_anonymous()) { if (!api_is_platform_admin()) {
if (in_array(
$course_data['code'],
$user_course_list
) || api_is_anonymous()
) {
$course_data['title'] = Display::url( $course_data['title'] = Display::url(
$course_data['title'], $course_data['title'],
api_get_course_url($course_data['code'], $session_id) api_get_course_url($course_data['code'], $session_id)
@ -139,6 +144,7 @@ if (!empty($course_list)) {
} else { } else {
continue; continue;
} }
}
$list = new LearnpathList( $list = new LearnpathList(
api_get_user_id(), api_get_user_id(),

Loading…
Cancel
Save