diff --git a/src/lib/components/Course/components/Navigation/index.svelte b/src/lib/components/Course/components/Navigation/index.svelte
index eff97a0a..886f8c2b 100644
--- a/src/lib/components/Course/components/Navigation/index.svelte
+++ b/src/lib/components/Course/components/Navigation/index.svelte
@@ -4,8 +4,9 @@
import { page } from '$app/stores';
import hotkeys from 'hotkeys-js';
import { browser } from '$app/environment';
+ import LockedIcon from 'carbon-icons-svelte/lib/Locked.svelte';
import HomeIcon from 'carbon-icons-svelte/lib/Home.svelte';
- import CheckmarkFilledIcon from 'carbon-icons-svelte/lib/CheckmarkFilled.svelte';
+ import CheckmarkOutline from 'carbon-icons-svelte/lib/CheckmarkOutline.svelte';
import SettingsIcon from 'carbon-icons-svelte/lib/Settings.svelte';
import ChevronLeftIcon from 'carbon-icons-svelte/lib/ChevronLeft.svelte';
import ChevronRightIcon from 'carbon-icons-svelte/lib/ChevronRight.svelte';
@@ -13,12 +14,9 @@
import PageNav from '$lib/components/PageNav/index.svelte';
import IconButton from '$lib/components/IconButton/index.svelte';
import Avatar from '$lib/components/Avatar/index.svelte';
- import {
- getNavItemRoute,
- getLessonsRoute,
- getLectureNo,
- } from '$lib/components/Course/function';
+ import { getNavItemRoute, getLessonsRoute, getLectureNo } from '$lib/components/Course/function';
+ import TextChip from '$lib/components/Chip/Text.svelte';
import RoleBasedSecurity from '$lib/components/RoleBasedSecurity/index.svelte';
import Settings from '../Settings/index.svelte';
import { settingsDialog } from '../Settings/store';
@@ -47,7 +45,7 @@
function getHref(item) {
return item.to;
- // return item.is_complete ? item.to : path || $page.url.pathname
+ // return item.is_unlocked ? item.to : path || $page.url.pathname
}
function handleSaveTitle() {
@@ -89,18 +87,18 @@
{
label: 'Overview',
to: getNavItemRoute($course.id),
- hideSortIcon: true,
+ hideSortIcon: true
},
{
label: 'Lessons',
to: getLessonsRoute($course.id),
hideSortIcon: false,
- isLecture: true,
+ isLecture: true
},
{
label: 'Attendance',
to: getNavItemRoute($course.id, 'attendance'),
- hideSortIcon: true,
+ hideSortIcon: true
},
{
label: 'Submissions',
@@ -108,12 +106,12 @@
hideSortIcon: true,
show() {
return !isStudent;
- },
+ }
},
{
label: 'Marks',
to: getNavItemRoute($course.id, 'marks'),
- hideSortIcon: true,
+ hideSortIcon: true
},
// {
// label: 'Scoreboard',
@@ -123,12 +121,12 @@
{
label: 'People',
to: getNavItemRoute($course.id, 'people'),
- hideSortIcon: true,
+ hideSortIcon: true
},
{
label: 'Certificates',
to: getNavItemRoute($course.id, 'certificates'),
- hideSortIcon: true,
+ hideSortIcon: true
},
{
label: 'Landing Page',
@@ -136,17 +134,15 @@
hideSortIcon: true,
show() {
return !isStudent;
- },
- },
+ }
+ }
];
}
-
+
{#if show}
@@ -155,9 +151,7 @@
- ($settingsDialog.open = !$settingsDialog.open)}
- >
+ ($settingsDialog.open = !$settingsDialog.open)}>
@@ -175,13 +169,11 @@
{#if navItem.isLecture}
{#each $lessons as item, index}
{
@@ -189,17 +181,23 @@
setTimeout(() => (show = false), 500);
}
}}
+ aria-disabled={!item.is_unlocked}
>
-
- {getLectureNo(index + 1)}
-
+
{item.title}
- {#if item.is_complete}
-
-
+ {#if !item.is_unlocked}
+
+
+
+ {:else if item.is_complete}
+
+
- {:else}
- 🔒
{/if}
{/each}
@@ -209,9 +207,7 @@
{/each}
-