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 0742782b0a0..9da48329a0b 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateQuizSection.vue @@ -43,7 +43,6 @@ tabsId="quizSectionTabs" class="section-tabs" :tabs="tabs" - :appearanceOverrides="{ padding: '0px', overflow: 'hidden' }" :activeTabId="activeSection ? activeSection.section_id : '' " @@ -108,36 +107,39 @@ tabsId="quizSectionTabs" :activeTabId="activeSection ? activeSection.section_id : ''" > -

{{ activeSection.section_id }}

- -
- - + + - - - - - + + + + + +
+
?
-

+

{{ noQuestionsInSection$() }}

@@ -146,6 +148,7 @@ {{ addQuestionsLabel$() }} @@ -587,10 +590,11 @@ } .question-mark-layout { - align-items: center; width: 2.5em; height: 2.5em; margin: auto; + line-height: 1.7; + text-align: center; background-color: #dbc3d4; } @@ -600,10 +604,6 @@ color: #996189; } - .no-question-style { - font-weight: bold; - } - .kgrid-alignment-style { padding-right: 1em; padding-left: 0; diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue index b2fc665f922..378ae423dc6 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue @@ -139,8 +139,8 @@ > @@ -175,7 +175,7 @@ :style="{ color: $themePalette.grey.v_700 }" >

{{ currentSection$() }} @@ -197,7 +197,7 @@ > + import { ref } from 'kolibri.lib.vueCompositionApi'; + import { get } from '@vueuse/core'; import { enhancedQuizManagementStrings } from 'kolibri-common/strings/enhancedQuizManagementStrings'; import useKResponsiveWindow from 'kolibri.coreVue.composables.useKResponsiveWindow'; import Draggable from 'kolibri.coreVue.components.Draggable'; @@ -264,15 +266,28 @@ deleteSection, } = injectQuizCreation(); + const selectedQuestionOrder = ref(get(activeSection).learners_see_fixed_order); + const numberOfQuestions = ref(get(activeSection).question_count); + const descriptionText = ref(get(activeSection).description); + const sectionTitle = ref(get(activeSection).section_title); + const { windowIsLarge, windowIsSmall } = useKResponsiveWindow(); return { + // useQuizCreation activeSection, allSections, updateSection, updateQuiz, deleteSection, + // Form models + selectedQuestionOrder, + numberOfQuestions, + descriptionText, + sectionTitle, + // Responsiveness windowIsLarge, windowIsSmall, + // i18n sectionSettings$, sectionTitle$, numberOfQuestionsLabel$, @@ -291,14 +306,6 @@ fixedOptionDescription$, }; }, - data() { - return { - selectedQuestionOrder: this.activeSection.value.learners_see_fixed_order, - numberOfQuestions: this.activeSection.value.question_count, - descriptionText: this.activeSection.value.description, - sectionTitle: this.activeSection.value.section_title, - }; - }, computed: { borderStyle() { return `border: 1px solid ${this.$themeTokens.fineLine}`; @@ -316,7 +323,7 @@ * @returns { QuizSection[] } */ sectionOrderList() { - return this.allSections.value; + return this.allSections; }, draggableStyle() { return { @@ -330,7 +337,7 @@ }, applySettings() { this.updateSection({ - section_id: this.activeSection.value.section_id, + section_id: this.activeSection.section_id, section_title: this.sectionTitle, description: this.descriptionText, question_count: this.numberOfQuestions, diff --git a/package.json b/package.json index 7ad6866acef..fa09dc73044 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "extends browserslist-config-kolibri" ], "volta": { - "node": "16.18.0" + "node": "16.18.0", + "yarn": "1.12.3" } } -