Skip to content

Commit 7257f35

Browse files
committed
Merge branch 'master' of github.com:chamilo/chamilo-lms
2 parents 8dd060a + ccb4528 commit 7257f35

File tree

57 files changed

+4133
-1330
lines changed

Some content is hidden

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

57 files changed

+4133
-1330
lines changed

assets/locales/en.json

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,5 +1198,60 @@
11981198
"Admin Incomplete Courses": "Admin Incomplete Courses",
11991199
"Admin Restart Courses": "Admin Restart Courses",
12001200
"Admin Dashboard": "Admin Dashboard",
1201-
"New messages": "New messages"
1202-
}
1201+
"New messages": "New messages",
1202+
"Authentication source": "Authentication source",
1203+
"Assign authentication sources to users": "Assign authentication sources to users",
1204+
"Back to user assignment page": "Back to user assignment page",
1205+
"Authentication sources assigned successfully": "Authentication sources assigned successfully",
1206+
"Tip: choose “— Just upload —” to store without sending to anyone.": "Tip: choose “— Just upload —” to store without sending to anyone.",
1207+
"Please select at least one recipient (“— Just upload —” or any user)": "Please select at least one recipient (“— Just upload —” or any user)",
1208+
"Sharing": "Sharing",
1209+
"Overwrite previous versions of same document?": "Overwrite previous versions of same document?",
1210+
"Selected files": "Selected files",
1211+
"Hide password": "Hide password",
1212+
"Show password": "Show password",
1213+
"Upload SVG logo for e-mails": "Upload SVG logo for e-mails",
1214+
"You must move or remove all learning paths from this category before deleting it.": "You must move or remove all learning paths from this category before deleting it.",
1215+
"Clear filters": "Clear filters",
1216+
"Attendances (tablet)": "Attendances (tablet)",
1217+
"Exit tablet mode": "Exit tablet mode",
1218+
"Attended": "Attended",
1219+
"No members found.": "No members found.",
1220+
"Health check": "Health check",
1221+
"Export Common Cartridge v1.3": "Export Common Cartridge v1.3",
1222+
"Export your course content in the IMS Common Cartridge 1.3 format, to share it on other platforms.": "Export your course content in the IMS Common Cartridge 1.3 format, to share it on other platforms.",
1223+
"Full copy": "Full copy",
1224+
"Loading resources...": "Loading resources...",
1225+
"Import Common Cartridge v1.3": "Import Common Cartridge v1.3",
1226+
"Import a course in IMS Common Cartridge 1.3 format, from another platform compatible with this format. The version is important.": "Import a course in IMS Common Cartridge 1.3 format, from another platform compatible with this format. The version is important.",
1227+
"Failed to load resources.": "Failed to load resources.",
1228+
"Please select at least one exportable resource (document, web link, discussion,...).": "Please select at least one exportable resource (document, web link, discussion,...).",
1229+
"Export finished.": "Export finished.",
1230+
"Export failed.": "Export failed.",
1231+
"Import failed.": "Import failed.",
1232+
"Local file (.zip, .mbz, .tgz, .gz)": "Local file (.zip, .mbz, .tgz, .gz)",
1233+
"server file": "sever file",
1234+
"Select a backup file": "Select a backup file",
1235+
"What should be done with imported files with the same file name as existing files?": "What should be done with imported files with the same file name as existing files?",
1236+
"Ready to import": "Ready to import",
1237+
"We will restore the backup into this course. You can go back to change options.": "We will restore the backup into this course. You can go back to change options.",
1238+
"Import backup": "Import backup",
1239+
"Select resources to import": "Select resources to import",
1240+
"No resources available in this backup.": "No resources available in this backup.",
1241+
"Import selection": "Import selection",
1242+
"Import completed": "Import completed",
1243+
"Could not load options.": "Could not load options.",
1244+
"Please select a backup file (.zip, .mbz, .tgz, .gz)": "Please select a backup file (.zip, .mbz, .tgz, .gz)",
1245+
"Please choose a backup from the server": "Please choose a backup from the server",
1246+
"Error selecting source.": "Error selecting source.",
1247+
"Recycling options": "Recycling options",
1248+
"Delete everything": "Delete everything",
1249+
"Type the course code to confirm": "Type the course code to confirm",
1250+
"This will remove or reset selected resources. This action cannot be undone.": "This will remove or reset selected resources. This action cannot be undone.",
1251+
"Select resources to recycle": "Select resources to recycle",
1252+
"No resources available in this course.": "No resources available in this course.",
1253+
"Recycle selected": "Recycle selected",
1254+
"Recycle is finished": "Recycle is finished",
1255+
"Error loading resources.": "Error loading resources.",
1256+
"Clear search": "Clear search"
1257+
}

assets/vue/components/admin/BrandingSection.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@
182182

183183
<section class="grid grid-cols-1 gap-3">
184184
<div>
185-
<label class="text-xs block mb-1">{{ t('Upload email SVG') }}</label>
185+
<label class="text-xs block mb-1">{{ t('Upload SVG logo for e-mails') }}</label>
186186
<input type="file" accept=".svg,image/svg+xml" @change="onPick($event, 'emailSvg')" />
187187
</div>
188188
<div>
189-
<label class="text-xs block mb-1">{{ t('Upload email PNG (~540 px width)') }}</label>
189+
<label class="text-xs block mb-1">{{ t('Upload PNG logo for e-mails (~540 px width)') }}</label>
190190
<input type="file" accept="image/png" @change="onPick($event, 'emailPng', { recommendW:540 })" />
191191
</div>
192192
</section>

assets/vue/components/basecomponents/BaseCalendar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const onCancelClick = () => {
178178
class="base-calendar-footer__button base-calendar-footer__button--primary"
179179
@click="onApplyClick"
180180
>
181-
{{ t("Ok") }}
181+
{{ t("OK") }}
182182
</button>
183183
</div>
184184
</template>

assets/vue/components/documents/ResourceFileLink.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ export default {
2525
},
2626
computed: {
2727
getDataType() {
28-
if (this.resource.resourceNode.firstResourceFile.image) {
28+
const node = this.resource && this.resource.resourceNode
29+
const file = node && node.firstResourceFile
30+
31+
if (file && file.image) {
2932
return "image"
3033
}
31-
if (this.resource.resourceNode.firstResourceFile.video) {
34+
35+
if (file && file.video) {
3236
return "video"
3337
}
3438

assets/vue/components/documents/ResourceIcon.vue

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
icon="folder-generic"
55
/>
66
<BaseIcon
7-
v-else-if="resourceData.resourceNode.firstResourceFile.image"
7+
v-else-if="isImage(resourceData)"
88
icon="file-image"
99
/>
1010
<BaseIcon
11-
v-else-if="resourceData.resourceNode.firstResourceFile.video"
11+
v-else-if="isVideo(resourceData)"
1212
icon="file-video"
1313
/>
1414
<BaseIcon
15-
v-else-if="resourceData.resourceNode.firstResourceFile.text"
15+
v-else-if="hasTextFlag"
1616
icon="file-text"
1717
/>
1818
<BaseIcon
19-
v-else-if="'application/pdf' === resourceData.resourceNode.firstResourceFile.mimeType"
19+
v-else-if="isPdfFile"
2020
icon="file-pdf"
2121
/>
2222
<BaseIcon
@@ -30,15 +30,33 @@
3030
</template>
3131

3232
<script setup>
33+
import { computed } from "vue"
3334
import BaseIcon from "../basecomponents/BaseIcon.vue"
3435
import { useFileUtils } from "../../composables/fileUtils"
3536
36-
const { isAudio } = useFileUtils()
37+
const { isImage, isVideo, isAudio } = useFileUtils()
3738
38-
defineProps({
39+
const props = defineProps({
3940
resourceData: {
4041
type: Object,
4142
required: true,
4243
},
4344
})
45+
46+
const hasTextFlag = computed(() => {
47+
const file = props.resourceData?.resourceNode?.firstResourceFile
48+
return !!file && !!file.text
49+
})
50+
51+
const isPdfFile = computed(() => {
52+
const file = props.resourceData?.resourceNode?.firstResourceFile
53+
54+
if (!file || !file.mimeType) {
55+
return false
56+
}
57+
58+
const mime = String(file.mimeType).split(";")[0].trim().toLowerCase()
59+
60+
return mime === "application/pdf"
61+
})
4462
</script>

assets/vue/views/accessurl/AccessUrlAuthSourcesAssign.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async function assignAuthSources() {
5353
true,
5454
)
5555
56-
showSuccessNotification(t("Auth sources assigned successfully"))
56+
showSuccessNotification(t("Authentication sources assigned successfully"))
5757
5858
userFinder.value.selectedUsers = []
5959
} catch (e) {
@@ -67,7 +67,7 @@ listAccessUrl().then((items) => (accessUrlList.value = items))
6767
</script>
6868

6969
<template>
70-
<SectionHeader :title="t('Assign auth sources to users')" />
70+
<SectionHeader :title="t('Assign authentication sources to users')" />
7171

7272
<BaseToolbar>
7373
<template #start>
@@ -102,7 +102,7 @@ listAccessUrl().then((items) => (accessUrlList.value = items))
102102
id="auth_source"
103103
v-model="authSource"
104104
:disabled="0 === authSourceList.length"
105-
:label="t('Auth source')"
105+
:label="t('Authentication source')"
106106
:options="authSourceList"
107107
/>
108108

assets/vue/views/attendance/AttendanceSheetTablet.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<template>
2-
<SectionHeader :title="t('Attendance (tablet)')" />
2+
<SectionHeader :title="t('Attendances (tablet)')" />
33

44
<div class="p-4 space-y-4">
55
<!-- Loading state -->
66
<div
77
v-if="isLoading"
88
class="flex items-center justify-center py-10 text-gray-600"
99
>
10-
{{ t("Loading attendance...") }}
10+
{{ t("Loading...") }}
1111
</div>
1212

1313
<!-- Main content -->
@@ -62,7 +62,7 @@
6262
<th class="p-3 text-left">{{ t("Photo") }}</th>
6363
<th class="p-3 text-left">{{ t("Last name") }}</th>
6464
<th class="p-3 text-left">{{ t("First name") }}</th>
65-
<th class="p-3 text-center">{{ t("Presence") }}</th>
65+
<th class="p-3 text-center">{{ t("Attended") }}</th>
6666
<th
6767
class="p-3 text-center"
6868
v-if="allowComments"
@@ -149,7 +149,7 @@
149149
<!-- Comment Dialog -->
150150
<BaseDialog
151151
v-model:isVisible="showCommentDialog"
152-
:title="t('Add Comment')"
152+
:title="t('Add comment')"
153153
>
154154
<textarea
155155
class="w-full h-32 border rounded p-2"

assets/vue/views/coursemaintenance/Cc13.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<div class="grid grid-cols-1 gap-6 md:grid-cols-2">
77
<!-- Export -->
88
<div class="rounded-lg border border-gray-100 p-4">
9-
<h4 class="mb-2 text-sm font-semibold text-gray-800">{{ t("Export to CC 1.3") }}</h4>
9+
<h4 class="mb-2 text-sm font-semibold text-gray-800">{{ t("Export Common Cartridge v1.3") }}</h4>
1010
<p class="mb-3 text-sm text-gray-600">
11-
{{ t("Generate a Common Cartridge package for this course.") }}
11+
{{ t("Export your course content in the IMS Common Cartridge 1.3 format, to share it on other platforms.") }}
1212
</p>
1313

1414
<div class="mb-3">
@@ -25,7 +25,7 @@
2525
:class="segClass('full')"
2626
@click="scope = 'full'"
2727
>
28-
{{ t("Full course") }}
28+
{{ t("Full copy") }}
2929
</button>
3030
<button
3131
type="button"
@@ -73,7 +73,7 @@
7373
v-if="loadingResources"
7474
class="p-3 text-xs text-gray-500"
7575
>
76-
{{ t("Loading resources") }}
76+
{{ t("Loading resources...") }}
7777
</div>
7878

7979
<div
@@ -246,9 +246,9 @@
246246

247247
<!-- Import -->
248248
<div class="rounded-lg border border-gray-100 p-4">
249-
<h4 class="mb-2 text-sm font-semibold text-gray-800">{{ t("Import from CC 1.3") }}</h4>
249+
<h4 class="mb-2 text-sm font-semibold text-gray-800">{{ t("Import Common Cartridge v1.3") }}</h4>
250250
<p class="mb-3 text-sm text-gray-600">
251-
{{ t("Upload a Common Cartridge 1.3 (.imscc or .zip) to import resources.") }}
251+
{{ t("Import a course in IMS Common Cartridge 1.3 format, from another platform compatible with this format. The version is important.") }}
252252
</p>
253253
<input
254254
type="file"
@@ -457,7 +457,7 @@ async function doExport() {
457457
const total =
458458
Object.values(resSel).reduce((acc, obj) => acc + Object.keys(obj || {}).length, 0)
459459
if (total === 0) {
460-
throw new Error(t("Please select at least one exportable resource (documents, web links, or discussions)."))
460+
throw new Error(t("Please select at least one exportable resource (document, web link, discussion,...)."))
461461
}
462462
payload.resources = resSel
463463
}
@@ -466,7 +466,7 @@ async function doExport() {
466466
if (res.downloadUrl) window.location.href = res.downloadUrl
467467
notice.value = res.message || t("Export finished.")
468468
} catch (e) {
469-
error.value = e?.response?.data?.error || e.message || t("Failed to export.")
469+
error.value = e?.response?.data?.error || e.message || t("Export failed.")
470470
} finally {
471471
loadingExport.value = false
472472
}
@@ -482,7 +482,7 @@ async function doImport() {
482482
const res = await svc.cc13Import(node.value, file.value)
483483
notice.value = res.message || t("Import finished")
484484
} catch (e) {
485-
error.value = e?.response?.data?.error || e.message || t("Failed to import.")
485+
error.value = e?.response?.data?.error || e.message || t("Import failed.")
486486
} finally {
487487
loadingImport.value = false
488488
}

assets/vue/views/coursemaintenance/ImportBackup.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@
7979
value="server"
8080
v-model="backupType"
8181
/>
82-
<span class="text-sm text-gray-90">{{ t("Server file") }}</span>
82+
<span class="text-sm text-gray-90">{{ t("server file") }}</span>
8383
</label>
8484
<select
8585
v-if="backupType === 'server'"
8686
v-model="serverFilename"
8787
class="w-full rounded border border-gray-25 p-2 text-sm"
8888
>
89-
<option value="">{{ t("Select a backup") }}</option>
89+
<option value="">{{ t("Select a backup file") }}</option>
9090
<option
9191
v-for="b in backups"
9292
:key="b.file"
@@ -122,7 +122,7 @@
122122

123123
<div class="mt-4">
124124
<p class="mb-2 text-sm font-medium text-gray-90">
125-
{{ t("When a file with the same name exists") }}
125+
{{ t("What should be done with imported files with the same file name as existing files?") }}
126126
</p>
127127
<div class="space-y-2">
128128
<label class="flex items-center gap-2">
@@ -197,7 +197,7 @@
197197
@click="doRestore"
198198
:disabled="loading"
199199
>
200-
<i class="mdi mdi-database-import-outline"></i> {{ t("Start import") }}
200+
<i class="mdi mdi-database-import-outline"></i> {{ t("Import backup") }}
201201
</button>
202202
</div>
203203
</section>
@@ -234,7 +234,7 @@
234234
@click="doRestore"
235235
:disabled="loading"
236236
>
237-
<i class="mdi mdi-database-import-outline"></i> {{ t("Import selected") }}
237+
<i class="mdi mdi-database-import-outline"></i> {{ t("Import selection") }}
238238
</button>
239239
</div>
240240
</section>
@@ -358,10 +358,10 @@ async function nextFromStep1() {
358358
// Standard archive flows (local/server): .zip/.mbz/.tgz/.gz
359359
let res
360360
if (backupType.value === "local") {
361-
if (!localFile.value) throw new Error(t("Please select a backup file (.zip, .mbz, .tgz, .gz)."))
361+
if (!localFile.value) throw new Error(t("Please select a backup file (.zip, .mbz, .tgz, .gz)"))
362362
res = await svc.uploadFile(node.value, localFile.value)
363363
} else {
364-
if (!serverFilename.value) throw new Error(t("Please choose a server backup."))
364+
if (!serverFilename.value) throw new Error(t("Please choose a backup from the server"))
365365
res = await svc.chooseServerFile(node.value, serverFilename.value)
366366
}
367367
backupId.value = res.backupId
@@ -398,7 +398,7 @@ async function doRestore() {
398398
step.value = 4
399399
if (res.redirectUrl) pushWithQuery(res.redirectUrl)
400400
} catch (e) {
401-
error.value = e?.response?.data?.error || t("Failed to import backup.")
401+
error.value = e?.response?.data?.error || t("Import failed.")
402402
} finally {
403403
loading.value = false
404404
}

0 commit comments

Comments
 (0)