|
|
|
@ -60,12 +60,13 @@ if (!empty($hook)) { |
|
|
|
|
/* Users */ |
|
|
|
|
$blocks['users']['icon'] = Display::return_icon( |
|
|
|
|
'members.png', |
|
|
|
|
get_lang('Users'), |
|
|
|
|
get_lang('User management'), |
|
|
|
|
[], |
|
|
|
|
ICON_SIZE_MEDIUM, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['users']['label'] = api_ucfirst(get_lang('Users')); |
|
|
|
|
$blocks['users']['description'] = get_lang('Here you can manage registered users within your platform'); |
|
|
|
|
$blocks['users']['label'] = api_ucfirst(get_lang('User management')); |
|
|
|
|
$blocks['users']['class'] = 'block-admin-users'; |
|
|
|
|
|
|
|
|
|
$search_form = ' |
|
|
|
@ -95,6 +96,9 @@ if (api_is_platform_admin()) { |
|
|
|
|
} |
|
|
|
|
$items[] = ['url' => 'extra_fields.php?type=user', 'label' => get_lang('ManageUserFields')]; |
|
|
|
|
$items[] = ['url' => 'usergroups.php', 'label' => get_lang('Classes')]; |
|
|
|
|
if (!api_get_configuration_value('disable_gdpr')) { |
|
|
|
|
$items[] = ['url' => 'user_list_consent.php', 'label' => get_lang('Users in consents list')]; |
|
|
|
|
} |
|
|
|
|
if (api_get_configuration_value('show_link_request_hrm_user')) { |
|
|
|
|
$items[] = ['url' => 'user_linking_requests.php', 'label' => get_lang('UserLinkingRequests')]; |
|
|
|
|
} |
|
|
|
@ -106,6 +110,7 @@ if (api_is_platform_admin()) { |
|
|
|
|
['url' => 'usergroups.php', 'label' => get_lang('Classes')], |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (api_is_session_admin()) { |
|
|
|
|
if ('true' === api_get_setting('limit_session_admin_role')) { |
|
|
|
|
$items = array_filter($items, function (array $item) { |
|
|
|
@ -132,12 +137,13 @@ if (api_is_platform_admin()) { |
|
|
|
|
/* Courses */ |
|
|
|
|
$blocks['courses']['icon'] = Display::return_icon( |
|
|
|
|
'course.png', |
|
|
|
|
get_lang('Courses'), |
|
|
|
|
get_lang('Course management'), |
|
|
|
|
[], |
|
|
|
|
ICON_SIZE_MEDIUM, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['courses']['label'] = api_ucfirst(get_lang('Courses')); |
|
|
|
|
$blocks['courses']['label'] = api_ucfirst(get_lang('Course management')); |
|
|
|
|
$blocks['courses']['description'] = get_lang('Create and manage your courses in a simple way'); |
|
|
|
|
$blocks['courses']['class'] = 'block-admin-courses'; |
|
|
|
|
$blocks['courses']['editable'] = true; |
|
|
|
|
$search_form = ' <form method="get" class="form-inline" action="course_list.php"> |
|
|
|
@ -176,11 +182,140 @@ if (api_is_platform_admin()) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$items[] = ['url' => 'extra_fields.php?type=course', 'label' => get_lang('ManageCourseFields')]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => api_get_path(WEB_CODE_PATH) . 'admin/teacher_time_report.php', |
|
|
|
|
'label' => get_lang('TeacherTimeReport'), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
$blocks['courses']['items'] = $items; |
|
|
|
|
$blocks['courses']['extra'] = null; |
|
|
|
|
|
|
|
|
|
/* Sessions */ |
|
|
|
|
$blocks['sessions']['icon'] = Display::return_icon( |
|
|
|
|
'session.png', |
|
|
|
|
get_lang('Sessions management'), |
|
|
|
|
[], |
|
|
|
|
ICON_SIZE_MEDIUM, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['sessions']['label'] = api_ucfirst(get_lang('Sessions management')); |
|
|
|
|
$blocks['sessions']['description'] = get_lang('Create course packages for a certain time with training sessions.'); |
|
|
|
|
$blocks['sessions']['class'] = 'block-admin-sessions'; |
|
|
|
|
|
|
|
|
|
if (api_is_platform_admin()) { |
|
|
|
|
$blocks['sessions']['editable'] = true; |
|
|
|
|
} |
|
|
|
|
$sessionPath = api_get_path(WEB_CODE_PATH) . 'session/'; |
|
|
|
|
|
|
|
|
|
$search_form = ' <form method="GET" class="form-inline" action="' . $sessionPath . 'session_list.php"> |
|
|
|
|
<div class="form-group mb-2"> |
|
|
|
|
<input class="form-control" |
|
|
|
|
type="text" |
|
|
|
|
name="keyword" |
|
|
|
|
value="" |
|
|
|
|
aria-label="' . get_lang('Search') . '"> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<button class="btn btn-primary mb-2" type="submit"> |
|
|
|
|
<em class="fa fa-search"></em> ' . get_lang('Search') . ' |
|
|
|
|
</button> |
|
|
|
|
</form>'; |
|
|
|
|
$blocks['sessions']['search_form'] = $search_form; |
|
|
|
|
$items = []; |
|
|
|
|
$items[] = ['url' => $sessionPath . 'session_list.php', 'label' => get_lang('ListSession')]; |
|
|
|
|
$items[] = ['url' => $sessionPath . 'session_add.php', 'label' => get_lang('AddSession')]; |
|
|
|
|
$items[] = ['url' => $sessionPath . 'session_category_list.php', 'label' => get_lang('ListSessionCategory')]; |
|
|
|
|
$items[] = ['url' => $sessionPath . 'session_import.php', 'label' => get_lang('ImportSessionListXMLCSV')]; |
|
|
|
|
$items[] = ['url' => $sessionPath . 'session_import_drh.php', 'label' => get_lang('ImportSessionDrhList')]; |
|
|
|
|
if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) { |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'ldap_import_students_to_session.php', |
|
|
|
|
'label' => get_lang('ImportLDAPUsersIntoSession'), |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => $sessionPath . 'session_export.php', |
|
|
|
|
'label' => get_lang('ExportSessionListXMLCSV'), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
if (api_is_global_platform_admin()) { |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => '../coursecopy/copy_course_session.php', |
|
|
|
|
'label' => get_lang('CopyFromCourseInSessionToAnotherSession'), |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$allowCareer = api_get_configuration_value('allow_session_admin_read_careers'); |
|
|
|
|
|
|
|
|
|
if (api_is_platform_admin() || ($allowCareer && api_is_session_admin())) { |
|
|
|
|
// option only visible in development mode. Enable through code if required |
|
|
|
|
if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) { |
|
|
|
|
$items[] = ['url' => 'user_move_stats.php', 'label' => get_lang('MoveUserStats')]; |
|
|
|
|
} |
|
|
|
|
$items[] = ['url' => 'career_dashboard.php', 'label' => get_lang('CareersAndPromotions')]; |
|
|
|
|
$items[] = ['url' => 'extra_fields.php?type=session', 'label' => get_lang('ManageSessionFields')]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$blocks['sessions']['items'] = $items; |
|
|
|
|
$blocks['sessions']['extra'] = null; |
|
|
|
|
|
|
|
|
|
// Skills |
|
|
|
|
if (Skill::isToolAvailable()) { |
|
|
|
|
$blocks['skills']['icon'] = Display::return_icon( |
|
|
|
|
'skill-badges.png', |
|
|
|
|
get_lang('Skills'), |
|
|
|
|
[], |
|
|
|
|
ICON_SIZE_MEDIUM, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['skills']['label'] = get_lang('Skills and gradebook'); |
|
|
|
|
$blocks['skills']['description'] = get_lang('Manage the skills of your users, through courses and badges'); |
|
|
|
|
$blocks['skills']['class'] = 'block-admin-skills'; |
|
|
|
|
|
|
|
|
|
$items = []; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skills_wheel.php', |
|
|
|
|
'label' => get_lang('SkillsWheel'), |
|
|
|
|
]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skills_import.php', |
|
|
|
|
'label' => get_lang('SkillsImport'), |
|
|
|
|
]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skill_list.php', |
|
|
|
|
'label' => get_lang('ManageSkills'), |
|
|
|
|
]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skill.php', |
|
|
|
|
'label' => get_lang('ManageSkillsLevels'), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php', |
|
|
|
|
'label' => get_lang('SkillsRanking'), |
|
|
|
|
]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skills_gradebook.php', |
|
|
|
|
'label' => get_lang('SkillsAndGradebooks'), |
|
|
|
|
]; |
|
|
|
|
/*$items[] = array( |
|
|
|
|
'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php', |
|
|
|
|
'label' => get_lang('Badges') |
|
|
|
|
);*/ |
|
|
|
|
$allow = api_get_configuration_value('gradebook_dependency'); |
|
|
|
|
if (!$allow) { |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'gradebook_list.php', |
|
|
|
|
'label' => get_lang('List of qualifications'), |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
$blocks['skills']['items'] = $items; |
|
|
|
|
$blocks['skills']['extra'] = null; |
|
|
|
|
$blocks['skills']['search_form'] = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Platform */ |
|
|
|
|
|
|
|
|
|
$blocks['platform']['icon'] = Display::return_icon( |
|
|
|
|
'platform.png', |
|
|
|
|
get_lang('Platform'), |
|
|
|
@ -189,6 +324,7 @@ if (api_is_platform_admin()) { |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['platform']['label'] = api_ucfirst(get_lang('Platform')); |
|
|
|
|
$blocks['platform']['description'] = get_lang('Configure your platform, view reports, publish and send announcements globally'); |
|
|
|
|
$blocks['platform']['class'] = 'block-admin-platform'; |
|
|
|
|
$blocks['platform']['editable'] = true; |
|
|
|
|
$search_form = ' <form method="get" action="' . api_get_path(WEB_PUBLIC_PATH) . 'admin/settings/search_settings' . '" class="form-inline"> |
|
|
|
@ -224,10 +360,6 @@ if (api_is_platform_admin()) { |
|
|
|
|
'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/company_reports.php', |
|
|
|
|
'label' => get_lang('Reports'), |
|
|
|
|
]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => api_get_path(WEB_CODE_PATH).'admin/teacher_time_report.php', |
|
|
|
|
'label' => get_lang('TeacherTimeReport'), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
if (api_get_configuration_value('chamilo_cms')) { |
|
|
|
|
$items[] = [ |
|
|
|
@ -261,74 +393,6 @@ if (api_is_platform_admin()) { |
|
|
|
|
$blocks['platform']['extra'] = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Sessions */ |
|
|
|
|
$blocks['sessions']['icon'] = Display::return_icon( |
|
|
|
|
'session.png', |
|
|
|
|
get_lang('Sessions'), |
|
|
|
|
[], |
|
|
|
|
ICON_SIZE_MEDIUM, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['sessions']['label'] = api_ucfirst(get_lang('Sessions')); |
|
|
|
|
$blocks['sessions']['class'] = 'block-admin-sessions'; |
|
|
|
|
|
|
|
|
|
if (api_is_platform_admin()) { |
|
|
|
|
$blocks['sessions']['editable'] = true; |
|
|
|
|
} |
|
|
|
|
$sessionPath = api_get_path(WEB_CODE_PATH).'session/'; |
|
|
|
|
|
|
|
|
|
$search_form = ' <form method="GET" class="form-inline" action="'.$sessionPath.'session_list.php"> |
|
|
|
|
<div class="form-group mb-2"> |
|
|
|
|
<input class="form-control" |
|
|
|
|
type="text" |
|
|
|
|
name="keyword" |
|
|
|
|
value="" |
|
|
|
|
aria-label="'.get_lang('Search').'"> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<button class="btn btn-primary mb-2" type="submit"> |
|
|
|
|
<em class="fa fa-search"></em> '.get_lang('Search').' |
|
|
|
|
</button> |
|
|
|
|
</form>'; |
|
|
|
|
$blocks['sessions']['search_form'] = $search_form; |
|
|
|
|
$items = []; |
|
|
|
|
$items[] = ['url' => $sessionPath.'session_list.php', 'label' => get_lang('ListSession')]; |
|
|
|
|
$items[] = ['url' => $sessionPath.'session_add.php', 'label' => get_lang('AddSession')]; |
|
|
|
|
$items[] = ['url' => $sessionPath.'session_category_list.php', 'label' => get_lang('ListSessionCategory')]; |
|
|
|
|
$items[] = ['url' => $sessionPath.'session_import.php', 'label' => get_lang('ImportSessionListXMLCSV')]; |
|
|
|
|
$items[] = ['url' => $sessionPath.'session_import_drh.php', 'label' => get_lang('ImportSessionDrhList')]; |
|
|
|
|
if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) { |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'ldap_import_students_to_session.php', |
|
|
|
|
'label' => get_lang('ImportLDAPUsersIntoSession'), |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => $sessionPath.'session_export.php', |
|
|
|
|
'label' => get_lang('ExportSessionListXMLCSV'), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
if (api_is_global_platform_admin()) { |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => '../coursecopy/copy_course_session.php', |
|
|
|
|
'label' => get_lang('CopyFromCourseInSessionToAnotherSession'), |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$allowCareer = api_get_configuration_value('allow_session_admin_read_careers'); |
|
|
|
|
|
|
|
|
|
if (api_is_platform_admin() || ($allowCareer && api_is_session_admin())) { |
|
|
|
|
// option only visible in development mode. Enable through code if required |
|
|
|
|
if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) { |
|
|
|
|
$items[] = ['url' => 'user_move_stats.php', 'label' => get_lang('MoveUserStats')]; |
|
|
|
|
} |
|
|
|
|
$items[] = ['url' => 'career_dashboard.php', 'label' => get_lang('CareersAndPromotions')]; |
|
|
|
|
$items[] = ['url' => 'extra_fields.php?type=session', 'label' => get_lang('ManageSessionFields')]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$blocks['sessions']['items'] = $items; |
|
|
|
|
$blocks['sessions']['extra'] = null; |
|
|
|
|
|
|
|
|
|
/* Settings */ |
|
|
|
|
if (api_is_platform_admin()) { |
|
|
|
|
$blocks['settings']['icon'] = Display::return_icon( |
|
|
|
@ -339,6 +403,7 @@ if (api_is_platform_admin()) { |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['settings']['label'] = api_ucfirst(get_lang('System')); |
|
|
|
|
$blocks['settings']['description'] = get_lang('View the status of your server, perform performance tests'); |
|
|
|
|
$blocks['settings']['class'] = 'block-admin-settings'; |
|
|
|
|
|
|
|
|
|
$items = []; |
|
|
|
@ -395,74 +460,6 @@ if (api_is_platform_admin()) { |
|
|
|
|
$blocks['settings']['extra'] = null; |
|
|
|
|
$blocks['settings']['search_form'] = null; |
|
|
|
|
|
|
|
|
|
// Skills |
|
|
|
|
if (Skill::isToolAvailable()) { |
|
|
|
|
$blocks['skills']['icon'] = Display::return_icon( |
|
|
|
|
'skill-badges.png', |
|
|
|
|
get_lang('Skills'), |
|
|
|
|
[], |
|
|
|
|
ICON_SIZE_MEDIUM, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['skills']['label'] = get_lang('Skills'); |
|
|
|
|
$blocks['skills']['class'] = 'block-admin-skills'; |
|
|
|
|
|
|
|
|
|
$items = []; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skills_wheel.php', |
|
|
|
|
'label' => get_lang('SkillsWheel'), |
|
|
|
|
]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skills_import.php', |
|
|
|
|
'label' => get_lang('SkillsImport'), |
|
|
|
|
]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skill_list.php', |
|
|
|
|
'label' => get_lang('ManageSkills'), |
|
|
|
|
]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skill.php', |
|
|
|
|
'label' => get_lang('ManageSkillsLevels'), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => api_get_path(WEB_CODE_PATH).'social/skills_ranking.php', |
|
|
|
|
'label' => get_lang('SkillsRanking'), |
|
|
|
|
]; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'skills_gradebook.php', |
|
|
|
|
'label' => get_lang('SkillsAndGradebooks'), |
|
|
|
|
]; |
|
|
|
|
/*$items[] = array( |
|
|
|
|
'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php', |
|
|
|
|
'label' => get_lang('Badges') |
|
|
|
|
);*/ |
|
|
|
|
$blocks['skills']['items'] = $items; |
|
|
|
|
$blocks['skills']['extra'] = null; |
|
|
|
|
$blocks['skills']['search_form'] = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$allow = api_get_configuration_value('gradebook_dependency'); |
|
|
|
|
if ($allow) { |
|
|
|
|
$blocks['gradebook']['icon'] = Display::return_icon( |
|
|
|
|
'gradebook.png', |
|
|
|
|
get_lang('Gradebook'), |
|
|
|
|
[], |
|
|
|
|
ICON_SIZE_MEDIUM, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['gradebook']['label'] = get_lang('Gradebook'); |
|
|
|
|
$blocks['gradebook']['class'] = 'block-admin-gradebook'; |
|
|
|
|
|
|
|
|
|
$items = []; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => 'gradebook_list.php', |
|
|
|
|
'label' => get_lang('List'), |
|
|
|
|
]; |
|
|
|
|
$blocks['gradebook']['items'] = $items; |
|
|
|
|
$blocks['gradebook']['extra'] = null; |
|
|
|
|
$blocks['gradebook']['search_form'] = null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (api_is_platform_admin()) { |
|
|
|
@ -509,29 +506,7 @@ if (api_is_platform_admin()) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!api_get_configuration_value('disable_gdpr')) { |
|
|
|
|
// Data protection |
|
|
|
|
$blocks['data_privacy']['icon'] = Display::return_icon( |
|
|
|
|
'platform.png', |
|
|
|
|
get_lang('Platform'), |
|
|
|
|
[], |
|
|
|
|
ICON_SIZE_MEDIUM, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$blocks['data_privacy']['label'] = api_ucfirst(get_lang('PersonalDataPrivacy')); |
|
|
|
|
$blocks['data_privacy']['class'] = 'block-admin-platform'; |
|
|
|
|
$blocks['data_privacy']['editable'] = false; |
|
|
|
|
|
|
|
|
|
$items = []; |
|
|
|
|
$items[] = [ |
|
|
|
|
'url' => api_get_path(WEB_CODE_PATH).'admin/user_list_consent.php', |
|
|
|
|
'label' => get_lang('UserList'), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
$blocks['data_privacy']['items'] = $items; |
|
|
|
|
$blocks['data_privacy']['extra'] = null; |
|
|
|
|
$blocks['data_privacy']['search_form'] = null; |
|
|
|
|
} |
|
|
|
|
/* Chamilo.org */ |
|
|
|
|
$blocks['chamilo']['icon'] = Display::return_icon( |
|
|
|
|
'platform.png', |
|
|
|
|