diff --git a/src/lib/components/Course/components/Lesson/Exercise/EditMode.svelte b/src/lib/components/Course/components/Lesson/Exercise/EditMode.svelte index 7d32e6db..1380c290 100644 --- a/src/lib/components/Course/components/Lesson/Exercise/EditMode.svelte +++ b/src/lib/components/Course/components/Lesson/Exercise/EditMode.svelte @@ -10,6 +10,8 @@ handleAnswerSelect, addDynamicValue } from '../store/exercise'; + import { Select, SelectItem } from 'carbon-components-svelte'; + import TrashCanIcon from 'carbon-icons-svelte/lib/TrashCan.svelte'; import AddFilledIcon from 'carbon-icons-svelte/lib/AddFilled.svelte'; import CheckmarkFilledIcon from 'carbon-icons-svelte/lib/CheckmarkFilled.svelte'; @@ -24,7 +26,6 @@ import ErrorMessage from '$lib/components/ErrorMessage/index.svelte'; import PrimaryButton from '$lib/components/PrimaryButton/index.svelte'; import { VARIANTS } from '$lib/components/PrimaryButton/constants'; - import Select from '$lib/components/Form/Select.svelte'; import QuestionContainer from '$lib/components/QuestionContainer/index.svelte'; import DeleteConfirmationModal from './DeleteConfirmation.svelte'; import OrderModal from './OrderModal.svelte'; @@ -156,7 +157,7 @@ }} >
-
+
{#if typeof question.code === 'string'} diff --git a/src/lib/components/Course/components/Lesson/Exercise/UpdateDescription.svelte b/src/lib/components/Course/components/Lesson/Exercise/UpdateDescription.svelte index e2a798ab..0620eb7f 100644 --- a/src/lib/components/Course/components/Lesson/Exercise/UpdateDescription.svelte +++ b/src/lib/components/Course/components/Lesson/Exercise/UpdateDescription.svelte @@ -1,11 +1,12 @@ - -
+
{#if !preview} {#each tags as tag} { selectedTag = tag; diff --git a/src/lib/components/Course/components/Lesson/Exercises/index.svelte b/src/lib/components/Course/components/Lesson/Exercises/index.svelte index 5badc5dd..d3146971 100644 --- a/src/lib/components/Course/components/Lesson/Exercises/index.svelte +++ b/src/lib/components/Course/components/Lesson/Exercises/index.svelte @@ -182,8 +182,13 @@ Exercise

No exercises added for this lesson

- Share your knowledge with the world by creating engaging exercises. Add an exercise - now. + {#if isStudent} + Your tutor hasn't assigned any exercise to this lesson. For the main time, you can + chill with the big boys :) + {:else} + Share your knowledge with the world by creating engaging exercises. Add an exercise + now. + {/if}

diff --git a/src/lib/components/CourseLandingPage/components/Editor/index.svelte b/src/lib/components/CourseLandingPage/components/Editor/index.svelte index a2a67b08..7c49e55f 100644 --- a/src/lib/components/CourseLandingPage/components/Editor/index.svelte +++ b/src/lib/components/CourseLandingPage/components/Editor/index.svelte @@ -134,14 +134,6 @@ const link = `${window.location.origin}/course/${course.slug}`; window.open(link, '_blank'); } - - async function handlePublish() { - loading = true; - await updateCourse(courseId, undefined, { - is_published: true - }); - loading = false; - }