Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/vue/components/basecomponents/BaseTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ function parseRowList(val) {
return [5, 10, 20, 50]
}

const rowListRaw = computed(() => getSetting("platform.table_row_list", [5, 10, 20, 50]))
const rowListRaw = computed(() => getSetting("display.table_row_list", [5, 10, 20, 50]))

const defaultRowSetting = computed(() => {
const raw = getSetting("platform.table_default_row", DEFAULT_FALLBACK_ROWS)
const raw = getSetting("display.table_default_row", DEFAULT_FALLBACK_ROWS)
const n = Number(raw)
if (!Number.isFinite(n) || n <= 0) return DEFAULT_FALLBACK_ROWS
return n
Expand Down
2 changes: 1 addition & 1 deletion assets/vue/components/course/CourseTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
isAllowedToEdit &&
!isSorting &&
!isCustomizing &&
(session?.id ? 'true' === getSetting('course.allow_edit_tool_visibility_in_session') : true)
(session?.id ? 'true' === getSetting('session.allow_edit_tool_visibility_in_session') : true)
"
@click="changeVisibility(tool)"
>
Expand Down
4 changes: 2 additions & 2 deletions assets/vue/components/layout/TopbarLoggedIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
<div class="app-topbar__items">
<BaseAppLink
v-if="!isAnonymous && 'false' !== platformConfigStore.getSetting('display.show_link_ticket_notification')"
v-if="!isAnonymous && 'false' !== platformConfigStore.getSetting('ticket.show_link_ticket_notification')"
:url="ticketUrl"
class="item-button"
>
Expand Down Expand Up @@ -121,7 +121,7 @@ const userSubmenuItems = computed(() => {
},
]

const tabs = platformConfigStore.getSetting("platform.show_tabs") || ""
const tabs = platformConfigStore.getSetting("display.show_tabs") || ""
if (tabs.indexOf("topbar_certificate") > -1) {
items[0].items.push({
label: t("My General Certificate"),
Expand Down
6 changes: 3 additions & 3 deletions assets/vue/composables/sidebarMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ export function useSidebarMenu() {
const allowSocialTool = computed(() => platformConfigStore.getSetting("social.allow_social_tool") !== "false")

const showTabs = computed(() => {
const defaultTabs = platformConfigStore.getSetting("platform.show_tabs") || []
const tabsPerRoleJson = platformConfigStore.getSetting("platform.show_tabs_per_role") || ""
const defaultTabs = platformConfigStore.getSetting("display.show_tabs") || []
const tabsPerRoleJson = platformConfigStore.getSetting("display.show_tabs_per_role") || ""

let tabsPerRole = {}
try {
tabsPerRole = JSON.parse(tabsPerRoleJson)
} catch (e) {
console.warn("[Sidebar] Invalid JSON in platform.show_tabs_per_role", e)
console.warn("[Sidebar] Invalid JSON in display.show_tabs_per_role", e)
}

const roleMap = {
Expand Down
2 changes: 1 addition & 1 deletion assets/vue/pages/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import * as userRelCourseVoteService from "../services/userRelCourseVoteService"

const router = useRouter()
const platformConfigStore = usePlatformConfig()
const redirectValue = platformConfigStore.getSetting("platform.redirect_index_to_url_for_logged_users")
const redirectValue = platformConfigStore.getSetting("workflows.redirect_index_to_url_for_logged_users")

if (typeof redirectValue === "string" && redirectValue.trim() !== "") {
router.replace(`/${redirectValue}`)
Expand Down
2 changes: 1 addition & 1 deletion assets/vue/views/course/CourseHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,6 @@ const onStudentViewChanged = async () => {
const allowEditToolVisibilityInSession = computed(() => {
const isInASession = session.value?.id

return isInASession ? "true" === getSetting.value("course.allow_edit_tool_visibility_in_session") : true
return isInASession ? "true" === getSetting.value("session.allow_edit_tool_visibility_in_session") : true
})
</script>
6 changes: 3 additions & 3 deletions assets/vue/views/documents/DocumentsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ const securityStore = useSecurityStore()

const platformConfigStore = usePlatformConfig()
const allowAccessUrlFiles = computed(
() => "false" !== platformConfigStore.getSetting("course.access_url_specific_files"),
() => "false" !== platformConfigStore.getSetting("document.access_url_specific_files"),
)

const { t } = useI18n()
Expand Down Expand Up @@ -579,7 +579,7 @@ const defaultCertificateId = ref(null)
const isCurrentTeacher = computed(() => securityStore.isCurrentTeacher)

function resolveDefaultRows(total = 0) {
const raw = platformConfigStore.getSetting("platform.table_default_row", 10)
const raw = platformConfigStore.getSetting("display.table_default_row", 10)
const def = Number(raw)
if (def === 0) return total || Number.MAX_SAFE_INTEGER // “All”
return Number.isFinite(def) && def > 0 ? def : 10
Expand Down Expand Up @@ -624,7 +624,7 @@ onMounted(async () => {
})

watch(totalItems, (n) => {
const def = Number(platformConfigStore.getSetting("platform.table_default_row", 10))
const def = Number(platformConfigStore.getSetting("display.table_default_row", 10))
if (def === 0 && n) {
options.value.itemsPerPage = n
onUpdateOptions(options.value)
Expand Down
4 changes: 2 additions & 2 deletions assets/vue/views/lp/LpList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ const showExportDialog = ref(false)
const exportTarget = ref(null)

const canExportScorm = computed(() => {
const isScormEnabled = platformConfig.getSetting("hide_scorm_export_link") !== "true"
const isScormEnabled = platformConfig.getSetting("lp.hide_scorm_export_link") !== "true"
return canEdit.value && isScormEnabled
})

const canExportPdf = computed(() => {
const hidden = platformConfig.getSetting("course.hide_scorm_pdf_link") === "true"
const hidden = platformConfig.getSetting("lp.hide_scorm_pdf_link") === "true"
return !hidden
})

Expand Down
2 changes: 1 addition & 1 deletion assets/vue/views/sessionadmin/RegisterStudent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const PLACEHOLDER = "/img/session_default.svg"
const dynamicExtraField = ref("")
const platformConfigStore = usePlatformConfig()
const extraFieldKey = platformConfigStore.getSetting(
"platform.session_admin_user_subscription_search_extra_field_to_search",
"workflows.session_admin_user_subscription_search_extra_field_to_search",
)

const isFetching = ref(true)
Expand Down
6 changes: 3 additions & 3 deletions public/main/admin/add_users_to_usergroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function change_select(val) {
$order = ['firstname'];
}

$orderListByOfficialCode = api_get_setting('order_user_list_by_official_code');
$orderListByOfficialCode = api_get_setting('display.order_user_list_by_official_code');
if ('true' === $orderListByOfficialCode) {
$order = ['official_code', 'lastname'];
}
Expand Down Expand Up @@ -263,7 +263,7 @@ function change_select(val) {
$item['lastname']
) . ' (' . $item['username'] . ') ' . $officialCode;

$orderListByOfficialCode = api_get_setting('order_user_list_by_official_code');
$orderListByOfficialCode = api_get_setting('display.order_user_list_by_official_code');
if ('true' === $orderListByOfficialCode) {
$officialCode = !empty($item['official_code']) ? $item['official_code'] . ' - ' : '? - ';
$person_name = $officialCode . api_get_person_name(
Expand Down Expand Up @@ -310,7 +310,7 @@ function change_select(val) {
$item['lastname']
).' ('.$item['username'].') '.$officialCode;

$orderListByOfficialCode = api_get_setting('order_user_list_by_official_code');
$orderListByOfficialCode = api_get_setting('display.order_user_list_by_official_code');
if ('true' === $orderListByOfficialCode) {
$officialCode = !empty($item['official_code']) ? $item['official_code'].' - ' : '? - ';
$person_name = $officialCode.api_get_person_name(
Expand Down
2 changes: 1 addition & 1 deletion public/main/admin/career_diagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

if ('false' === api_get_setting('profile.allow_career_diagram')) {
if ('false' === api_get_setting('session.allow_career_diagram')) {
api_not_allowed(true);
}

Expand Down
2 changes: 1 addition & 1 deletion public/main/admin/careers.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
$extra_params['height'] = 'auto';

$diagramLink = '';
$allow = ('true' === api_get_setting('profile.allow_career_diagram'));
$allow = ('true' === api_get_setting('session.allow_career_diagram'));
if ($allow) {
$diagramLink = '<a
href="'.api_get_path(WEB_CODE_PATH).'admin/career_diagram.php?id=\'+options.rowId+\'">'.
Expand Down
2 changes: 1 addition & 1 deletion public/main/admin/course_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
$form->addSelectLanguage('course_language', get_lang('Language'));
}

if ('true' === api_get_setting('teacher_can_select_course_template')) {
if ('true' === api_get_setting('workflows.teacher_can_select_course_template')) {
$form->addSelectAjax(
'course_template',
[
Expand Down
2 changes: 1 addition & 1 deletion public/main/admin/course_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
);
}

$allowEditSessionCoaches = ('false' === api_get_setting('course.disabled_edit_session_coaches_course_editing_course'));
$allowEditSessionCoaches = ('false' === api_get_setting('workflows.disabled_edit_session_coaches_course_editing_course'));
$coursesInSession = SessionManager::get_session_by_course($courseInfo['real_id']);
if (!empty($coursesInSession) && $allowEditSessionCoaches) {
foreach ($coursesInSession as $session) {
Expand Down
2 changes: 1 addition & 1 deletion public/main/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
}
$items[] = ['url' => 'extra_fields.php?type=user', 'label' => get_lang('Profiling')];
$items[] = ['url' => 'usergroups.php', 'label' => get_lang('Classes')];
if ('true' !== api_get_setting('profile.disable_gdpr')) {
if ('true' !== api_get_setting('privacy.disable_gdpr')) {
$items[] = ['url' => 'user_list_consent.php', 'label' => get_lang('Users in consent list')];
}
if ('true' === api_get_setting('admin.show_link_request_hrm_user')) {
Expand Down
2 changes: 1 addition & 1 deletion public/main/admin/subscribe_user2course.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function validate_filter() {
$target_name = 'lastname';
$orderBy = $target_name;
$showOfficialCode = false;
$orderListByOfficialCode = api_get_setting('order_user_list_by_official_code');
$orderListByOfficialCode = api_get_setting('display.order_user_list_by_official_code');
if ('true' === $orderListByOfficialCode) {
$showOfficialCode = true;
$orderBy = " official_code, lastname, firstname";
Expand Down
2 changes: 1 addition & 1 deletion public/main/admin/user_import.php
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ function reload() {
}
}

if ('true' === api_get_setting('admin.plugin_redirection_enabled')) {
if ('true' === api_get_setting('workflows.plugin_redirection_enabled')) {
$list[] = 'Redirection';
$list_reponse[] = api_get_path(WEB_PATH);
}
Expand Down
2 changes: 1 addition & 1 deletion public/main/admin/user_information.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@
0,
0
);
if ('true' === api_get_setting('profile.allow_career_users')) {
if ('true' === api_get_setting('session.allow_career_users')) {
$careers = UserManager::getUserCareers($userId);
if (!empty($careers)) {
echo Display::page_subheader(get_lang('Careers'), null, 'h3', ['class' => 'section-title']);
Expand Down
4 changes: 2 additions & 2 deletions public/main/auth/my_progress.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

api_block_anonymous_users();

if (('true' === api_get_setting('platform.block_my_progress_page'))) {
if (('true' === api_get_setting('tracking.block_my_progress_page'))) {
api_not_allowed(true);
}

Expand Down Expand Up @@ -110,7 +110,7 @@
$message = Display::return_message(get_lang('No data available'), 'warning');
}

$show = ('true' === api_get_setting('profile.allow_career_users'));
$show = ('true' === api_get_setting('session.allow_career_users'));

if ($show) {
$careers = UserManager::getUserCareers($user_id);
Expand Down
6 changes: 3 additions & 3 deletions public/main/auth/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
if ('true' === api_get_setting('allow_terms_conditions')) {
$userAlreadyRegisteredShowTerms = isset($termRegistered['user_id']);
// Ofaj change
if (true === api_is_anonymous() && 'course' === api_get_setting('load_term_conditions_section')) {
if (true === api_is_anonymous() && 'course' === api_get_setting('workflows.load_term_conditions_section')) {
$userAlreadyRegisteredShowTerms = false;
}
}
Expand Down Expand Up @@ -663,7 +663,7 @@ function ($email) {
false
);
} else {
$allow = ('true' === api_get_setting('platform.allow_double_validation_in_registration'));
$allow = ('true' === api_get_setting('registration.allow_double_validation_in_registration'));
ChamiloHelper::addLegalTermsFields($form, $userAlreadyRegisteredShowTerms);
if ($allow && !$termActivated) {
$htmlHeadXtra[] = '<script>
Expand Down Expand Up @@ -1022,7 +1022,7 @@ function ($email) {
];

if ('true' === api_get_setting('allow_terms_conditions') && $userAlreadyRegisteredShowTerms) {
if ('login' === api_get_setting('load_term_conditions_section')) {
if ('login' === api_get_setting('workflows.load_term_conditions_section')) {
header('Location: /home');
exit;
//$formData['action'] = api_get_path(WEB_PATH).'user_portal.php';
Expand Down
2 changes: 1 addition & 1 deletion public/main/auth/reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
Database::getManager()->persist($user);
Database::getManager()->flush();

if ('true' === api_get_setting('platform.force_renew_password_at_first_login')) {
if ('true' === api_get_setting('security.force_renew_password_at_first_login')) {
$extraFieldValue = new ExtraFieldValue('user');
$value = $extraFieldValue->get_values_by_handler_and_field_variable($user->getId(), 'ask_new_password');
if (!empty($value) && isset($value['value']) && 1 === (int) $value['value']) {
Expand Down
2 changes: 1 addition & 1 deletion public/main/auth/tc.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

$isPlatformAdmin = api_is_platform_admin();
if ('true' === api_get_setting('registration.allow_terms_conditions') && !$isPlatformAdmin) {
if ('true' === api_get_setting('ticket.show_terms_if_profile_completed')) {
if ('true' === api_get_setting('profile.show_terms_if_profile_completed')) {
if (!empty($userId)) {
$userInfo = api_get_user_info($userId);
if ($userInfo && ANONYMOUS != $userInfo['status']) {
Expand Down
4 changes: 2 additions & 2 deletions public/main/course_info/infocours.php
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
$globalGroup[get_lang("Enable course themes")] = $group;
}

$allowLPReturnLink = api_get_setting('allow_lp_return_link');
$allowLPReturnLink = api_get_setting('lp.allow_lp_return_link');
if ('true' === $allowLPReturnLink) {
$group = [
$form->createElement(
Expand Down Expand Up @@ -727,7 +727,7 @@
false
);

if ('true' === api_get_setting('allow_public_certificates')) {
if ('true' === api_get_setting('certificate.allow_public_certificates')) {
$group = [];
$group[] = $form->createElement(
'radio',
Expand Down
2 changes: 1 addition & 1 deletion public/main/create_course/add_course.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function MM_openBrWindow(theURL, winName, features) { //v2.0
$obj = new GradeModel();
$obj->fill_grade_model_select_in_form($form);

if ('true' === api_get_setting('teacher_can_select_course_template')) {
if ('true' === api_get_setting('workflows.teacher_can_select_course_template')) {
$form->addElement(
'select_ajax',
'course_template',
Expand Down
2 changes: 1 addition & 1 deletion public/main/forum/forumfunction.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5363,7 +5363,7 @@ function getReportRecipients()

break;
case 'community_managers':
$managers = api_get_setting('profile.community_managers_user_list', true);
$managers = api_get_setting('forum.community_managers_user_list', true);
if (!empty($managers) && isset($managers['users'])) {
$users = array_merge($users, $managers['users']);
}
Expand Down
2 changes: 1 addition & 1 deletion public/main/gamification/my_progress.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

api_block_anonymous_users();

if ('0' == api_get_setting('gamification_mode')) {
if ('0' == api_get_setting('workflows.gamification_mode')) {
api_not_allowed(true);
}

Expand Down
2 changes: 1 addition & 1 deletion public/main/gradebook/get_badges.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

$backpack = 'https://backpack.openbadges.org/';

$configBackpack = api_get_setting('openbadges_backpack');
$configBackpack = api_get_setting('skill.openbadges_backpack');
if (0 !== strcmp($backpack, $configBackpack)) {
$backpack = $configBackpack;
if ('/' !== substr($backpack, -1)) {
Expand Down
4 changes: 2 additions & 2 deletions public/main/gradebook/gradebook_display_certificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function confirmation() {
$url = api_get_self().'?'.api_get_cidreq().'&cat_id='.$categoryId.'&filter='.$filterOfficialCode;
$courseInfo = api_get_course_info();

$filter = api_get_setting('certificate_filter_by_official_code');
$filter = api_get_setting('certificate.certificate_filter_by_official_code');
$userList = [];
$filterForm = null;
$certificate_list = [];
Expand Down Expand Up @@ -289,7 +289,7 @@ function confirmation() {
$url.'&action=delete_all_certificates'
);

$hideCertificateExport = api_get_setting('hide_certificate_export_link');
$hideCertificateExport = api_get_setting('certificate.hide_certificate_export_link');

if (count($certificate_list) > 0 && 'true' !== $hideCertificateExport) {
$actions .= Display::url(
Expand Down
2 changes: 1 addition & 1 deletion public/main/gradebook/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ function confirmation() {
// Show certificate link.
$certificate = [];
$actionsLeft = '';
$hideCertificateExport = api_get_setting('hide_certificate_export_link');
$hideCertificateExport = api_get_setting('certificate.hide_certificate_export_link');
$category = null;
if (!empty($selectCat)) {
$repo = Container::getGradeBookCategoryRepository();
Expand Down
4 changes: 2 additions & 2 deletions public/main/gradebook/lib/be/category.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@ public static function generateUserCertificate(
);
}

$hideExportLink = api_get_setting('gradebook.hide_certificate_export_link');
$hideExportLink = api_get_setting('certificate.hide_certificate_export_link');
$hideExportLinkStudent = api_get_setting('gradebook.hide_certificate_export_link_students');
if ('true' === $hideExportLink || (api_is_student() && 'true' === $hideExportLinkStudent)) {
$exportToPDF = null;
Expand Down Expand Up @@ -2195,7 +2195,7 @@ public static function getUserScoreForEvaluation(int $userId, int $evaluationId)
*/
public static function exportAllCertificates($catId, $userList = [])
{
$orientation = api_get_setting('document.certificate_pdf_orientation');
$orientation = api_get_setting('certificate.certificate_pdf_orientation');

$params['orientation'] = 'landscape';
if (!empty($orientation)) {
Expand Down
Loading
Loading