Skip to content

Commit e324b42

Browse files
Admin: Improve settings categorization - refs #6819
1 parent cfd4494 commit e324b42

File tree

123 files changed

+1577
-1063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1577
-1063
lines changed

assets/vue/components/basecomponents/BaseTable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ function parseRowList(val) {
9898
return [5, 10, 20, 50]
9999
}
100100
101-
const rowListRaw = computed(() => getSetting("platform.table_row_list", [5, 10, 20, 50]))
101+
const rowListRaw = computed(() => getSetting("display.table_row_list", [5, 10, 20, 50]))
102102
103103
const defaultRowSetting = computed(() => {
104-
const raw = getSetting("platform.table_default_row", DEFAULT_FALLBACK_ROWS)
104+
const raw = getSetting("display.table_default_row", DEFAULT_FALLBACK_ROWS)
105105
const n = Number(raw)
106106
if (!Number.isFinite(n) || n <= 0) return DEFAULT_FALLBACK_ROWS
107107
return n

assets/vue/components/course/CourseTool.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
isAllowedToEdit &&
3131
!isSorting &&
3232
!isCustomizing &&
33-
(session?.id ? 'true' === getSetting('course.allow_edit_tool_visibility_in_session') : true)
33+
(session?.id ? 'true' === getSetting('session.allow_edit_tool_visibility_in_session') : true)
3434
"
3535
@click="changeVisibility(tool)"
3636
>

assets/vue/components/layout/TopbarLoggedIn.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</div>
66
<div class="app-topbar__items">
77
<BaseAppLink
8-
v-if="!isAnonymous && 'false' !== platformConfigStore.getSetting('display.show_link_ticket_notification')"
8+
v-if="!isAnonymous && 'false' !== platformConfigStore.getSetting('ticket.show_link_ticket_notification')"
99
:url="ticketUrl"
1010
class="item-button"
1111
>
@@ -121,7 +121,7 @@ const userSubmenuItems = computed(() => {
121121
},
122122
]
123123
124-
const tabs = platformConfigStore.getSetting("platform.show_tabs") || ""
124+
const tabs = platformConfigStore.getSetting("display.show_tabs") || ""
125125
if (tabs.indexOf("topbar_certificate") > -1) {
126126
items[0].items.push({
127127
label: t("My General Certificate"),

assets/vue/composables/sidebarMenu.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ export function useSidebarMenu() {
1717
const allowSocialTool = computed(() => platformConfigStore.getSetting("social.allow_social_tool") !== "false")
1818

1919
const showTabs = computed(() => {
20-
const defaultTabs = platformConfigStore.getSetting("platform.show_tabs") || []
21-
const tabsPerRoleJson = platformConfigStore.getSetting("platform.show_tabs_per_role") || ""
20+
const defaultTabs = platformConfigStore.getSetting("display.show_tabs") || []
21+
const tabsPerRoleJson = platformConfigStore.getSetting("display.show_tabs_per_role") || ""
2222

2323
let tabsPerRole = {}
2424
try {
2525
tabsPerRole = JSON.parse(tabsPerRoleJson)
2626
} catch (e) {
27-
console.warn("[Sidebar] Invalid JSON in platform.show_tabs_per_role", e)
27+
console.warn("[Sidebar] Invalid JSON in display.show_tabs_per_role", e)
2828
}
2929

3030
const roleMap = {

assets/vue/pages/Home.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import * as userRelCourseVoteService from "../services/userRelCourseVoteService"
5151
5252
const router = useRouter()
5353
const platformConfigStore = usePlatformConfig()
54-
const redirectValue = platformConfigStore.getSetting("platform.redirect_index_to_url_for_logged_users")
54+
const redirectValue = platformConfigStore.getSetting("workflows.redirect_index_to_url_for_logged_users")
5555
5656
if (typeof redirectValue === "string" && redirectValue.trim() !== "") {
5757
router.replace(`/${redirectValue}`)

assets/vue/views/course/CourseHome.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,6 @@ const onStudentViewChanged = async () => {
455455
const allowEditToolVisibilityInSession = computed(() => {
456456
const isInASession = session.value?.id
457457
458-
return isInASession ? "true" === getSetting.value("course.allow_edit_tool_visibility_in_session") : true
458+
return isInASession ? "true" === getSetting.value("session.allow_edit_tool_visibility_in_session") : true
459459
})
460460
</script>

assets/vue/views/documents/DocumentsList.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ const securityStore = useSecurityStore()
512512
513513
const platformConfigStore = usePlatformConfig()
514514
const allowAccessUrlFiles = computed(
515-
() => "false" !== platformConfigStore.getSetting("course.access_url_specific_files"),
515+
() => "false" !== platformConfigStore.getSetting("document.access_url_specific_files"),
516516
)
517517
518518
const { t } = useI18n()
@@ -579,7 +579,7 @@ const defaultCertificateId = ref(null)
579579
const isCurrentTeacher = computed(() => securityStore.isCurrentTeacher)
580580
581581
function resolveDefaultRows(total = 0) {
582-
const raw = platformConfigStore.getSetting("platform.table_default_row", 10)
582+
const raw = platformConfigStore.getSetting("display.table_default_row", 10)
583583
const def = Number(raw)
584584
if (def === 0) return total || Number.MAX_SAFE_INTEGER // “All”
585585
return Number.isFinite(def) && def > 0 ? def : 10
@@ -624,7 +624,7 @@ onMounted(async () => {
624624
})
625625
626626
watch(totalItems, (n) => {
627-
const def = Number(platformConfigStore.getSetting("platform.table_default_row", 10))
627+
const def = Number(platformConfigStore.getSetting("display.table_default_row", 10))
628628
if (def === 0 && n) {
629629
options.value.itemsPerPage = n
630630
onUpdateOptions(options.value)

assets/vue/views/lp/LpList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,12 @@ const showExportDialog = ref(false)
239239
const exportTarget = ref(null)
240240
241241
const canExportScorm = computed(() => {
242-
const isScormEnabled = platformConfig.getSetting("hide_scorm_export_link") !== "true"
242+
const isScormEnabled = platformConfig.getSetting("lp.hide_scorm_export_link") !== "true"
243243
return canEdit.value && isScormEnabled
244244
})
245245
246246
const canExportPdf = computed(() => {
247-
const hidden = platformConfig.getSetting("course.hide_scorm_pdf_link") === "true"
247+
const hidden = platformConfig.getSetting("lp.hide_scorm_pdf_link") === "true"
248248
return !hidden
249249
})
250250

assets/vue/views/sessionadmin/RegisterStudent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ const PLACEHOLDER = "/img/session_default.svg"
239239
const dynamicExtraField = ref("")
240240
const platformConfigStore = usePlatformConfig()
241241
const extraFieldKey = platformConfigStore.getSetting(
242-
"platform.session_admin_user_subscription_search_extra_field_to_search",
242+
"workflows.session_admin_user_subscription_search_extra_field_to_search",
243243
)
244244
245245
const isFetching = ref(true)

public/main/admin/add_users_to_usergroup.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function change_select(val) {
218218
$order = ['firstname'];
219219
}
220220

221-
$orderListByOfficialCode = api_get_setting('order_user_list_by_official_code');
221+
$orderListByOfficialCode = api_get_setting('display.order_user_list_by_official_code');
222222
if ('true' === $orderListByOfficialCode) {
223223
$order = ['official_code', 'lastname'];
224224
}
@@ -263,7 +263,7 @@ function change_select(val) {
263263
$item['lastname']
264264
) . ' (' . $item['username'] . ') ' . $officialCode;
265265

266-
$orderListByOfficialCode = api_get_setting('order_user_list_by_official_code');
266+
$orderListByOfficialCode = api_get_setting('display.order_user_list_by_official_code');
267267
if ('true' === $orderListByOfficialCode) {
268268
$officialCode = !empty($item['official_code']) ? $item['official_code'] . ' - ' : '? - ';
269269
$person_name = $officialCode . api_get_person_name(
@@ -310,7 +310,7 @@ function change_select(val) {
310310
$item['lastname']
311311
).' ('.$item['username'].') '.$officialCode;
312312

313-
$orderListByOfficialCode = api_get_setting('order_user_list_by_official_code');
313+
$orderListByOfficialCode = api_get_setting('display.order_user_list_by_official_code');
314314
if ('true' === $orderListByOfficialCode) {
315315
$officialCode = !empty($item['official_code']) ? $item['official_code'].' - ' : '? - ';
316316
$person_name = $officialCode.api_get_person_name(

0 commit comments

Comments
 (0)