fix(dashboard): hide admin callout banner and actions on cohort courses page for students (#895)
* fix(dashboard): hide admin callout banner and actions on cohort courses page for students * fix(dashboard): update empty state description for student users --------- Co-authored-by: richardkenneth <[email protected]>
This commit is contained in:
co-authored by
richardkenneth
parent
a93acd0f6d
commit
7ba551aa43
@@ -4858,7 +4858,8 @@
|
||||
"no_matching_cohort_courses": "Ingen kohortekurser matcher din søgning.",
|
||||
"pagination_status": "Side {page} af {totalPages}",
|
||||
"published_access_callout_title": "Studerendes adgang",
|
||||
"published_access_callout_description": "Studerende har kun adgang til publicerede kurser. Kurser kan være i denne kohorte for dit team, mens de stadig er upublicerede, og de forbliver skjulte for studerende, indtil du publicerer dem."
|
||||
"published_access_callout_description": "Studerende har kun adgang til offentliggjorte kurser. Kurser kan være i denne kohorte for dit team, mens de stadig ikke er udgivet, men de forbliver skjulte for eleverne, indtil du udgiver dem.",
|
||||
"empty_student_description": "Der er endnu ingen offentliggjorte kurser i denne kohorte."
|
||||
},
|
||||
"newsfeed": {
|
||||
"post": "Nyt indlæg",
|
||||
|
||||
@@ -4858,7 +4858,8 @@
|
||||
"no_matching_cohort_courses": "Zu Ihrer Suche passen keine Kohortenkurse.",
|
||||
"pagination_status": "Seite {page} von {totalPages}",
|
||||
"published_access_callout_title": "Zugang für Studierende",
|
||||
"published_access_callout_description": "Studierende haben nur Zugriff auf veröffentlichte Kurse. Kurse können für Ihr Team in dieser Kohorte enthalten sein, solange sie noch unveröffentlicht sind, und bleiben den Studierenden verborgen, bis Sie sie veröffentlichen."
|
||||
"published_access_callout_description": "Studierende haben nur Zugriff auf veröffentlichte Kurse. Kurse können für Ihr Team in dieser Kohorte enthalten sein, solange sie noch unveröffentlicht sind. Sie bleiben den Studierenden jedoch verborgen, bis Sie sie veröffentlichen.",
|
||||
"empty_student_description": "In dieser Kohorte gibt es noch keine veröffentlichten Kurse."
|
||||
},
|
||||
"newsfeed": {
|
||||
"post": "Neuer Beitrag",
|
||||
|
||||
@@ -4902,8 +4902,9 @@
|
||||
"pagination_status": "Page {page} of {totalPages}",
|
||||
"empty_title": "No courses yet",
|
||||
"empty_description": "Add courses to this cohort.",
|
||||
"empty_student_description": "There are no published courses in this cohort yet.",
|
||||
"published_access_callout_title": "Student access",
|
||||
"published_access_callout_description": "Students only have access to published courses. Courses can be in this cohort for your team while still unpublished while those stay hidden from students until you publish them."
|
||||
"published_access_callout_description": "Students only have access to published courses. Courses can be in this cohort for your team while still unpublished, but they remain hidden from students until you publish them."
|
||||
},
|
||||
"people": {
|
||||
"invite": "Invite",
|
||||
|
||||
@@ -4858,7 +4858,8 @@
|
||||
"no_matching_cohort_courses": "Ningún curso de cohorte coincide con su búsqueda.",
|
||||
"pagination_status": "Página {page} de {totalPages}",
|
||||
"published_access_callout_title": "Acceso de estudiantes",
|
||||
"published_access_callout_description": "Los estudiantes solo tienen acceso a los cursos publicados. Los cursos pueden estar en esta cohorte para tu equipo aunque aún no estén publicados, y permanecerán ocultos para los estudiantes hasta que los publiques."
|
||||
"published_access_callout_description": "Los estudiantes solo tienen acceso a los cursos publicados. Los cursos pueden estar en esta cohorte para su equipo mientras aún no están publicados, pero permanecen ocultos para los estudiantes hasta que los publique.",
|
||||
"empty_student_description": "Aún no hay cursos publicados en esta cohorte."
|
||||
},
|
||||
"newsfeed": {
|
||||
"post": "Nueva publicación",
|
||||
|
||||
@@ -4858,7 +4858,8 @@
|
||||
"no_matching_cohort_courses": "Aucun cours de cohorte ne correspond à votre recherche.",
|
||||
"pagination_status": "Page {page} sur {totalPages}",
|
||||
"published_access_callout_title": "Accès étudiant",
|
||||
"published_access_callout_description": "Les étudiants n’ont accès qu’aux cours publiés. Les cours peuvent figurer dans cette cohorte pour votre équipe alors qu’ils ne sont pas encore publiés, tout en restant cachés aux étudiants jusqu’à leur publication."
|
||||
"published_access_callout_description": "Les étudiants n'ont accès qu'aux cours publiés. Les cours peuvent figurer dans cette cohorte pour votre équipe même s'ils ne sont pas encore publiés, mais ils restent cachés aux étudiants jusqu'à ce que vous les publiiez.",
|
||||
"empty_student_description": "Il n'y a pas encore de cours publiés dans cette cohorte."
|
||||
},
|
||||
"newsfeed": {
|
||||
"post": "Nouveau message",
|
||||
|
||||
@@ -4858,7 +4858,8 @@
|
||||
"no_matching_cohort_courses": "कोई भी कोहोर्ट पाठ्यक्रम आपकी खोज से मेल नहीं खाता।",
|
||||
"pagination_status": "{page} का पेज {totalPages}",
|
||||
"published_access_callout_title": "छात्र प्रवेश",
|
||||
"published_access_callout_description": "छात्रों को केवल प्रकाशित पाठ्यक्रमों तक ही पहुंच है। पाठ्यक्रम अप्रकाशित रहते हुए भी आपकी टीम के लिए इस कोहोर्ट में हो सकते हैं, जबकि जब तक आप उन्हें प्रकाशित नहीं करते तब तक वे छात्रों से छिपे रहते हैं।"
|
||||
"published_access_callout_description": "छात्रों को केवल प्रकाशित पाठ्यक्रमों तक ही पहुंच है। पाठ्यक्रम अप्रकाशित रहते हुए भी आपकी टीम के लिए इस समूह में हो सकते हैं, लेकिन जब तक आप उन्हें प्रकाशित नहीं करते तब तक वे छात्रों से छिपे रहते हैं।",
|
||||
"empty_student_description": "इस समूह में अभी तक कोई प्रकाशित पाठ्यक्रम नहीं है।"
|
||||
},
|
||||
"newsfeed": {
|
||||
"post": "नई पोस्ट",
|
||||
|
||||
@@ -4858,7 +4858,8 @@
|
||||
"no_matching_cohort_courses": "Żaden kurs kohorty nie pasuje do Twojego wyszukiwania.",
|
||||
"pagination_status": "Strona {page} z {totalPages}",
|
||||
"published_access_callout_title": "Dostęp studencki",
|
||||
"published_access_callout_description": "Studenci mają dostęp tylko do opublikowanych kursów. Kursy mogą być w tej kohorcie dla Twojego zespołu, nawet jeśli są jeszcze nieopublikowane, i pozostają ukryte przed studentami do czasu publikacji."
|
||||
"published_access_callout_description": "Studenci mają dostęp wyłącznie do opublikowanych kursów. Kursy mogą znajdować się w tej kohorcie Twojego zespołu, gdy nie są jeszcze opublikowane, ale pozostają ukryte przed uczniami, dopóki ich nie opublikujesz.",
|
||||
"empty_student_description": "Nie ma jeszcze opublikowanych kursów w tej kohorcie."
|
||||
},
|
||||
"newsfeed": {
|
||||
"post": "Nowy post",
|
||||
|
||||
@@ -4858,7 +4858,8 @@
|
||||
"no_matching_cohort_courses": "Nenhum curso da coorte corresponde à sua pesquisa.",
|
||||
"pagination_status": "Página {page} de {totalPages}",
|
||||
"published_access_callout_title": "Acesso de estudante",
|
||||
"published_access_callout_description": "Os alunos só têm acesso aos cursos publicados. Os cursos podem estar nesta coorte para sua equipe enquanto ainda não foram publicados, e ficam ocultos para os alunos até que você os publique."
|
||||
"published_access_callout_description": "Os alunos só têm acesso aos cursos publicados. Os cursos podem estar neste grupo para sua equipe enquanto ainda não foram publicados, mas permanecem ocultos aos alunos até que você os publique.",
|
||||
"empty_student_description": "Ainda não há cursos publicados nesta coorte."
|
||||
},
|
||||
"newsfeed": {
|
||||
"post": "Nova postagem",
|
||||
|
||||
@@ -4858,7 +4858,8 @@
|
||||
"no_matching_cohort_courses": "Никакие курсы когорты не соответствуют вашему запросу.",
|
||||
"pagination_status": "Страница {page} из {totalPages}",
|
||||
"published_access_callout_title": "Доступ для студентов",
|
||||
"published_access_callout_description": "Студенты имеют доступ только к опубликованным курсам. Курсы могут быть включены в эту когорту для вашей команды, пока они еще не опубликованы, и остаются скрытыми от учащихся, пока вы их не опубликуете."
|
||||
"published_access_callout_description": "Студенты имеют доступ только к опубликованным курсам. Курсы могут находиться в этой когорте для вашей команды, пока они еще не опубликованы, но они остаются скрытыми от учащихся, пока вы их не опубликуете.",
|
||||
"empty_student_description": "В этой группе пока нет опубликованных курсов."
|
||||
},
|
||||
"newsfeed": {
|
||||
"post": "Новое сообщение",
|
||||
|
||||
@@ -4858,7 +4858,8 @@
|
||||
"no_matching_cohort_courses": "Không có nhóm học tập khóa học phù hợp với tìm kiếm của bạn.",
|
||||
"pagination_status": "Trang {page} trong tổng số {totalPages}",
|
||||
"published_access_callout_title": "Quyền truy cập của sinh viên",
|
||||
"published_access_callout_description": "Sinh viên chỉ có quyền truy cập vào các khóa học được xuất bản. Các khóa học có thể có trong nhóm học tập này cho nhóm của bạn trong khi vẫn chưa được xuất bản và các khóa học đó sẽ bị ẩn với sinh viên cho đến khi bạn xuất bản chúng."
|
||||
"published_access_callout_description": "Sinh viên chỉ có quyền truy cập vào các khóa học được xuất bản. Các khóa học có thể nằm trong nhóm này cho nhóm của bạn mặc dù vẫn chưa được xuất bản nhưng chúng vẫn bị ẩn với học sinh cho đến khi bạn xuất bản chúng.",
|
||||
"empty_student_description": "Chưa có khóa học nào được xuất bản trong nhóm này."
|
||||
},
|
||||
"newsfeed": {
|
||||
"post": "Bài đăng mới",
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
import AddCourseToCohortModal from '$features/cohort/components/add-course-to-cohort-modal.svelte';
|
||||
import { browser } from '$app/environment';
|
||||
import { onMount } from 'svelte';
|
||||
import { isStudentExperience } from '$lib/utils/store/app';
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
@@ -94,19 +95,23 @@
|
||||
<Page.Header>
|
||||
<Page.HeaderContent class="min-w-0 flex-1">
|
||||
<Page.Title>{$t('cohorts.sidebar.courses') || 'Courses'}</Page.Title>
|
||||
{#if !$isStudentExperience}
|
||||
<Alert.Callout
|
||||
variant="information"
|
||||
title={$t('cohorts.courses.published_access_callout_title')}
|
||||
description={$t('cohorts.courses.published_access_callout_description')}
|
||||
class="mt-3 w-full"
|
||||
/>
|
||||
{/if}
|
||||
</Page.HeaderContent>
|
||||
{#if !$isStudentExperience}
|
||||
<Page.Action>
|
||||
<Button onclick={() => (showAddCourseModal = true)}>
|
||||
<Plus size={16} />
|
||||
{$t('cohorts.courses.add') || 'Add Course'}
|
||||
</Button>
|
||||
</Page.Action>
|
||||
{/if}
|
||||
</Page.Header>
|
||||
<Page.Body>
|
||||
{#snippet child()}
|
||||
@@ -129,11 +134,13 @@
|
||||
title={$t('cohorts.courses.empty_title') || 'No courses yet'}
|
||||
description={searchValue.trim()
|
||||
? $t('cohorts.courses.no_matching_cohort_courses') || 'No cohort courses match your search.'
|
||||
: $isStudentExperience
|
||||
? $t('cohorts.courses.empty_student_description') || 'There are no published courses in this cohort yet.'
|
||||
: $t('cohorts.courses.empty_description') || 'Add courses to this cohort.'}
|
||||
icon={BookOpenIcon}
|
||||
variant="page"
|
||||
>
|
||||
{#if !searchValue.trim()}
|
||||
{#if !searchValue.trim() && !$isStudentExperience}
|
||||
<Button onclick={() => (showAddCourseModal = true)}>
|
||||
<Plus size={16} />
|
||||
{$t('cohorts.courses.add') || 'Add Course'}
|
||||
@@ -145,10 +152,18 @@
|
||||
<Table.Root class="w-full table-fixed">
|
||||
<Table.Header>
|
||||
<Table.Row>
|
||||
<Table.Head class="w-[28%]">{$t('courses.course_card.list_view.title')}</Table.Head>
|
||||
<Table.Head class="w-[44%]">{$t('courses.course_card.list_view.description')}</Table.Head>
|
||||
<Table.Head class="w-[10%]">{$t('courses.course_card.list_view.published')}</Table.Head>
|
||||
<Table.Head class={!$isStudentExperience ? 'w-[28%]' : 'w-[30%]'}
|
||||
>{$t('courses.course_card.list_view.title')}</Table.Head
|
||||
>
|
||||
<Table.Head class={!$isStudentExperience ? 'w-[44%]' : 'w-[48%]'}
|
||||
>{$t('courses.course_card.list_view.description')}</Table.Head
|
||||
>
|
||||
<Table.Head class={!$isStudentExperience ? 'w-[10%]' : 'w-[12%]'}
|
||||
>{$t('courses.course_card.list_view.published')}</Table.Head
|
||||
>
|
||||
{#if !$isStudentExperience}
|
||||
<Table.Head class="w-[8%]"></Table.Head>
|
||||
{/if}
|
||||
</Table.Row>
|
||||
</Table.Header>
|
||||
<Table.Body>
|
||||
@@ -163,6 +178,7 @@
|
||||
<Table.Cell>
|
||||
<CoursePublishBadge isPublished={item.course.status === 'ACTIVE'} />
|
||||
</Table.Cell>
|
||||
{#if !$isStudentExperience}
|
||||
<Table.Cell class="text-center">
|
||||
<Button
|
||||
variant="ghost"
|
||||
@@ -176,6 +192,7 @@
|
||||
<Trash2Icon size={16} />
|
||||
</Button>
|
||||
</Table.Cell>
|
||||
{/if}
|
||||
</Table.Row>
|
||||
{/each}
|
||||
</Table.Body>
|
||||
@@ -186,6 +203,7 @@
|
||||
{#each courseCards as course (course.id)}
|
||||
<CourseCard course={course as unknown as OrgCourses[number]} href={`/courses/${course.id}`}>
|
||||
{#snippet actions()}
|
||||
{#if !$isStudentExperience}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
@@ -197,6 +215,7 @@
|
||||
>
|
||||
<Trash2Icon size={16} />
|
||||
</Button>
|
||||
{/if}
|
||||
{/snippet}
|
||||
</CourseCard>
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user