feat: certification rules, content sanitization, handle draft course updates and reset content, better redis logging
This commit is contained in:
+13
-11
@@ -64,15 +64,17 @@
|
||||
<span>{$t('course.navItems.nav_content')}</span>
|
||||
|
||||
<div class="ml-auto flex items-center gap-1">
|
||||
<Plus
|
||||
size={20}
|
||||
class="rounded-full p-1"
|
||||
onclick={(event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
openContentModal(id);
|
||||
}}
|
||||
/>
|
||||
{#if !isStudent}
|
||||
<Plus
|
||||
size={20}
|
||||
class="rounded-full p-1"
|
||||
onclick={(event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
openContentModal(id);
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
</a>
|
||||
{/snippet}
|
||||
@@ -85,8 +87,8 @@
|
||||
{id}
|
||||
{isStudent}
|
||||
className="mt-1"
|
||||
onOpenContentModal={(sectionId) => openContentModal(id, sectionId)}
|
||||
onEditSection={(sectionId) => openSectionEditor(id, sectionId)}
|
||||
onOpenContentModal={isStudent ? undefined : (sectionId) => openContentModal(id, sectionId)}
|
||||
onEditSection={isStudent ? undefined : (sectionId) => openSectionEditor(id, sectionId)}
|
||||
/>
|
||||
</Sidebar.Group>
|
||||
|
||||
|
||||
+2
-1
@@ -26,6 +26,7 @@
|
||||
let { path, id, isStudent = false, className = '', onOpenContentModal }: Props = $props();
|
||||
|
||||
const contentData = $derived(getCourseContent(courseApi.course));
|
||||
const canOpenContentModal = $derived(Boolean(onOpenContentModal) && !isStudent);
|
||||
</script>
|
||||
|
||||
<Sidebar.MenuSub class={className}>
|
||||
@@ -42,7 +43,7 @@
|
||||
<span class="flex-1 truncate">{section.title}</span>
|
||||
|
||||
<div class="ml-auto flex items-center gap-1">
|
||||
{#if onOpenContentModal}
|
||||
{#if canOpenContentModal}
|
||||
<IconButton
|
||||
variant="ghost-outline"
|
||||
size="icon-xs"
|
||||
|
||||
+2
-2
@@ -285,8 +285,8 @@
|
||||
{id}
|
||||
{isStudent}
|
||||
className="mt-1 ml-2"
|
||||
onOpenContentModal={(sectionId) => openContentModal(id, sectionId)}
|
||||
onEditSection={(sectionId) => openSectionEditor(id, sectionId)}
|
||||
onOpenContentModal={isStudent ? undefined : (sectionId) => openContentModal(id, sectionId)}
|
||||
onEditSection={isStudent ? undefined : (sectionId) => openSectionEditor(id, sectionId)}
|
||||
/>
|
||||
{/if}
|
||||
</Sidebar.MenuItem>
|
||||
|
||||
Reference in New Issue
Block a user