fix settings list - refs #2681

pull/2818/head
Alex Aragón 6 years ago
parent 57a6f11b3b
commit 0616eb1c49
  1. 22
      assets/css/scss/_base.scss
  2. 4
      assets/css/scss/_variables.scss
  3. 345
      main/admin/index.php
  4. 9
      main/template/default/admin/index.html.twig

@ -23,7 +23,7 @@ h5,
h6 { h6 {
font-family: $font-secondary; font-family: $font-secondary;
letter-spacing: 0.5px; letter-spacing: 0.5px;
line-height: 1.5; line-height: 1.2;
a { a {
font-family: $font-secondary; font-family: $font-secondary;
@ -34,7 +34,9 @@ h6 {
color: lighten($default-dark, 5%); color: lighten($default-dark, 5%);
} }
} }
h5, h6{
font-size: .875rem;
}
p { p {
font-family: $font-primary; font-family: $font-primary;
line-height: 1.9; line-height: 1.9;
@ -283,9 +285,20 @@ hr {
} }
.card{ .card{
border: 1px solid rgba(0, 0, 0, 0.125); border: 1px solid $card-border-color;
border-radius: 0.25rem; border-radius: 0.25rem;
margin-bottom: 10px; margin-bottom: 10px;
box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,.025);
.card-header{
padding: .75rem 1.25rem;
margin-bottom: 0;
color: inherit;
background-color: #fff;
border-bottom: 1px solid #e5e9f2;
.card-title{
margin-bottom: 0;
}
}
.card-body{ .card-body{
.tools{ .tools{
width: 160px; width: 160px;
@ -503,6 +516,9 @@ hr {
.card{ .card{
display: inline-block; display: inline-block;
width: 100%; width: 100%;
.card-description{
color: $grey-700;
}
} }
.list-group{ .list-group{
.list-group-item{ .list-group-item{

@ -47,7 +47,7 @@ $default-black : #000000;
// --------------------------------------------------------- // ---------------------------------------------------------
// linear-gradient(120deg, #00a5e4, #4a71d0); // linear-gradient(120deg, #00a5e4, #4a71d0);
$page-background : #FFFFFF; $page-background : #fcfcfc;
$menu-background : #FFFFFF; $menu-background : #FFFFFF;
$menu-secondary : #ff3c7e; $menu-secondary : #ff3c7e;
@ -69,7 +69,7 @@ $select-color : #ced4da;
$collapsed-size : 70px; $collapsed-size : 70px;
$header-height : 65px; $header-height : 65px;
$offscreen-size : 280px; $offscreen-size : 280px;
$card-border-color : #e5e9f2;
// --------------------------------------------------------- // ---------------------------------------------------------
// FONTS // FONTS
// --------------------------------------------------------- // ---------------------------------------------------------

@ -13,7 +13,7 @@ use League\Flysystem\Filesystem;
$cidReset = true; $cidReset = true;
// Including some necessary chamilo files. // Including some necessary chamilo files.
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__ . '/../inc/global.inc.php';
// Setting the section (for the tabs). // Setting the section (for the tabs).
$this_section = SECTION_PLATFORM_ADMIN; $this_section = SECTION_PLATFORM_ADMIN;
@ -37,7 +37,7 @@ if (api_is_platform_admin()) {
/* ACTION HANDLING */ /* ACTION HANDLING */
if (!empty($_POST['Register'])) { if (!empty($_POST['Register'])) {
api_register_campus(!$_POST['donotlistcampus']); api_register_campus(!$_POST['donotlistcampus']);
$message = Display :: return_message(get_lang('VersionCheckEnabled'), 'confirmation'); $message = Display:: return_message(get_lang('VersionCheckEnabled'), 'confirmation');
Display::addFlash($message); Display::addFlash($message);
} }
$keyword_url = Security::remove_XSS((empty($_GET['keyword']) ? '' : $_GET['keyword'])); $keyword_url = Security::remove_XSS((empty($_GET['keyword']) ? '' : $_GET['keyword']));
@ -60,22 +60,23 @@ if (!empty($hook)) {
/* Users */ /* Users */
$blocks['users']['icon'] = Display::return_icon( $blocks['users']['icon'] = Display::return_icon(
'members.png', 'members.png',
get_lang('Users'), get_lang('User management'),
[], [],
ICON_SIZE_MEDIUM, ICON_SIZE_MEDIUM,
false 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'; $blocks['users']['class'] = 'block-admin-users';
$search_form = ' $search_form = '
<form method="get" class="form-inline" action="user_list.php"> <form method="get" class="form-inline" action="user_list.php">
<div class="form-group mb-2"> <div class="form-group mb-2">
<input class="form-control" type="text" name="keyword" value="" <input class="form-control" type="text" name="keyword" value=""
aria-label="'.get_lang('Search').'"> aria-label="' . get_lang('Search') . '">
</div> </div>
<button class="btn btn-primary mb-2" type="submit"> <button class="btn btn-primary mb-2" type="submit">
<em class="fa fa-search"></em> '.get_lang('Search').' <em class="fa fa-search"></em> ' . get_lang('Search') . '
</button> </button>
</form>'; </form>';
$blocks['users']['search_form'] = $search_form; $blocks['users']['search_form'] = $search_form;
@ -95,6 +96,9 @@ if (api_is_platform_admin()) {
} }
$items[] = ['url' => 'extra_fields.php?type=user', 'label' => get_lang('ManageUserFields')]; $items[] = ['url' => 'extra_fields.php?type=user', 'label' => get_lang('ManageUserFields')];
$items[] = ['url' => 'usergroups.php', 'label' => get_lang('Classes')]; $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')) { if (api_get_configuration_value('show_link_request_hrm_user')) {
$items[] = ['url' => 'user_linking_requests.php', 'label' => get_lang('UserLinkingRequests')]; $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')], ['url' => 'usergroups.php', 'label' => get_lang('Classes')],
]; ];
if (api_is_session_admin()) { if (api_is_session_admin()) {
if ('true' === api_get_setting('limit_session_admin_role')) { if ('true' === api_get_setting('limit_session_admin_role')) {
$items = array_filter($items, function (array $item) { $items = array_filter($items, function (array $item) {
@ -132,21 +137,22 @@ if (api_is_platform_admin()) {
/* Courses */ /* Courses */
$blocks['courses']['icon'] = Display::return_icon( $blocks['courses']['icon'] = Display::return_icon(
'course.png', 'course.png',
get_lang('Courses'), get_lang('Course management'),
[], [],
ICON_SIZE_MEDIUM, ICON_SIZE_MEDIUM,
false 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']['class'] = 'block-admin-courses';
$blocks['courses']['editable'] = true; $blocks['courses']['editable'] = true;
$search_form = ' <form method="get" class="form-inline" action="course_list.php"> $search_form = ' <form method="get" class="form-inline" action="course_list.php">
<div class="form-group mb-2"> <div class="form-group mb-2">
<input class="form-control" type="text" name="keyword" value="" <input class="form-control" type="text" name="keyword" value=""
aria-label="'.get_lang('Search').'"> aria-label="' . get_lang('Search') . '">
</div> </div>
<button class="btn btn-primary mb-2" type="submit"> <button class="btn btn-primary mb-2" type="submit">
<em class="fa fa-search"></em> '.get_lang('Search').' <em class="fa fa-search"></em> ' . get_lang('Search') . '
</button> </button>
</form>'; </form>';
$blocks['courses']['search_form'] = $search_form; $blocks['courses']['search_form'] = $search_form;
@ -176,11 +182,140 @@ if (api_is_platform_admin()) {
} }
$items[] = ['url' => 'extra_fields.php?type=course', 'label' => get_lang('ManageCourseFields')]; $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']['items'] = $items;
$blocks['courses']['extra'] = null; $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 */ /* Platform */
$blocks['platform']['icon'] = Display::return_icon( $blocks['platform']['icon'] = Display::return_icon(
'platform.png', 'platform.png',
get_lang('Platform'), get_lang('Platform'),
@ -189,23 +324,24 @@ if (api_is_platform_admin()) {
false false
); );
$blocks['platform']['label'] = api_ucfirst(get_lang('Platform')); $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']['class'] = 'block-admin-platform';
$blocks['platform']['editable'] = true; $blocks['platform']['editable'] = true;
$search_form = ' <form method="get" action="'.api_get_path(WEB_PUBLIC_PATH).'admin/settings/search_settings'.'" class="form-inline"> $search_form = ' <form method="get" action="' . api_get_path(WEB_PUBLIC_PATH) . 'admin/settings/search_settings' . '" class="form-inline">
<div class="form-group mb-2"> <div class="form-group mb-2">
<input class="form-control" <input class="form-control"
type="text" type="text"
name="keyword" value="" name="keyword" value=""
aria-label="'.get_lang('Search').'" > aria-label="' . get_lang('Search') . '" >
</div> </div>
<button class="btn btn-primary mb-2" type="submit"> <button class="btn btn-primary mb-2" type="submit">
<em class="fa fa-search"></em> '.get_lang('Search').' <em class="fa fa-search"></em> ' . get_lang('Search') . '
</button> </button>
</form>'; </form>';
$blocks['platform']['search_form'] = $search_form; $blocks['platform']['search_form'] = $search_form;
//$url = Container::getRouter()->generate('chamilo_platform_settings', ['namespace' => 'platform']); //$url = Container::getRouter()->generate('chamilo_platform_settings', ['namespace' => 'platform']);
$url = api_get_path(WEB_PUBLIC_PATH).'admin/settings/platform'; $url = api_get_path(WEB_PUBLIC_PATH) . 'admin/settings/platform';
$items = []; $items = [];
$items[] = ['url' => $url, 'label' => get_lang('PlatformConfigSettings')]; $items[] = ['url' => $url, 'label' => get_lang('PlatformConfigSettings')];
$items[] = ['url' => 'languages.php', 'label' => get_lang('Languages')]; $items[] = ['url' => 'languages.php', 'label' => get_lang('Languages')];
@ -213,7 +349,7 @@ if (api_is_platform_admin()) {
$items[] = ['url' => 'settings.php?category=Regions', 'label' => get_lang('Regions')]; $items[] = ['url' => 'settings.php?category=Regions', 'label' => get_lang('Regions')];
$items[] = ['url' => 'system_announcements.php', 'label' => get_lang('SystemAnnouncements')]; $items[] = ['url' => 'system_announcements.php', 'label' => get_lang('SystemAnnouncements')];
$items[] = [ $items[] = [
'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=admin', 'url' => api_get_path(WEB_CODE_PATH) . 'calendar/agenda_js.php?type=admin',
'label' => get_lang('GlobalAgenda'), 'label' => get_lang('GlobalAgenda'),
]; ];
// Replaced by page blocks // Replaced by page blocks
@ -221,17 +357,13 @@ if (api_is_platform_admin()) {
$items[] = ['url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription')]; $items[] = ['url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription')];
$items[] = ['url' => 'statistics/index.php', 'label' => get_lang('Statistics')]; $items[] = ['url' => 'statistics/index.php', 'label' => get_lang('Statistics')];
$items[] = [ $items[] = [
'url' => api_get_path(WEB_CODE_PATH).'mySpace/company_reports.php', 'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/company_reports.php',
'label' => get_lang('Reports'), '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')) { if (api_get_configuration_value('chamilo_cms')) {
$items[] = [ $items[] = [
'url' => api_get_path(WEB_PATH).'web/app_dev.php/administration/dashboard', 'url' => api_get_path(WEB_PATH) . 'web/app_dev.php/administration/dashboard',
'label' => get_lang('CMS'), 'label' => get_lang('CMS'),
]; ];
} }
@ -246,7 +378,7 @@ if (api_is_platform_admin()) {
if (api_get_plugin_setting('dictionary', 'enable_plugin_dictionary') == 'true') { if (api_get_plugin_setting('dictionary', 'enable_plugin_dictionary') == 'true') {
$items[] = [ $items[] = [
'url' => api_get_path(WEB_PLUGIN_PATH).'dictionary/terms.php', 'url' => api_get_path(WEB_PLUGIN_PATH) . 'dictionary/terms.php',
'label' => get_lang('Dictionary'), 'label' => get_lang('Dictionary'),
]; ];
} }
@ -255,80 +387,12 @@ if (api_is_platform_admin()) {
$items[] = ['url' => 'legal_add.php', 'label' => get_lang('TermsAndConditions')]; $items[] = ['url' => 'legal_add.php', 'label' => get_lang('TermsAndConditions')];
} }
$items[] = ['url' => api_get_path(WEB_PUBLIC_PATH).'admin/lti/', 'label' => get_lang('External tools')]; $items[] = ['url' => api_get_path(WEB_PUBLIC_PATH) . 'admin/lti/', 'label' => get_lang('External tools')];
$blocks['platform']['items'] = $items; $blocks['platform']['items'] = $items;
$blocks['platform']['extra'] = null; $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 */ /* Settings */
if (api_is_platform_admin()) { if (api_is_platform_admin()) {
$blocks['settings']['icon'] = Display::return_icon( $blocks['settings']['icon'] = Display::return_icon(
@ -339,6 +403,7 @@ if (api_is_platform_admin()) {
false false
); );
$blocks['settings']['label'] = api_ucfirst(get_lang('System')); $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'; $blocks['settings']['class'] = 'block-admin-settings';
$items = []; $items = [];
@ -355,7 +420,7 @@ if (api_is_platform_admin()) {
'url' => 'system_status.php', 'url' => 'system_status.php',
'label' => get_lang('SystemStatus'), 'label' => get_lang('SystemStatus'),
]; ];
if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) { if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
$items[] = [ $items[] = [
'url' => 'filler.php', 'url' => 'filler.php',
'label' => get_lang('DataFiller'), 'label' => get_lang('DataFiller'),
@ -374,7 +439,7 @@ if (api_is_platform_admin()) {
} }
$items[] = [ $items[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php', 'url' => api_get_path(WEB_CODE_PATH) . 'ticket/tickets.php',
'label' => get_lang('TicketSystem'), 'label' => get_lang('TicketSystem'),
]; ];
@ -395,74 +460,6 @@ if (api_is_platform_admin()) {
$blocks['settings']['extra'] = null; $blocks['settings']['extra'] = null;
$blocks['settings']['search_form'] = 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()) { 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 */ /* Chamilo.org */
$blocks['chamilo']['icon'] = Display::return_icon( $blocks['chamilo']['icon'] = Display::return_icon(
'platform.png', 'platform.png',
@ -612,7 +587,7 @@ if (api_is_platform_admin()) {
} }
//end hack //end hack
} }
$admin_ajax_url = api_get_path(WEB_AJAX_PATH).'admin.ajax.php'; $admin_ajax_url = api_get_path(WEB_AJAX_PATH) . 'admin.ajax.php';
$tpl = new Template(); $tpl = new Template();
@ -656,7 +631,7 @@ if (api_is_platform_admin()) {
if (!empty($extraData['block'])) { if (!empty($extraData['block'])) {
//$fileSystem->put('admin/'.$extraData['block'].'_extra.html', $extraData['extra_content']); //$fileSystem->put('admin/'.$extraData['block'].'_extra.html', $extraData['extra_content']);
header('Location: '.api_get_self()); header('Location: ' . api_get_self());
exit; exit;
} }
} }

@ -5,12 +5,17 @@
<div class="list-settings"> <div class="list-settings">
{% for block_item in blocks_admin %} {% for block_item in blocks_admin %}
<div id="tabs-{{ loop.index }}" class="item-setting"> <div id="tabs-{{ loop.index }}" class="item-setting">
<div class="card"> <div class="card mb-3">
<div class="card-body"> <div class="card-header">
<h5 class="card-title">{{ block_item.icon }} {{ block_item.label }}</h5> <h5 class="card-title">{{ block_item.icon }} {{ block_item.label }}</h5>
</div>
<div class="card-body">
<div class="card-search"> <div class="card-search">
{{ block_item.search_form }} {{ block_item.search_form }}
</div> </div>
<div class="card-description mp-3 mb-3">
{{ block_item.description }}
</div>
{% if block_item.items is not empty %} {% if block_item.items is not empty %}
<ul class="list-group"> <ul class="list-group">
{% for url in block_item.items %} {% for url in block_item.items %}

Loading…
Cancel
Save