From e57bd4a4bf4fb86ef2ffe5d26816971ccab44c9f Mon Sep 17 00:00:00 2001 From: emmanuel Date: Thu, 5 Oct 2023 14:41:37 +0000 Subject: [PATCH 1/6] CLASSROOMIO-T-191:Created the unauthorized page CLASSROOMIO-T-206:deleted the route Merge branch 'main' into CLASSROOMIO-T-191 CLASSROOMIO-T-191:Created the unauthorized page Co-authored-by: Ifeanyi Nwosu Merge-request: CLASSROOMIO-MR-87 Merged-by: Best Admin --- src/lib/components/Unauthorized/index.svelte | 28 ++++++++++++++++++++ static/unauthorized.svg | 10 +++++++ 2 files changed, 38 insertions(+) create mode 100644 src/lib/components/Unauthorized/index.svelte create mode 100644 static/unauthorized.svg diff --git a/src/lib/components/Unauthorized/index.svelte b/src/lib/components/Unauthorized/index.svelte new file mode 100644 index 00000000..e0afe89d --- /dev/null +++ b/src/lib/components/Unauthorized/index.svelte @@ -0,0 +1,28 @@ + + +
+ unauthorized +

Page not found

+

+ The page you are trying to access does not exist +

+ + goto('https://www.classroomio.com')} /> + goto('https://help.classroomio.com/')} + /> +
+ + diff --git a/static/unauthorized.svg b/static/unauthorized.svg new file mode 100644 index 00000000..5b1b18ca --- /dev/null +++ b/static/unauthorized.svg @@ -0,0 +1,10 @@ + + + + + + + + + + From 849154711bb090b05c9adb246d45070e72243e11 Mon Sep 17 00:00:00 2001 From: tunny17 Date: Fri, 6 Oct 2023 09:06:03 +0000 Subject: [PATCH 2/6] CLASSROOMIO-T-193: Exercise Templates for HTML CLASSROOMIO-T-193: Convert to single quotes CLASSROOMIO-T-193: Resolved Feedbacks landing page improvement add spacing on mobile for notes in lms little bug fixes in lms CLASSROOMIO-T-193: return the array Simplify template generation CLASSROOMIO-T-193: Styling improvement CLASSROOMIO-T-193: Exercise Templates for HTML Co-authored-by: Rotimi Best Co-authored-by: Tunji Adeyemi Merge-request: CLASSROOMIO-MR-88 Merged-by: Best Admin --- .../Lesson/Exercise/EditMode.svelte | 20 +- .../Lesson/Exercise/UpdateDescription.svelte | 7 +- .../Lesson/Exercises/NewExerciseModal.svelte | 3 +- .../components/Lesson/Exercises/index.svelte | 9 +- .../components/Editor/index.svelte | 14 -- src/lib/components/PageBody/index.svelte | 2 + src/lib/mocks/html/001_html_elements.ts | 123 +++++++--- src/lib/mocks/html/002_html_attributes.ts | 128 ++++++---- src/lib/mocks/html/003_html_headings.ts | 117 +++++++++ src/lib/mocks/html/004_html_paragraph.ts | 119 +++++++++ src/lib/mocks/html/005_html_styles.ts | 120 ++++++++++ src/lib/mocks/html/006_html_formatting.ts | 224 +++++++++++++++++ src/lib/mocks/html/007_html_quotations.ts | 224 +++++++++++++++++ src/lib/mocks/html/008_html_comments.ts | 220 +++++++++++++++++ src/lib/mocks/html/009_html_colors.ts | 224 +++++++++++++++++ src/lib/mocks/html/010_html_css.ts | 129 ++++++++++ src/lib/mocks/html/011_html_links.ts | 225 ++++++++++++++++++ src/lib/mocks/html/012_html_images.ts | 135 +++++++++++ src/lib/mocks/html/013_html_favicon.ts | 137 +++++++++++ src/lib/mocks/html/014_html_pageTitle.ts | 135 +++++++++++ src/lib/mocks/html/015_html_tables.ts | 137 +++++++++++ src/lib/mocks/html/016_html_lists.ts | 130 ++++++++++ src/lib/mocks/html/017_html_blocks.ts | 122 ++++++++++ src/lib/mocks/html/018_html_classes.ts | 146 ++++++++++++ src/lib/mocks/html/019_html_id.ts | 129 ++++++++++ src/lib/mocks/html/020_html_iframes.ts | 181 ++++++++++++++ src/lib/mocks/html/index.ts | 58 ++++- src/lib/mocks/index.ts | 55 ++--- src/lib/mocks/utils.ts | 11 + src/lib/utils/services/courses/index.ts | 2 +- .../courses/[id]/attendance/+page.svelte | 9 +- src/routes/courses/[id]/marks/+page.svelte | 8 +- src/routes/org/[slug]/settings/+page.svelte | 3 + 33 files changed, 3159 insertions(+), 147 deletions(-) create mode 100644 src/lib/mocks/html/003_html_headings.ts create mode 100644 src/lib/mocks/html/004_html_paragraph.ts create mode 100644 src/lib/mocks/html/005_html_styles.ts create mode 100644 src/lib/mocks/html/006_html_formatting.ts create mode 100644 src/lib/mocks/html/007_html_quotations.ts create mode 100644 src/lib/mocks/html/008_html_comments.ts create mode 100644 src/lib/mocks/html/009_html_colors.ts create mode 100644 src/lib/mocks/html/010_html_css.ts create mode 100644 src/lib/mocks/html/011_html_links.ts create mode 100644 src/lib/mocks/html/012_html_images.ts create mode 100644 src/lib/mocks/html/013_html_favicon.ts create mode 100644 src/lib/mocks/html/014_html_pageTitle.ts create mode 100644 src/lib/mocks/html/015_html_tables.ts create mode 100644 src/lib/mocks/html/016_html_lists.ts create mode 100644 src/lib/mocks/html/017_html_blocks.ts create mode 100644 src/lib/mocks/html/018_html_classes.ts create mode 100644 src/lib/mocks/html/019_html_id.ts create mode 100644 src/lib/mocks/html/020_html_iframes.ts 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; - }