@@ -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"
}
}
-