diff --git a/kolibri/plugins/coach/assets/src/modules/examCreation/handlers.js b/kolibri/plugins/coach/assets/src/modules/examCreation/handlers.js index 090466c41eb..a628b384f31 100644 --- a/kolibri/plugins/coach/assets/src/modules/examCreation/handlers.js +++ b/kolibri/plugins/coach/assets/src/modules/examCreation/handlers.js @@ -332,4 +332,5 @@ export function showExamCreationQuestionSelectionPage(store, toRoute, fromRoute) store.commit('SET_PAGE_NAME', 'EXAM_CREATION_QUESTION_SELECTION'); store.commit('SET_TOOLBAR_ROUTE', { name: fromRoute.name, params: fromRoute.params }); store.dispatch('examCreation/updateSelectedQuestions'); + store.dispatch('notLoading'); } diff --git a/kolibri/plugins/coach/assets/src/routes/planLessonsRoutes.js b/kolibri/plugins/coach/assets/src/routes/planLessonsRoutes.js index 460008c26fc..6969c6e943b 100644 --- a/kolibri/plugins/coach/assets/src/routes/planLessonsRoutes.js +++ b/kolibri/plugins/coach/assets/src/routes/planLessonsRoutes.js @@ -22,7 +22,8 @@ import LessonEditDetailsPage from '../views/plan/LessonEditDetailsPage'; import LessonCreationPage from '../views/plan/LessonCreationPage'; import { classIdParamRequiredGuard } from './utils'; -const CLASS = '/:classId?/plan'; +const OPTIONAL_CLASS = '/:classId?/plan'; +const CLASS = '/:classId/plan'; const LESSON = '/lessons/:lessonId'; const ALL_LESSONS = '/lessons'; const SELECTION = '/selection'; @@ -39,7 +40,7 @@ const { showLessonsRootPage } = useLessons(); export default [ { name: LessonsPageNames.PLAN_LESSONS_ROOT, - path: path(CLASS, ALL_LESSONS), + path: path(OPTIONAL_CLASS, ALL_LESSONS), component: LessonsRootPage, handler(toRoute, fromRoute, next) { if (classIdParamRequiredGuard(toRoute, PageNames.PLAN_PAGE, next)) { diff --git a/kolibri/plugins/coach/assets/src/routes/reportRoutes.js b/kolibri/plugins/coach/assets/src/routes/reportRoutes.js index a3bba3bc713..c660f778aa8 100644 --- a/kolibri/plugins/coach/assets/src/routes/reportRoutes.js +++ b/kolibri/plugins/coach/assets/src/routes/reportRoutes.js @@ -17,7 +17,8 @@ import QuizEditDetailsPage from '../views/plan/QuizEditDetailsPage'; import { classIdParamRequiredGuard } from './utils'; const ACTIVITY = '/activity'; -const CLASS = '/:classId?/reports'; +const OPTIONAL_CLASS = '/:classId?/reports'; +const CLASS = '/:classId/reports'; const GROUPS = '/groups'; const GROUP = '/groups/:groupId'; const LEARNERS = '/learners'; @@ -45,7 +46,7 @@ function defaultHandler() { export default [ { name: PageNames.REPORTS_PAGE, - path: path(CLASS), + path: path(OPTIONAL_CLASS), redirect: { name: 'ReportsLessonListPage' }, }, { @@ -444,7 +445,7 @@ export default [ }, }, { - path: path(CLASS, LESSONS), + path: path(OPTIONAL_CLASS, LESSONS), component: pages.ReportsLessonListPage, handler: (toRoute, fromRoute, next) => { if (classIdParamRequiredGuard(toRoute, 'ReportsLessonListPage', next)) { diff --git a/kolibri/plugins/coach/assets/src/views/plan/LessonSummaryPage/ManageLessonModals.vue b/kolibri/plugins/coach/assets/src/views/plan/LessonSummaryPage/ManageLessonModals.vue index a2549aa7c9a..0a91ddfc95b 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/LessonSummaryPage/ManageLessonModals.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/LessonSummaryPage/ManageLessonModals.vue @@ -115,9 +115,12 @@ const { id } = this.currentLesson; return LessonResource.deleteModel({ id }) .then(() => { - this.$router.replace(this.$router.getRoute('PLAN_LESSONS_ROOT'), () => { - this.showSnackbarNotification('lessonDeleted'); - }); + this.$router.replace( + this.$router.getRoute('PLAN_LESSONS_ROOT', { classId: this.classId }), + () => { + this.showSnackbarNotification('lessonDeleted'); + } + ); }) .catch(error => { this.$store.dispatch('handleApiError', { error });