From a08dcbc6c9872fd2e8e8450123833c711dde8479 Mon Sep 17 00:00:00 2001 From: Yoselyn Castillo Date: Sun, 2 Jun 2013 21:18:04 -0400 Subject: [PATCH 1/2] showing import users icon for session admin if add_users_by_coach is true --- main/mySpace/index.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/main/mySpace/index.php b/main/mySpace/index.php index 5f782bb2f5..0659ffc2d0 100644 --- a/main/mySpace/index.php +++ b/main/mySpace/index.php @@ -151,6 +151,7 @@ if ($is_drh) { echo '
'; + echo ''; if ($display == 'useroverview' || $display == 'sessionoverview' || $display == 'courseoverview') { @@ -163,6 +164,18 @@ echo ''; if (!empty($session_id)) { echo ''.Display::return_icon('back.png', get_lang('Back'),'',ICON_SIZE_MEDIUM).''; + if (api_get_setting('add_users_by_coach') == 'true') { + if (!api_is_platform_admin()) { + if (!$is_coach) { + api_not_allowed(true); + } else { + echo "
"; + echo ''.Display::return_icon('excel.gif', get_lang('ImportUserList')).' '.get_lang('ImportUserList').''; + echo "

"; + } + } + } + } else { echo Display::url(Display::return_icon('stats.png', get_lang('MyStats'),'',ICON_SIZE_MEDIUM),api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ); } From 9668c9ec1e4f199b7b8f68b26ef17d383aabe08c Mon Sep 17 00:00:00 2001 From: Yoselyn Castillo Date: Sun, 2 Jun 2013 21:30:02 -0400 Subject: [PATCH 2/2] showing import users icon for session and platform admin if add_users_by_coach is true -refs #6141 --- main/mySpace/index.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/main/mySpace/index.php b/main/mySpace/index.php index 0659ffc2d0..58ad065167 100644 --- a/main/mySpace/index.php +++ b/main/mySpace/index.php @@ -164,18 +164,20 @@ echo ''; if (!empty($session_id)) { echo ''.Display::return_icon('back.png', get_lang('Back'),'',ICON_SIZE_MEDIUM).''; - if (api_get_setting('add_users_by_coach') == 'true') { - if (!api_is_platform_admin()) { - if (!$is_coach) { - api_not_allowed(true); - } else { - echo "
"; - echo ''.Display::return_icon('excel.gif', get_lang('ImportUserList')).' '.get_lang('ImportUserList').''; - echo "

"; - } + if (!api_is_platform_admin()) { + if (api_get_setting('add_users_by_coach') == 'true') { + if ($is_coach) { + echo "
"; + echo ''.Display::return_icon('excel.gif', get_lang('ImportUserList')).' '.get_lang('ImportUserList').''; + echo "

"; + } } + + } else { + echo "
"; + echo ''.Display::return_icon('excel.gif', get_lang('ImportUserList')).' '.get_lang('ImportUserList').''; + echo "

"; } - } else { echo Display::url(Display::return_icon('stats.png', get_lang('MyStats'),'',ICON_SIZE_MEDIUM),api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ); }