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 5b76b7d2621..a6c7c613d76 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue @@ -11,7 +11,7 @@ {{ /* selectFoldersOrExercises$() */ }} -
+

{{ selectFromBookmarks$() }}

@@ -74,7 +74,7 @@ @@ -113,7 +113,10 @@ const store = getCurrentInstance().proxy.$store; const route = computed(() => store.state.route); const topicId = computed(() => route.value.params.topic_id); - const bookMarksFlag = computed(() => route.value.query.bookmarks); + // We use this query parameter to decide if we want to show the Bookmarks Card + // or the actual exercises that are bookmarked and can be selected + // to be added to Quiz Section. + const showBookmarks = computed(() => route.value.query.showBookmarks); const { updateSection, activeSection, @@ -218,7 +221,7 @@ return channels.value; } */ - if (bookMarksFlag.value) { + if (showBookmarks.value) { return bookmarks.value .filter(item => item.kind === 'exercise') .map(item => ({ ...item, is_leaf: true })); @@ -263,7 +266,7 @@ workingResourcePool, addToWorkingResourcePool, removeFromWorkingResourcePool, - bookMarksFlag, + showBookmarks, }; }, props: { @@ -314,9 +317,12 @@ // }; }, getBookmarksLink() { + // Inject the showBookmarks parameter so that + // the resourceSelection component now renderes only the + // the exercises that are bookmarked for the Quiz selection. return { name: PageNames.QUIZ_SELECT_RESOURCES, - query: { bookmarks: true }, + query: { showBookmarks: true }, }; }, channelsLink() { @@ -341,7 +347,7 @@ this.$refs.textbox.focus(); }, contentLink(content) { - if (this.bookMarksFlag) { + if (this.showBookmarks) { return this.$route; } else if (!content.is_leaf) { return {