diff --git a/kolibri/plugins/coach/assets/src/app.js b/kolibri/plugins/coach/assets/src/app.js index db93287ede..c9ec690ceb 100644 --- a/kolibri/plugins/coach/assets/src/app.js +++ b/kolibri/plugins/coach/assets/src/app.js @@ -63,7 +63,7 @@ class CoachToolsModule extends KolibriApp { PageNames.QUIZ_SELECT_PRACTICE_QUIZ, PageNames.QUIZ_SELECT_RESOURCES, PageNames.QUIZ_SECTION_ORDER, - PageNames.BOOK_MARKED_RESOURCES, + PageNames.QUIZ_BOOK_MARKED_RESOURCES, PageNames.QUIZ_LEARNER_REPORT, ]; // If we're navigating to the same page for a quiz summary page, don't set loading @@ -100,12 +100,12 @@ class CoachToolsModule extends KolibriApp { PageNames.LESSON_CREATION_ROOT, PageNames.LESSON_SUMMARY, PageNames.LESSON_EDIT_DETAILS, - PageNames.SELECTION_ROOT, - PageNames.SELECTION, - PageNames.SELECTION_SEARCH, + PageNames.LESSON_RESOURCE_SELECTION_ROOT, + PageNames.LESSON_RESOURCE_SELECTION, + PageNames.LESSON_RESOURCE_SELECTION_SEARCH, PageNames.LESSON_SELECTION_BOOKMARKS, PageNames.LESSON_SELECTION_BOOKMARKS_MAIN, - PageNames.SELECTION_CONTENT_PREVIEW, + PageNames.LESSON_RESOURCE_SELECTION_CONTENT_PREVIEW, PageNames.RESOURCE_CONTENT_PREVIEW, PageNames.GROUP_SUMMARY, PageNames.GROUP_ENROLL, diff --git a/kolibri/plugins/coach/assets/src/constants/index.js b/kolibri/plugins/coach/assets/src/constants/index.js index 5b470af313..b76007fd61 100644 --- a/kolibri/plugins/coach/assets/src/constants/index.js +++ b/kolibri/plugins/coach/assets/src/constants/index.js @@ -1,79 +1,66 @@ export const PageNames = { + /** Class Summary */ HOME_PAGE: 'HomePage', // make sure this matches the Coach 'Home' page name - REPORTS_PAGE: 'REPORTS_PAGE', - COACH_CLASS_LIST_PAGE: 'COACH_CLASS_LIST_PAGE', - NEW_COACH_PAGES: 'NEW_COACH_PAGES', - EXAMS_ROOT: 'EXAMS_ROOT', EXAM_CREATION_ROOT: 'EXAM_CREATION_ROOT', - EXAM_SUMMARY: 'EXAM_SUMMARY', - /** Newly added routes */ + /** Exams and quizzes */ + EXAMS_ROOT: 'EXAMS_ROOT', + EXAM_SUMMARY: 'EXAM_SUMMARY', + QUIZ_PREVIEW: 'QUIZ_PREVIEW', + QUIZ_LEARNER_PAGE_ROOT: 'QUIZ_LEARNER_PAGE_ROOT', + QUIZ_LEARNER_REPORT: 'QUIZ_LEARNER_REPORT', QUIZ_SECTION_EDITOR: 'QUIZ_SECTION_EDITOR', QUIZ_REPLACE_QUESTIONS: 'QUIZ_REPLACE_QUESTIONS', QUIZ_SELECT_RESOURCES: 'QUIZ_SELECT_RESOURCES', QUIZ_SELECT_PRACTICE_QUIZ: 'QUIZ_SELECT_PRACTICE_QUIZ', QUIZ_SECTION_ORDER: 'QUIZ_SECTION_ORDER', - QUIZ_LEARNER_REPORT: 'QUIZ_LEARNER_REPORT', - QUIZ_PREVIEW: 'QUIZ_PREVIEW', QUIZ_QUESTION_PAGE_ROOT: 'QUIZ_QUESTION_PAGE_ROOT', QUIZ_QUESTION_REPORT: 'QUIZ_QUESTION_REPORT', - BOOK_MARKED_RESOURCES: 'BOOK_MARKED_RESOURCES', - - EXAM_REPORT: 'EXAM_REPORT', - EXAM_REPORT_DETAIL: 'EXAM_REPORT_DETAIL', - EXAM_REPORT_DETAIL_ROOT: 'EXAM_REPORT_DETAIL_ROOT', - LESSON_EXERCISE_LEARNER_PAGE_ROOT: 'LESSON_EXERCISE_LEARNER_PAGE_ROOT', - LESSON_EXERCISE_LEARNER_REPORT: 'LESSON_EXERCISE_LEARNER_REPORT', - REPORTS_GROUP_REPORT_LESSON_EXERCISE_LEARNER_PAGE_ROOT: - 'REPORTS_GROUP_REPORT_LESSON_EXERCISE_LEARNER_PAGE_ROOT', - LESSON_LEARNER_EXERCISE_PAGE_ROOT: 'LESSON_LEARNER_EXERCISE_PAGE_ROOT', - LESSON_LEARNER_EXERCISE_REPORT: 'LESSON_LEARNER_EXERCISE_REPORT', - REPORTS_GROUP_LEARNER_REPORT_QUIZ_PAGE_ROOT: 'REPORTS_GROUP_LEARNER_REPORT_QUIZ_PAGE_ROOT', - QUIZ_LEARNER_PAGE_ROOT: 'QUIZ_LEARNER_PAGE_ROOT', - REPORTS_LEARNER_REPORT_QUIZ_PAGE_ROOT: 'REPORTS_LEARNER_REPORT_QUIZ_PAGE_ROOT', - REPORTS_QUIZ_LEARNER_PAGE_ROOT: 'REPORTS_QUIZ_LEARNER_PAGE_ROOT', - LESSON_EXERCISE_QUESTION_PAGE_ROOT: 'LESSON_EXERCISE_QUESTION_PAGE_ROOT', - REPORTS_GROUP_REPORT_QUIZ_QUESTION_PAGE_ROOT: 'REPORTS_GROUP_REPORT_QUIZ_QUESTION_PAGE_ROOT', + QUIZ_BOOK_MARKED_RESOURCES: 'QUIZ_BOOK_MARKED_RESOURCES', /* Lessons */ + LESSONS_ROOT: 'LESSONS_ROOT', + LESSONS_ROOT_BETTER: 'LESSONS_ROOT_BETTER', + LESSON_SUMMARY: 'LESSON_SUMMARY', LESSON_CREATION_ROOT: 'LESSON_CREATION_ROOT', LESSON_CREATION_ROOT_BETTER: 'LESSON_CREATION_ROOT_BETTER', - LESSON_SUMMARY: 'LESSON_SUMMARY', - RESOURCE_USER_REPORT: 'RESOURCE_USER_REPORT', - RESOURCE_USER_REPORT_ROOT: 'RESOURCE_USER_REPORT_ROOT', RESOURCE_CONTENT_PREVIEW: 'RESOURCE_CONTENT_PREVIEW', // exclusively a route name - SELECTION_ROOT: 'SELECTION_ROOT', - SELECTION: 'SELECTION', - SELECTION_SEARCH: 'SELECTION_SEARCH', - SELECTION_CONTENT_PREVIEW: 'SELECTION_CONTENT_PREVIEW', // exclusively a route name - CONTENT_PREVIEW: 'CONTENT_PREVIEW', + LESSON_RESOURCE_SELECTION_ROOT: 'LESSON_RESOURCE_SELECTION_ROOT', + LESSON_RESOURCE_SELECTION: 'LESSON_RESOURCE_SELECTION', + LESSON_RESOURCE_SELECTION_SEARCH: 'LESSON_RESOURCE_SELECTION_SEARCH', + LESSON_RESOURCE_SELECTION_CONTENT_PREVIEW: 'LESSON_RESOURCE_SELECTION_CONTENT_PREVIEW', // exclusively a route name + LESSON_CONTENT_PREVIEW: 'LESSON_CONTENT_PREVIEW', LESSON_SELECTION_BOOKMARKS: 'LESSON_SELECTION_BOOKMARKS', LESSON_SELECTION_BOOKMARKS_MAIN: 'LESSON_SELECTION_BOOKMARKS_MAIN', LESSON_EDIT_DETAILS: 'LESSON_EDIT_DETAILS', LESSON_SELECT_RESOURCES: 'LESSON_SELECT_RESOURCES', LESSON_PREVIEW_SELECTED_RESOURCES: 'LESSON_PREVIEW_SELECTED_RESOURCES', LESSON_PREVIEW_RESOURCE: 'LESSON_PREVIEW_RESOURCE', - LESSON_RESOURCE_LEARNERS_REPORT: 'LESSON_RESOURCE_LEARNERS_REPORT', LESSON_LEARNER_REPORT: 'LESSON_LEARNER_REPORT', + LESSON_RESOURCE_LEARNERS_REPORT: 'LESSON_RESOURCE_LEARNERS_REPORT', + LESSON_EXERCISE_LEARNER_PAGE_ROOT: 'LESSON_EXERCISE_LEARNER_PAGE_ROOT', LESSON_EXERCISE_LEARNERS_REPORT: 'LESSON_EXERCISE_LEARNERS_REPORT', + LESSON_EXERCISE_LEARNER_REPORT: 'LESSON_EXERCISE_LEARNER_REPORT', LESSON_EXERCISE_QUESTIONS_REPORT: 'LESSON_EXERCISE_QUESTIONS_REPORT', + LESSON_EXERCISE_QUESTION_PAGE_ROOT: 'LESSON_EXERCISE_QUESTION_PAGE_ROOT', LESSON_EXERCISE_QUESTION_REPORT: 'LESSON_EXERCISE_QUESTION_REPORT', + LESSON_LEARNER_EXERCISE_PAGE_ROOT: 'LESSON_LEARNER_EXERCISE_PAGE_ROOT', + LESSON_LEARNER_EXERCISE_REPORT: 'LESSON_LEARNER_EXERCISE_REPORT', - LESSONS_ROOT: 'LESSONS_ROOT', - LESSONS_ROOT_BETTER: 'LESSONS_ROOT_BETTER', - + /* Learners */ LEARNERS_ROOT: 'LEARNERS_ROOT', LEARNER_SUMMARY: 'LEARNER_SUMMARY', LEARNER_LESSON_REPORT: 'LEARNER_LESSON_REPORT', + /** Groups */ GROUPS_ROOT: 'GROUPS_ROOT', GROUP_SUMMARY: 'GROUP_SUMMARY', GROUP_ENROLL: 'GROUP_ENROLL', + GROUP_EXAM_SUMMARY: 'GROUP_EXAM_SUMMARY', GROUP_LESSON_SUMMARY: 'GROUP_LESSON_SUMMARY', GROUP_LESSON_LEARNER: 'GROUP_LESSON_LEARNER', GROUP_LESSON_EXERCISE_QUESTIONS_REPORT: 'GROUP_LESSON_EXERCISE_QUESTIONS_REPORT', GROUP_LESSON_EXERCISE_LEARNER_REPORT: 'GROUP_LESSON_EXERCISE_LEARNER_REPORT', - GROUP_EXAM_SUMMARY: 'GROUP_EXAM_SUMMARY', }; export const GroupModals = { @@ -91,9 +78,7 @@ export const ViewMoreButtonStates = { }; export const pageNameToModuleMap = { - [PageNames.EXAM_REPORT_DETAIL]: 'examReportDetail', [PageNames.LESSONS_ROOT]: 'lessonsRoot', - [PageNames.RESOURCE_USER_REPORT]: 'exerciseDetail', // Omitting modules for resource selection, exam creation, and preview to prevent // default module state resetting behavior. }; diff --git a/kolibri/plugins/coach/assets/src/modules/lessonResources/handlers.js b/kolibri/plugins/coach/assets/src/modules/lessonResources/handlers.js index 3adef3c93d..f431a639c7 100644 --- a/kolibri/plugins/coach/assets/src/modules/lessonResources/handlers.js +++ b/kolibri/plugins/coach/assets/src/modules/lessonResources/handlers.js @@ -74,9 +74,9 @@ async function showResourceSelectionPage(store, params) { store.commit('lessonSummary/resources/SET_SEARCH_RESULTS', params.searchResults); } store.commit('SET_PAGE_NAME', pageName); - if (pageName === PageNames.SELECTION_SEARCH) { + if (pageName === PageNames.LESSON_RESOURCE_SELECTION_SEARCH) { store.commit('SET_TOOLBAR_ROUTE', { - name: PageNames.SELECTION_ROOT, + name: PageNames.LESSON_RESOURCE_SELECTION_ROOT, }); } else { store.commit('SET_TOOLBAR_ROUTE', { @@ -107,7 +107,7 @@ export function showLessonResourceSelectionRootPage(store, params) { classId: params.classId, lessonId: params.lessonId, contentList: channelContentList, - pageName: PageNames.SELECTION_ROOT, + pageName: PageNames.LESSON_RESOURCE_SELECTION_ROOT, descendantCounts, }); }, @@ -130,7 +130,7 @@ export function showLessonResourceSelectionTopicPage(store, params) { classId: params.classId, lessonId: params.lessonId, contentList: childNodes, - pageName: PageNames.SELECTION, + pageName: PageNames.LESSON_RESOURCE_SELECTION, descendantCounts, ancestors: [...topicNode.ancestors, topicNode], }); @@ -150,7 +150,7 @@ export function showLessonResourceBookmarks(store, params) { classId: params.classId, lessonId: params.lessonId, bookmarksList: childNodes, - pageName: PageNames.SELECTION, + pageName: PageNames.LESSON_RESOURCE_SELECTION, ancestors: [...topicNode.ancestors, topicNode], }); }); @@ -222,7 +222,7 @@ export async function showLessonSelectionContentPreview(store, params, query = { const { searchTerm, ...otherQueryParams } = query; if (searchTerm) { store.commit('SET_TOOLBAR_ROUTE', { - name: PageNames.SELECTION_SEARCH, + name: PageNames.LESSON_RESOURCE_SELECTION_SEARCH, params: { searchTerm, }, @@ -230,7 +230,7 @@ export async function showLessonSelectionContentPreview(store, params, query = { }); } else { store.commit('SET_TOOLBAR_ROUTE', { - name: PageNames.SELECTION, + name: PageNames.LESSON_RESOURCE_SELECTION, params: { topicId: contentNode.parent, }, @@ -273,7 +273,7 @@ function _prepLessonContentPreview(store, classId, lessonId, contentId) { }); } - store.commit('SET_PAGE_NAME', PageNames.CONTENT_PREVIEW); + store.commit('SET_PAGE_NAME', PageNames.LESSON_CONTENT_PREVIEW); return contentNode; }, error => { @@ -298,7 +298,7 @@ export function showLessonResourceSearchPage(store, params, query = {}) { lessonId: params.lessonId, contentList: results.results, searchResults: results, - pageName: PageNames.SELECTION_SEARCH, + pageName: PageNames.LESSON_RESOURCE_SELECTION_SEARCH, }); }); }); diff --git a/kolibri/plugins/coach/assets/src/modules/pluginModule.js b/kolibri/plugins/coach/assets/src/modules/pluginModule.js index 9a3e9b09c6..44539241d8 100644 --- a/kolibri/plugins/coach/assets/src/modules/pluginModule.js +++ b/kolibri/plugins/coach/assets/src/modules/pluginModule.js @@ -114,7 +114,7 @@ export default { // If going from Lesson Summary to something other than Resource Selection, reset if ( fromRoute.name === PageNames.LESSON_SUMMARY && - ![PageNames.SELECTION_ROOT, PageNames.LESSON_SUMMARY].includes(toRoute.name) + ![PageNames.LESSON_RESOURCE_SELECTION_ROOT, PageNames.LESSON_SUMMARY].includes(toRoute.name) ) { return store.dispatch('lessonSummary/resetLessonSummaryState'); } diff --git a/kolibri/plugins/coach/assets/src/routes/lessonsRoutes.js b/kolibri/plugins/coach/assets/src/routes/lessonsRoutes.js index 93c20fc9ca..374b0af3b4 100644 --- a/kolibri/plugins/coach/assets/src/routes/lessonsRoutes.js +++ b/kolibri/plugins/coach/assets/src/routes/lessonsRoutes.js @@ -157,7 +157,7 @@ export default [ component: LessonEditDetailsPage, }, { - name: PageNames.SELECTION_ROOT, + name: PageNames.LESSON_RESOURCE_SELECTION_ROOT, path: CLASS + LESSON + SELECTION, component: LessonResourceSelectionPage, handler(toRoute) { @@ -165,7 +165,7 @@ export default [ }, }, { - name: PageNames.SELECTION, + name: PageNames.LESSON_RESOURCE_SELECTION, path: CLASS + LESSON + SELECTION + TOPIC, component: LessonResourceSelectionPage, handler(toRoute, fromRoute) { @@ -174,7 +174,7 @@ export default [ // called whether or not a change is made, because we don't track changes // enough steps back. let preHandlerPromise; - if (fromRoute.name === PageNames.SELECTION_CONTENT_PREVIEW) { + if (fromRoute.name === PageNames.LESSON_RESOURCE_SELECTION_CONTENT_PREVIEW) { preHandlerPromise = store.dispatch('lessonSummary/saveLessonResources', { lessonId: toRoute.params.lessonId, resources: store.state.lessonSummary.workingResources, @@ -188,7 +188,7 @@ export default [ }, }, { - name: PageNames.SELECTION_SEARCH, + name: PageNames.LESSON_RESOURCE_SELECTION_SEARCH, path: CLASS + LESSON + SELECTION + SEARCH, component: LessonResourceSelectionPage, handler(toRoute) { @@ -201,7 +201,7 @@ export default [ component: LessonResourceSelectionPage, handler(toRoute, fromRoute) { let preHandlerPromise; - if (fromRoute.name === PageNames.SELECTION_CONTENT_PREVIEW) { + if (fromRoute.name === PageNames.LESSON_RESOURCE_SELECTION_CONTENT_PREVIEW) { preHandlerPromise = store.dispatch('lessonSummary/saveLessonResources', { lessonId: toRoute.params.lessonId, resources: store.state.lessonSummary.workingResources, @@ -223,7 +223,7 @@ export default [ }, }, { - name: PageNames.SELECTION_CONTENT_PREVIEW, + name: PageNames.LESSON_RESOURCE_SELECTION_CONTENT_PREVIEW, path: CLASS + LESSON + SELECTION + PREVIEW, component: LessonSelectionContentPreviewPage, handler(toRoute) { diff --git a/kolibri/plugins/coach/assets/src/views/groups/GroupMembersPage/index.vue b/kolibri/plugins/coach/assets/src/views/groups/GroupMembersPage/index.vue index c6e86910c0..fdd87fb75c 100644 --- a/kolibri/plugins/coach/assets/src/views/groups/GroupMembersPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/groups/GroupMembersPage/index.vue @@ -4,7 +4,7 @@

@@ -182,7 +182,7 @@ handleSuccessDeleteGroup() { this.showSnackbarNotification('groupDeleted'); this.displayModal(false); - this.$router.push(this.$router.getRoute(PageNames.GROUPS_ROOT)); + this.$router.push(this.classRoute(PageNames.GROUPS_ROOT)); }, handleOptionSelect(value) { switch (value) { diff --git a/kolibri/plugins/coach/assets/src/views/groups/reports/GroupLessonExerciseLearnersPage.vue b/kolibri/plugins/coach/assets/src/views/groups/reports/GroupLessonExerciseLearnersPage.vue index d799d6ddff..bf58fee4a4 100644 --- a/kolibri/plugins/coach/assets/src/views/groups/reports/GroupLessonExerciseLearnersPage.vue +++ b/kolibri/plugins/coach/assets/src/views/groups/reports/GroupLessonExerciseLearnersPage.vue @@ -83,7 +83,7 @@ }, methods: { link(learnerId) { - return this.classRoute(PageNames.REPORTS_GROUP_REPORT_LESSON_EXERCISE_LEARNER_PAGE_ROOT, { + return this.classRoute(PageNames.LESSON_EXERCISE_LEARNER_PAGE_ROOT, { learnerId, }); }, diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonResourceSelectionPage/__test__/LessonResourceSelectionPage.spec.js b/kolibri/plugins/coach/assets/src/views/lessons/LessonResourceSelectionPage/__test__/LessonResourceSelectionPage.spec.js index 07550111fd..560f360236 100644 --- a/kolibri/plugins/coach/assets/src/views/lessons/LessonResourceSelectionPage/__test__/LessonResourceSelectionPage.spec.js +++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonResourceSelectionPage/__test__/LessonResourceSelectionPage.spec.js @@ -14,7 +14,7 @@ const router = new VueRouter({ routes: [ { name: PageNames.LESSON_SUMMARY, path: '/summary' }, { name: 'SELECT_RESOURCES', path: '/' }, - { name: 'SELECTION_ROOT', path: '/select' }, + { name: 'LESSON_RESOURCE_SELECTION_ROOT', path: '/select' }, { name: 'SELECTION', path: '/select/:topicId' }, { name: 'SELECTION_SEARCH', path: '/search/:searchTerm' }, { name: 'LESSON_SUMMARY', path: '/reportslessonreportpage' }, @@ -87,11 +87,11 @@ describe('LessonResourceSelectionPage', () => { }, }); - // If there is no last_id in query params, link to SELECTION_ROOT + // If there is no last_id in query params, link to LESSON_RESOURCE_SELECTION_ROOT const noLastIdQuery = { ...filterValues }; await router.replace({ query: noLastIdQuery }); expect(button.props().to).toEqual({ - name: 'SELECTION_ROOT', + name: 'LESSON_RESOURCE_SELECTION_ROOT', params: {}, query: { ...filterValues, @@ -115,7 +115,7 @@ describe('LessonResourceSelectionPage', () => { it('the breadcrumbs are visible and have the correct links', () => { const breadcrumbs = wrapper.findComponent({ name: 'ResourceSelectionBreadcrumbs' }); expect(breadcrumbs.exists()).toBe(true); - expect(breadcrumbs.props().channelsLink.name).toEqual('SELECTION_ROOT'); + expect(breadcrumbs.props().channelsLink.name).toEqual('LESSON_RESOURCE_SELECTION_ROOT'); }); it('the bottom bar has the correct label and link if coming from reports page', async () => { diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonResourceSelectionPage/index.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonResourceSelectionPage/index.vue index ee075ad1b0..900f9258c0 100644 --- a/kolibri/plugins/coach/assets/src/views/lessons/LessonResourceSelectionPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonResourceSelectionPage/index.vue @@ -230,7 +230,7 @@ return this.currentLesson.id; }, inSearchMode() { - return this.pageName === PageNames.SELECTION_SEARCH; + return this.pageName === PageNames.LESSON_RESOURCE_SELECTION_SEARCH; }, page() { return this.getUserPermissions.can_manage_content @@ -262,7 +262,7 @@ // or if all contents are topics return ( !this.inSearchMode && - this.pageName !== PageNames.SELECTION_ROOT && + this.pageName !== PageNames.LESSON_RESOURCE_SELECTION_ROOT && !every(this.contentList, this.contentIsDirectoryKind) ); }, @@ -309,7 +309,11 @@ if (this.inSearchMode && lastId) { const queryCopy = { ...this.$route.query }; delete queryCopy.last_id; - return this.$router.getRoute(PageNames.SELECTION, { topicId: lastId }, queryCopy); + return this.$router.getRoute( + PageNames.LESSON_RESOURCE_SELECTION, + { topicId: lastId }, + queryCopy, + ); } else if (this.inSearchMode) { return this.selectionRootLink({ ...this.routerParams }); } else if (this.$route.query.last === PageNames.LESSON_SUMMARY) { @@ -436,10 +440,18 @@ return !is_leaf; }, selectionRootLink() { - return this.$router.getRoute(PageNames.SELECTION_ROOT, {}, this.$route.query); + return this.$router.getRoute( + PageNames.LESSON_RESOURCE_SELECTION_ROOT, + {}, + this.$route.query, + ); }, topicListingLink({ topicId }) { - return this.$router.getRoute(PageNames.SELECTION, { topicId }, this.$route.query); + return this.$router.getRoute( + PageNames.LESSON_RESOURCE_SELECTION, + { topicId }, + this.$route.query, + ); }, bookmarkListingLink({ topicId }) { return this.$router.getRoute( @@ -454,7 +466,7 @@ } const { query } = this.$route; return { - name: PageNames.SELECTION_CONTENT_PREVIEW, + name: PageNames.LESSON_RESOURCE_SELECTION_CONTENT_PREVIEW, params: { ...this.routerParams, contentId: content.id, @@ -473,7 +485,7 @@ } const { query } = this.$route; return { - name: PageNames.SELECTION_CONTENT_PREVIEW, + name: PageNames.LESSON_RESOURCE_SELECTION_CONTENT_PREVIEW, params: { ...this.routerParams, contentId: content.id, @@ -524,7 +536,7 @@ query.last = lastPage; } this.$router.push({ - name: PageNames.SELECTION_SEARCH, + name: PageNames.LESSON_RESOURCE_SELECTION_SEARCH, params: { searchTerm, }, diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonSelectionContentPreviewPage/index.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonSelectionContentPreviewPage/index.vue index 13db949a3e..23afb28113 100644 --- a/kolibri/plugins/coach/assets/src/views/lessons/LessonSelectionContentPreviewPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonSelectionContentPreviewPage/index.vue @@ -69,7 +69,7 @@ // HACK to fix #7583 and #7584 if (lastRoute === PageNames.LESSON_SUMMARY) { return { - name: PageNames.SELECTION, + name: PageNames.LESSON_RESOURCE_SELECTION, params: { topicId: this.currentContentNode.parent, }, diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/index.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/index.vue index 740ad60258..68e54c4b6d 100644 --- a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/index.vue @@ -150,7 +150,9 @@ return this.$route.params.lessonId; }, lessonSelectionRootPage() { - return this.classRoute(PageNames.SELECTION_ROOT, { lessonId: this.lessonId }); + return this.classRoute(PageNames.LESSON_RESOURCE_SELECTION_ROOT, { + lessonId: this.lessonId, + }); }, activeTabId() { const { tabId } = this.$route.params; diff --git a/kolibri/plugins/coach/assets/src/views/lessons/reports/LessonLearnerPage.vue b/kolibri/plugins/coach/assets/src/views/lessons/reports/LessonLearnerPage.vue index e89f37de1d..6f543e8c35 100644 --- a/kolibri/plugins/coach/assets/src/views/lessons/reports/LessonLearnerPage.vue +++ b/kolibri/plugins/coach/assets/src/views/lessons/reports/LessonLearnerPage.vue @@ -131,12 +131,7 @@ }, methods: { exerciseLink(exerciseId) { - return this.classRoute( - this.group - ? PageNames.REPORTS_GROUP_REPORT_LESSON_EXERCISE_LEARNER_PAGE_ROOT - : PageNames.LESSON_LEARNER_EXERCISE_PAGE_ROOT, - { exerciseId }, - ); + return this.classRoute(PageNames.LESSON_LEARNER_EXERCISE_PAGE_ROOT, { exerciseId }); }, showLink(tableRow) { return ( diff --git a/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/index.vue b/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/index.vue index 4ce202f6aa..a79f3cb077 100644 --- a/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/index.vue @@ -220,7 +220,7 @@ params, }; } - return { name: PageNames.EXAMS_ROOT }; + return { name: PageNames.EXAMS_ROOT, params: { classId: this.classId } }; }, title() { if (!this.quizInitialized) {