From 3ffaf8c02345430871f2f15a3b9bed5eabcbd38d Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Sat, 26 Mar 2011 18:30:24 +0100 Subject: [PATCH] Fixing classes.php due the last changed --- main/user/classes.php | 6 +++--- user_portal.php | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/main/user/classes.php b/main/user/classes.php index a7ac9135d1..a237a28d4b 100644 --- a/main/user/classes.php +++ b/main/user/classes.php @@ -5,9 +5,9 @@ * @author Julio Montoya */ -$language_file = array('userInfo'); +$language_file = array('userInfo','admin'); $cidReset=true; -require_once './main/inc/global.inc.php'; +require_once '../inc/global.inc.php'; require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php'; @@ -38,7 +38,7 @@ if (!empty($usergroup_list)) { } } else { if (api_is_platform_admin()) { - Display::display_normal_message(Display::url(get_lang('CreateAClass') ,api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add'), false); + Display::display_normal_message(Display::url(get_lang('AddClasses') ,api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add'), false); } } diff --git a/user_portal.php b/user_portal.php index dfc64c5174..03fec388f7 100755 --- a/user_portal.php +++ b/user_portal.php @@ -648,23 +648,21 @@ if (api_get_setting('search_enabled') == 'true') { echo show_right_block(get_lang('Search'), $search_content); } -if (api_get_setting('show_groups_to_users') == 'true') { - +if (api_get_setting('show_groups_to_users') == 'true') { require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php'; $usergroup = new Usergroup(); $usergroup_list = $usergroup->get_usergroup_by_user(api_get_user_id()); $classes = ''; - if (!empty($usergroup_list)) { + if (!empty($usergroup_list)) { foreach($usergroup_list as $group_id) { $data = $usergroup->get($group_id); - $data['name'] = Display::url($data['name'], api_get_path(WEB_PATH).'classes.php?id='.$data['id']); + $data['name'] = Display::url($data['name'], api_get_path(WEB_CODE_PATH).'user/classes.php?id='.$data['id']); $classes .= Display::tag('li', $data['name']); - } - } + } + } if (api_is_platform_admin()) { $classes .= Display::tag('li', Display::url(get_lang('AddClasses') ,api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add')); - } - + } if (!empty($classes)) { $classes = Display::tag('ul', $classes, array('class'=>'menulist')); echo show_right_block(get_lang('Classes'), $classes);