|
|
@ -560,9 +560,6 @@ if (isset($origin) && $origin == 'learnpath') { |
|
|
|
Display::display_header($tool_name, "User"); |
|
|
|
Display::display_header($tool_name, "User"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Setting the permissions for this page */ |
|
|
|
|
|
|
|
$is_allowed_to_track = ($is_courseAdmin || $is_courseTutor) || api_is_platform_admin(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Tool introduction |
|
|
|
// Tool introduction |
|
|
|
Display::display_introduction_section(TOOL_USER, 'left'); |
|
|
|
Display::display_introduction_section(TOOL_USER, 'left'); |
|
|
|
$actions = ''; |
|
|
|
$actions = ''; |
|
|
@ -972,7 +969,9 @@ function active_filter($active, $urlParams, $row) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function modify_filter($user_id, $row, $data) |
|
|
|
function modify_filter($user_id, $row, $data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
global $is_allowed_to_track, $charset; |
|
|
|
global $charset; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$is_allowed_to_track = api_is_allowed_to_edit(true, true); |
|
|
|
|
|
|
|
|
|
|
|
$user_id = $data[0]; |
|
|
|
$user_id = $data[0]; |
|
|
|
$userInfo = api_get_user_info($user_id); |
|
|
|
$userInfo = api_get_user_info($user_id); |
|
|
@ -1020,14 +1019,13 @@ function modify_filter($user_id, $row, $data) |
|
|
|
).' '; |
|
|
|
).' '; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// edit |
|
|
|
// edit |
|
|
|
if (api_get_setting('allow_user_course_subscription_by_course_admin') === 'true' or api_is_platform_admin()) { |
|
|
|
if (api_get_setting('allow_user_course_subscription_by_course_admin') === 'true' or api_is_platform_admin()) { |
|
|
|
// unregister |
|
|
|
// unregister |
|
|
|
if ($user_id != $current_user_id || api_is_platform_admin()) { |
|
|
|
if ($user_id != $current_user_id || api_is_platform_admin()) { |
|
|
|
$result .= '<a class="btn btn-small btn-danger" href="'.api_get_self().'?'.api_get_cidreq().'&type='.$type.'&unregister=yes&user_id='.$user_id.'" title="'.get_lang('Unreg').' " onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;">'. |
|
|
|
$result .= '<a class="btn btn-small btn-danger" href="'.api_get_self().'?'.api_get_cidreq().'&type='.$type.'&unregister=yes&user_id='.$user_id.'" title="'.get_lang('Unreg').' " onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;">'. |
|
|
|
get_lang('Unreg').'</a> '; |
|
|
|
get_lang('Unreg').'</a> '; |
|
|
|
} else { |
|
|
|
|
|
|
|
//$result .= Display::return_icon('unsubscribe_course_na.png', get_lang('Unreg'),'',ICON_SIZE_SMALL).'</a> '; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -1039,5 +1037,6 @@ function modify_filter($user_id, $row, $data) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $result; |
|
|
|
return $result; |
|
|
|
} |
|
|
|
} |
|
|
|