From dd2d45aa10256961a5b1cfc43f213665196e2362 Mon Sep 17 00:00:00 2001 From: ozer550 Date: Thu, 21 Sep 2023 00:22:22 +0530 Subject: [PATCH] add handler to use classIdGaurd --- kolibri/plugins/coach/assets/src/routes/planLessonsRoutes.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kolibri/plugins/coach/assets/src/routes/planLessonsRoutes.js b/kolibri/plugins/coach/assets/src/routes/planLessonsRoutes.js index 460008c26fc..4ca46c91fc9 100644 --- a/kolibri/plugins/coach/assets/src/routes/planLessonsRoutes.js +++ b/kolibri/plugins/coach/assets/src/routes/planLessonsRoutes.js @@ -55,6 +55,11 @@ export default [ name: LessonsPageNames.LESSON_CREATION_ROOT, path: path(CLASS, ALL_LESSONS, '/new'), component: LessonCreationPage, + handler(toRoute, fromRoute, next) { + if (classIdParamRequiredGuard(toRoute, PageNames.PLAN_PAGE, next)) { + return; + } + }, }, { name: LessonsPageNames.SUMMARY,