From ef1f322156762381d2ad9584b847fda1bb225c9b Mon Sep 17 00:00:00 2001 From: Alex Velez Date: Fri, 28 Feb 2025 12:22:34 -0500 Subject: [PATCH] Always show clear selection notice on choose questions manually checkbox --- .../PreviewSelectedResources/index.vue | 10 ++-------- .../subPages/QuestionsSettings.vue | 18 ++---------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/PreviewSelectedResources/index.vue b/kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/PreviewSelectedResources/index.vue index 80b9634661..ee9b171d71 100644 --- a/kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/PreviewSelectedResources/index.vue +++ b/kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/PreviewSelectedResources/index.vue @@ -62,7 +62,7 @@ { return workingIsChoosingManually.value === props.settings?.isChoosingManually; }); - const clearSelectionNotice = computed(() => { - if (!props.selectedResources.length && !props.selectedQuestions.length) { - return null; - } - return clearSelectionNotice$(); - }); onMounted(() => { if (!props.contentId) { @@ -205,7 +199,7 @@ exerciseQuestions, workingIsChoosingManually, isSaveSettingsDisabled, - clearSelectionNotice, + clearSelectionNotice$, saveSettings, saveSettingsAction$, selectFromChannels$, diff --git a/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/sidePanels/QuizResourceSelection/subPages/QuestionsSettings.vue b/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/sidePanels/QuizResourceSelection/subPages/QuestionsSettings.vue index c221d33f93..1a01cc5a52 100644 --- a/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/sidePanels/QuizResourceSelection/subPages/QuestionsSettings.vue +++ b/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/sidePanels/QuizResourceSelection/subPages/QuestionsSettings.vue @@ -45,7 +45,7 @@ @@ -145,19 +145,13 @@ }); const questionCountIsEditable = computed(() => !workingIsChoosingManually.value); - const clearSelectionNotice = computed(() => { - if (!props.selectedResources.length && !props.selectedQuestions.length) { - return null; - } - return clearSelectionNotice$(); - }); return { // eslint-disable-next-line vue/no-unused-properties prevRoute, questionCount: workingQuestionCount, isChoosingManually: workingIsChoosingManually, - clearSelectionNotice, + clearSelectionNotice$, questionCountIsEditable, maxQuestions: computed(() => props.settings.maxQuestions), maxNumberOfQuestions$, @@ -187,14 +181,6 @@ type: Boolean, default: false, }, - selectedQuestions: { - type: Array, - required: true, - }, - selectedResources: { - type: Array, - required: true, - }, }, beforeRouteEnter(to, from, next) { next(vm => {