From 913a6a3cb834754bcb56167547f1859fbe881c4f Mon Sep 17 00:00:00 2001 From: Otodi Allan Date: Wed, 23 Aug 2023 11:13:43 +0300 Subject: [PATCH 01/30] added translatable text --- .../plan/CreateExamPage/CreateQuizSection.vue | 208 +++++++++++++++++- 1 file changed, 207 insertions(+), 1 deletion(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue index b73b58e942..4c18ccf647 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue @@ -70,8 +70,193 @@
+
+ + +
+
+

+ +

+
+ +
+

{{ $tr('selectAllLabel') }}

+
+
+
+ + +
+ + +
+ + +
+
+ + + + + + + + +
+
+
+ +
+ + + + +
-
+ +
? @@ -109,6 +294,7 @@ data() { return { tabs: [{ id: '', label: this.$tr('sectionLabel') }], + isQuestionAvailable: true, }; }, computed: { @@ -145,6 +331,26 @@ context: 'This message indicates that more than one section can be added when creating a quiz.', }, + questionPhrase: { + message: 'Select the word that has the following vowel sound.', + context: 'Placholder for the question', + }, + questionSubtitle: { + message: ' Short , [e]', + context: 'Placholder content for the question description', + }, + chooseQuestionLabel: { + message: 'Choose 1 answer:', + context: 'Label to indicate the question to be chosen', + }, + addAnswer: { + message: 'Add answer', + context: 'Button text to indicate that more answers can be added to the question.', + }, + selectAllLabel: { + message: 'Select all', + context: 'Label indicates that all available options can be chosen at once.', + }, }, }; From 3bc8675916541318fa3846484b5e517c69707546 Mon Sep 17 00:00:00 2001 From: Otodi Allan Date: Wed, 23 Aug 2023 11:20:43 +0300 Subject: [PATCH 02/30] imported components into createquizsection --- .../plan/CreateExamPage/CreateQuizSection.vue | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue index 4c18ccf647..208f3c5578 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue @@ -287,9 +287,17 @@ import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings'; import commonCoach from '../../common'; + import AccordionContainer from './AccordionContainer.vue'; + import AccordionItem from './AccordionItem.vue'; + import AnswerOption from './AnswerOption.vue'; export default { name: 'CreateQuizSection', + components: { + AccordionContainer, + AccordionItem, + AnswerOption, + }, mixins: [commonCoreStrings, commonCoach], data() { return { @@ -304,6 +312,49 @@ paddingRight: '0px', }; }, + placeholderList() { + return [ + { + id: 1, + title: 'question 1', + visible: false, + placeholderAnswers: [ + { + id: 1, + option: 'bit', + }, + { + id: 2, + option: 'but', + }, + { + id: 3, + option: 'bite', + }, + { + id: 4, + option: 'bait', + }, + { + id: 5, + option: 'bet', + }, + ], + }, + { + id: 2, + title: 'question 2', + visible: false, + placeholderAnswers: [], + }, + { + id: 3, + title: 'question 3', + visible: false, + placeholderAnswers: [], + }, + ]; + }, }, $trs: { sectionLabel: { From 58c69fe0943ccbb214b0fb108074fa32a8e71134 Mon Sep 17 00:00:00 2001 From: Otodi Allan Date: Wed, 23 Aug 2023 11:31:38 +0300 Subject: [PATCH 03/30] added draggable component and styling --- .../plan/CreateExamPage/CreateQuizSection.vue | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue index 208f3c5578..42c158b80a 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue @@ -147,7 +147,6 @@
- import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings'; + import DragHandle from 'kolibri.coreVue.components.DragHandle'; import commonCoach from '../../common'; import AccordionContainer from './AccordionContainer.vue'; import AccordionItem from './AccordionItem.vue'; @@ -297,6 +297,7 @@ AccordionContainer, AccordionItem, AnswerOption, + DragHandle, }, mixins: [commonCoreStrings, commonCoach], data() { @@ -480,4 +481,55 @@ text-align: left; } + .left-column-alignment-style { + display: inline-flex; + margin-left: 35px; + } + + .right-alignment-style { + float: right; + margin-top: 10px; + } + + .drag-icon { + margin-top: 14px; + } + + .accordion-detail-container { + margin-left: 35px; + } + + .float-item-left-style { + float: right; + margin-top: 10px; + margin-right: 10px; + } + + .reduce-chervon-spacing { + padding: 0; + margin: 0; + font-size: 16px; + } + + .icon-container { + display: flex; + flex-direction: column; + align-items: center; + padding: 0; + margin: 0; + } + + .choose-question { + height: 40px; + background-color: #fafafa; + border: 1px solid #dedede; + border-radius: 2px; + } + + .space-content { + margin: 8px; + font-size: 14px; + font-weight: 700; + } + From 2743ce4df966a50b5d87ad4e9ffd1935a4ca2a11 Mon Sep 17 00:00:00 2001 From: Otodi Allan Date: Wed, 23 Aug 2023 11:34:34 +0300 Subject: [PATCH 04/30] removed unused styles --- .../views/plan/CreateExamPage/CreateQuizSection.vue | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue index 42c158b80a..4bdb59595e 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue @@ -445,18 +445,6 @@ color: #996189; } - .active-section { - padding: 14px; - color: #996189; - border-bottom: 2px solid #996189; - } - - .add-section-button { - float: right; - margin-bottom: -8px; - background-color: #f5f5f5; - } - .add-padding { padding-top: 15px; } From 8f24e68682167c01115d42711e9248cd702660a6 Mon Sep 17 00:00:00 2001 From: Otodi Allan Date: Wed, 23 Aug 2023 11:41:21 +0300 Subject: [PATCH 05/30] removed = on the name of the slot --- .../assets/src/views/plan/CreateExamPage/CreateQuizSection.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue index 4bdb59595e..38d1650d64 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue @@ -189,7 +189,7 @@