change to $statusname[] of 6 to 7 see #369

skala
Carlos Vargas 16 years ago
parent bdfee721fa
commit 3fb46b12b7
  1. 6
      main/admin/user_list.php

@ -450,7 +450,7 @@ function modify_filter($user_id,$url_params,$row)
$is_admin = in_array($user_id,$_admins_list); $is_admin = in_array($user_id,$_admins_list);
$statusname = api_get_status_langvars(); $statusname = api_get_status_langvars();
$user_is_anonymous = false; $user_is_anonymous = false;
if ($row['6'] == $statusname[ANONYMOUS]) { if ($row['7'] == $statusname[ANONYMOUS]) {
$user_is_anonymous =true; $user_is_anonymous =true;
} }
if (!$user_is_anonymous) { if (!$user_is_anonymous) {
@ -471,7 +471,7 @@ function modify_filter($user_id,$url_params,$row)
} }
//only allow platform admins to login_as, or session admins only for students (not teachers nor other admins) //only allow platform admins to login_as, or session admins only for students (not teachers nor other admins)
if (api_is_platform_admin() || (api_is_session_admin() && $row['6'] == $statusname[STUDENT])) { if (api_is_platform_admin() || (api_is_session_admin() && $row['7'] == $statusname[STUDENT])) {
if (!$user_is_anonymous) { if (!$user_is_anonymous) {
$result .= '<a href="user_list.php?action=login_as&amp;user_id='.$user_id.'&amp;sec_token='.$_SESSION['sec_token'].'">'.Display::return_icon('login_as.gif', get_lang('LoginAs')).'</a>&nbsp;&nbsp;'; $result .= '<a href="user_list.php?action=login_as&amp;user_id='.$user_id.'&amp;sec_token='.$_SESSION['sec_token'].'">'.Display::return_icon('login_as.gif', get_lang('LoginAs')).'</a>&nbsp;&nbsp;';
} else { } else {
@ -480,7 +480,7 @@ function modify_filter($user_id,$url_params,$row)
} else { } else {
$result .= Display::return_icon('login_as_na.gif', get_lang('LoginAs')).'&nbsp;&nbsp;'; $result .= Display::return_icon('login_as_na.gif', get_lang('LoginAs')).'&nbsp;&nbsp;';
} }
if ($row['6'] != $statusname[STUDENT]) { if ($row['7'] != $statusname[STUDENT]) {
$result .= Display::return_icon('statistics_na.gif', get_lang('Reporting')).'&nbsp;&nbsp;'; $result .= Display::return_icon('statistics_na.gif', get_lang('Reporting')).'&nbsp;&nbsp;';
} else { } else {
$result .= '<a href="../mySpace/myStudents.php?student='.$user_id.'">'.Display::return_icon('statistics.gif', get_lang('Reporting')).'</a>&nbsp;&nbsp;'; $result .= '<a href="../mySpace/myStudents.php?student='.$user_id.'">'.Display::return_icon('statistics.gif', get_lang('Reporting')).'</a>&nbsp;&nbsp;';

Loading…
Cancel
Save