diff --git a/src/components/Apps/index.svelte b/src/components/Apps/index.svelte index 729df164..97b06e64 100644 --- a/src/components/Apps/index.svelte +++ b/src/components/Apps/index.svelte @@ -48,64 +48,41 @@ }); - -
+ selected={APPS_CONSTANTS.APPS.LIVE_CHAT === selectedApp} + > + selected={APPS_CONSTANTS.APPS.QANDA === selectedApp} + > + selected={APPS_CONSTANTS.APPS.NOTES === selectedApp} + > + selected={APPS_CONSTANTS.APPS.POLL === selectedApp} + >
@@ -124,3 +101,31 @@
{/if} + + diff --git a/src/components/Buttons/Close/index.svelte b/src/components/Buttons/Close/index.svelte index 11311f9b..1408df47 100644 --- a/src/components/Buttons/Close/index.svelte +++ b/src/components/Buttons/Close/index.svelte @@ -3,8 +3,9 @@ import IconButton from "../../IconButton/index.svelte"; export let onClick; + export let contained; - + diff --git a/src/components/Course/components/Lecture/Homework/EditMode.svelte b/src/components/Course/components/Lecture/Homework/EditMode.svelte index 6046acf1..aa3e9a9c 100644 --- a/src/components/Course/components/Lecture/Homework/EditMode.svelte +++ b/src/components/Course/components/Lecture/Homework/EditMode.svelte @@ -3,38 +3,34 @@ import AddFilled24 from "carbon-icons-svelte/lib/AddFilled24"; import TextField from "../../../../Form/TextField.svelte"; + import TextArea from "../../../../Form/TextArea.svelte"; import Checkbox from "../../../../Form/Checkbox.svelte"; import RadioItem from "../../../../Form/RadioItem.svelte"; import IconButton from "../../../../IconButton/index.svelte"; import Select from "../../../../Form/Select.svelte"; import PrimaryButton from "../../../../PrimaryButton/index.svelte"; + import { VARIANTS } from "../../../../PrimaryButton/constants"; + import QuestionContainer from "../../../../QuestionContainer/index.svelte"; import { QUESTION_TYPE, QUESTION_TYPES, + QUESTION_TEMPLATE, } from "../../../../Question/constants"; // import EditContent from "../../../../EditContent/index.svelte"; // import readme from "../../readme.js"; // let value = readme; - let questions = [ - { - id: 1, - title: "", - type: QUESTION_TYPE.RADIO, - options: [ - { - id: 1, - value: "", - }, - ], - }, - ]; + let task = { + title: "", + description: null, + }; + let questions = []; - function handleAddOption(id) { + function handleAddOption(questionId) { return () => { questions = questions.map((question) => { - if (question.id === id) { + if (question.id === questionId) { return { ...question, options: [ @@ -73,78 +69,108 @@ questions = [ ...questions, { + ...QUESTION_TEMPLATE, id: questions.length + 1, - title: "", - type: QUESTION_TYPE.RADIO, - options: [ - { - id: 1, - value: "", - }, - ], }, ]; } + + function handleRemoveQuestion(questionId) { + return () => { + questions = questions.filter((q) => q.id !== questionId); + }; + } -{#each questions as question} -
-
-
- -
-