diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue index 8f781d0d6d9..8ac5bb5af59 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue @@ -56,6 +56,12 @@ :channelsLink="channelsLink" :topicsLink="topicsLink" /> + +
@@ -99,9 +105,9 @@
- - - + + + - - + + + + diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionSidePanel.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionSidePanel.vue index 53bc6e0202d..3379acbf796 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionSidePanel.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionSidePanel.vue @@ -105,7 +105,10 @@ }, methods: { handleClosePanel() { - if (this.workingResourcePool.length > this.activeResourcePool.length) { + if ( + this.workingResourcePool && + this.workingResourcePool.length > this.activeResourcePool.length + ) { this.showConfirmationModal = true; } else { this.$router.replace(this.closePanelRoute); diff --git a/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSelectionPage/SearchTools/LessonsSearchBox.vue b/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSelectionPage/SearchTools/LessonsSearchBox.vue index 0b400bf56f8..397621a4a4b 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSelectionPage/SearchTools/LessonsSearchBox.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSelectionPage/SearchTools/LessonsSearchBox.vue @@ -65,13 +65,16 @@ name: 'LessonsSearchBox', mixins: [commonCoreStrings], data() { + const { params, query } = this.$route; return { - searchTerm: this.$route.params.searchTerm || '', + searchTerm: params.searchTerm || query.search || '', }; }, computed: { searchTermHasChanged() { - return this.searchTerm !== this.$route.params.searchTerm; + const { params, query } = this.$route; + const newSearchTerm = params.searchTerm || query.search; + return this.searchTerm !== newSearchTerm; }, inputPlaceHolderStyle() { return { @@ -85,6 +88,7 @@ clearSearchTerm() { this.searchTerm = ''; this.$refs.searchinput.focus(); + this.$emit('clear'); }, search() { if (this.searchTerm !== '' && this.searchTermHasChanged) {