From b96b66bedd90f3359b275f2a99e8f2b02a5dceb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 11 Jul 2024 13:15:57 +0200 Subject: [PATCH] MOBILE-4616 core: Move exported constants from module files --- .../learningplans/services/block-handler.ts | 2 +- .../classes/competency-plans-source.ts | 2 +- .../competency-course-details-lazy.module.ts | 2 +- .../competency-learning-plans-lazy.module.ts | 2 +- src/addons/competency/competency.module.ts | 9 +++------ src/addons/competency/constants.ts | 17 +++++++++++++++++ .../pages/competency/competency.page.ts | 2 +- .../competencysummary.page.ts | 2 +- .../coursecompetencies.page.ts | 2 +- .../services/handlers/competency-link.ts | 4 ++-- .../services/handlers/course-option.ts | 2 +- .../competency/services/handlers/plan-link.ts | 2 +- .../competency/services/handlers/plans-link.ts | 2 +- .../competency/services/handlers/push-click.ts | 4 ++-- .../services/handlers/user-competency-link.ts | 2 +- .../competency/services/handlers/user.ts | 6 +++--- src/addons/mod/forum/forum.module.ts | 2 +- src/addons/mod/glossary/glossary.module.ts | 2 +- src/core/features/course/constants.ts | 18 ++++++++++++++++++ src/core/features/course/course-lazy.module.ts | 3 +-- src/core/features/course/course.module.ts | 6 +----- src/core/features/course/pages/index/index.ts | 2 +- src/core/features/grades/grades.module.ts | 5 ++--- .../features/grades/services/handlers/user.ts | 4 ++-- .../classes/settings-sections-source.ts | 2 +- .../features/settings/settings-lazy.module.ts | 2 +- src/core/features/sharedfiles/constants.ts | 15 +++++++++++++++ .../sharedfiles/services/handlers/settings.ts | 2 +- .../sharedfiles/services/sharedfiles-helper.ts | 2 +- .../features/sharedfiles/sharedfiles.module.ts | 3 +-- src/core/features/user/constants.ts | 15 +++++++++++++++ .../user/services/handlers/course-option.ts | 2 +- src/core/features/user/user.module.ts | 6 ++---- 33 files changed, 103 insertions(+), 50 deletions(-) create mode 100644 src/addons/competency/constants.ts create mode 100644 src/core/features/course/constants.ts create mode 100644 src/core/features/sharedfiles/constants.ts create mode 100644 src/core/features/user/constants.ts diff --git a/src/addons/block/learningplans/services/block-handler.ts b/src/addons/block/learningplans/services/block-handler.ts index 39be924ba..652210f4b 100644 --- a/src/addons/block/learningplans/services/block-handler.ts +++ b/src/addons/block/learningplans/services/block-handler.ts @@ -17,7 +17,7 @@ import { CoreBlockHandlerData } from '@features/block/services/block-delegate'; import { CoreBlockOnlyTitleComponent } from '@features/block/components/only-title-block/only-title-block'; import { CoreBlockBaseHandler } from '@features/block/classes/base-block-handler'; import { makeSingleton } from '@singletons'; -import { ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/constants'; /** * Block handler. diff --git a/src/addons/competency/classes/competency-plans-source.ts b/src/addons/competency/classes/competency-plans-source.ts index 53b7f3c09..fa34eca13 100644 --- a/src/addons/competency/classes/competency-plans-source.ts +++ b/src/addons/competency/classes/competency-plans-source.ts @@ -14,7 +14,7 @@ import { Params } from '@angular/router'; import { CoreRoutedItemsManagerSource } from '@classes/items-management/routed-items-manager-source'; -import { ADDON_COMPETENCY_COMPETENCIES_PAGE } from '../competency.module'; +import { ADDON_COMPETENCY_COMPETENCIES_PAGE } from '../constants'; import { AddonCompetency, AddonCompetencyPlan, AddonCompetencyProvider } from '../services/competency'; import { AddonCompetencyHelper } from '../services/competency-helper'; import { CoreIonicColorNames } from '@singletons/colors'; diff --git a/src/addons/competency/competency-course-details-lazy.module.ts b/src/addons/competency/competency-course-details-lazy.module.ts index 4d9bf9ea7..6d0530ae4 100644 --- a/src/addons/competency/competency-course-details-lazy.module.ts +++ b/src/addons/competency/competency-course-details-lazy.module.ts @@ -17,7 +17,7 @@ import { RouterModule, Routes } from '@angular/router'; import { AddonCompetencyCompetencyPage } from './pages/competency/competency.page'; import { AddonCompetencyCompetencySummaryPage } from './pages/competencysummary/competencysummary.page'; -import { ADDON_COMPETENCY_SUMMARY_PAGE } from './competency.module'; +import { ADDON_COMPETENCY_SUMMARY_PAGE } from './constants'; import { AddonCompetencyCompetencyPageModule } from './pages/competency/competency.module'; import { AddonCompetencyCompetencySummaryPageModule } from './pages/competencysummary/competencysummary.module'; import { AddonCompetencyCourseCompetenciesPage } from './pages/coursecompetencies/coursecompetencies.page'; diff --git a/src/addons/competency/competency-learning-plans-lazy.module.ts b/src/addons/competency/competency-learning-plans-lazy.module.ts index 79dcab799..bf093ed31 100644 --- a/src/addons/competency/competency-learning-plans-lazy.module.ts +++ b/src/addons/competency/competency-learning-plans-lazy.module.ts @@ -22,7 +22,7 @@ import { AddonCompetencyPlanPage } from './pages/plan/plan'; import { AddonCompetencyPlanListPage } from './pages/planlist/planlist'; import { AddonCompetencyCompetencyPage } from './pages/competency/competency.page'; import { AddonCompetencyCompetencySummaryPage } from './pages/competencysummary/competencysummary.page'; -import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_SUMMARY_PAGE } from './competency.module'; +import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_SUMMARY_PAGE } from './constants'; import { AddonCompetencyCompetencyPageModule } from './pages/competency/competency.module'; import { AddonCompetencyCompetencySummaryPageModule } from './pages/competencysummary/competencysummary.module'; import { AddonCompetencyCompetenciesPage } from './pages/competencies/competencies.page'; diff --git a/src/addons/competency/competency.module.ts b/src/addons/competency/competency.module.ts index 373b2b4a0..aa4185579 100644 --- a/src/addons/competency/competency.module.ts +++ b/src/addons/competency/competency.module.ts @@ -27,8 +27,9 @@ import { AddonCompetencyUserHandler } from './services/handlers/user'; import { Routes } from '@angular/router'; import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module'; import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module'; -import { COURSE_PAGE_NAME } from '@features/course/course.module'; -import { PARTICIPANTS_PAGE_NAME } from '@features/user/user.module'; +import { PARTICIPANTS_PAGE_NAME } from '@features/user/constants'; +import { COURSE_PAGE_NAME } from '@features/course/constants'; +import { ADDON_COMPETENCY_LEARNING_PLANS_PAGE, ADDON_COMPETENCY_COMPETENCIES_PAGE } from './constants'; /** * Get competency services. @@ -45,10 +46,6 @@ export async function getCompetencyServices(): Promise[]> { ]; } -export const ADDON_COMPETENCY_LEARNING_PLANS_PAGE = 'learning-plans'; -export const ADDON_COMPETENCY_COMPETENCIES_PAGE = 'competencies'; -export const ADDON_COMPETENCY_SUMMARY_PAGE = 'summary'; - const mainMenuChildrenRoutes: Routes = [ { path: ADDON_COMPETENCY_LEARNING_PLANS_PAGE, diff --git a/src/addons/competency/constants.ts b/src/addons/competency/constants.ts new file mode 100644 index 000000000..b6f933f0c --- /dev/null +++ b/src/addons/competency/constants.ts @@ -0,0 +1,17 @@ +// (C) Copyright 2015 Moodle Pty Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export const ADDON_COMPETENCY_LEARNING_PLANS_PAGE = 'learning-plans'; +export const ADDON_COMPETENCY_COMPETENCIES_PAGE = 'competencies'; +export const ADDON_COMPETENCY_SUMMARY_PAGE = 'summary'; diff --git a/src/addons/competency/pages/competency/competency.page.ts b/src/addons/competency/pages/competency/competency.page.ts index f7482a6ee..615a146c2 100644 --- a/src/addons/competency/pages/competency/competency.page.ts +++ b/src/addons/competency/pages/competency/competency.page.ts @@ -32,7 +32,7 @@ import { import { CoreNavigator } from '@services/navigator'; import { ContextLevel } from '@/core/constants'; import { CoreUtils } from '@services/utils/utils'; -import { ADDON_COMPETENCY_SUMMARY_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_SUMMARY_PAGE } from '@addons/competency/constants'; import { CoreSwipeNavigationItemsManager } from '@classes/items-management/swipe-navigation-items-manager'; import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/routed-items-manager-sources-tracker'; import { AddonCompetencyPlanCompetenciesSource } from '@addons/competency/classes/competency-plan-competencies-source'; diff --git a/src/addons/competency/pages/competencysummary/competencysummary.page.ts b/src/addons/competency/pages/competencysummary/competencysummary.page.ts index 00dd18b0c..8099d303f 100644 --- a/src/addons/competency/pages/competencysummary/competencysummary.page.ts +++ b/src/addons/competency/pages/competencysummary/competencysummary.page.ts @@ -18,7 +18,7 @@ import { AddonCompetencySummary, AddonCompetency } from '@addons/competency/serv import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; -import { ADDON_COMPETENCY_SUMMARY_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_SUMMARY_PAGE } from '@addons/competency/constants'; import { CoreTime } from '@singletons/time'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; diff --git a/src/addons/competency/pages/coursecompetencies/coursecompetencies.page.ts b/src/addons/competency/pages/coursecompetencies/coursecompetencies.page.ts index 665842828..f6d4adf12 100644 --- a/src/addons/competency/pages/coursecompetencies/coursecompetencies.page.ts +++ b/src/addons/competency/pages/coursecompetencies/coursecompetencies.page.ts @@ -21,7 +21,7 @@ import { CoreUserProfile } from '@features/user/services/user'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; import { ContextLevel } from '@/core/constants'; -import { ADDON_COMPETENCY_SUMMARY_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_SUMMARY_PAGE } from '@addons/competency/constants'; import { CoreListItemsManager } from '@classes/items-management/list-items-manager'; import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/routed-items-manager-sources-tracker'; import { AddonCompetencyCourseCompetenciesSource } from '@addons/competency/classes/competency-course-competencies-source'; diff --git a/src/addons/competency/services/handlers/competency-link.ts b/src/addons/competency/services/handlers/competency-link.ts index 6d268c040..69a42f6ee 100644 --- a/src/addons/competency/services/handlers/competency-link.ts +++ b/src/addons/competency/services/handlers/competency-link.ts @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/constants'; import { Injectable } from '@angular/core'; import { CoreContentLinksHandlerBase } from '@features/contentlinks/classes/base-handler'; import { CoreContentLinksAction } from '@features/contentlinks/services/contentlinks-delegate'; -import { COURSE_PAGE_NAME } from '@features/course/course.module'; +import { COURSE_PAGE_NAME } from '@features/course/constants'; import { CoreNavigator } from '@services/navigator'; import { makeSingleton } from '@singletons'; import { AddonCompetency } from '../competency'; diff --git a/src/addons/competency/services/handlers/course-option.ts b/src/addons/competency/services/handlers/course-option.ts index f8148c170..1288774df 100644 --- a/src/addons/competency/services/handlers/course-option.ts +++ b/src/addons/competency/services/handlers/course-option.ts @@ -24,7 +24,7 @@ import { AddonCompetency } from '../competency'; import { CoreCourseAnyCourseData, CoreCourseUserAdminOrNavOptionIndexed } from '@features/courses/services/courses'; import { CoreFilterHelper } from '@features/filter/services/filter-helper'; import { ContextLevel } from '@/core/constants'; -import { ADDON_COMPETENCY_COMPETENCIES_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_COMPETENCIES_PAGE } from '@addons/competency/constants'; /** * Course nav handler. diff --git a/src/addons/competency/services/handlers/plan-link.ts b/src/addons/competency/services/handlers/plan-link.ts index 12eee7afe..7f19e227e 100644 --- a/src/addons/competency/services/handlers/plan-link.ts +++ b/src/addons/competency/services/handlers/plan-link.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/constants'; import { Injectable } from '@angular/core'; import { CoreContentLinksHandlerBase } from '@features/contentlinks/classes/base-handler'; import { CoreContentLinksAction } from '@features/contentlinks/services/contentlinks-delegate'; diff --git a/src/addons/competency/services/handlers/plans-link.ts b/src/addons/competency/services/handlers/plans-link.ts index 685481b2b..412c226e2 100644 --- a/src/addons/competency/services/handlers/plans-link.ts +++ b/src/addons/competency/services/handlers/plans-link.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/constants'; import { Injectable } from '@angular/core'; import { CoreContentLinksHandlerBase } from '@features/contentlinks/classes/base-handler'; import { CoreContentLinksAction } from '@features/contentlinks/services/contentlinks-delegate'; diff --git a/src/addons/competency/services/handlers/push-click.ts b/src/addons/competency/services/handlers/push-click.ts index ec3b3d493..b28423ebf 100644 --- a/src/addons/competency/services/handlers/push-click.ts +++ b/src/addons/competency/services/handlers/push-click.ts @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/constants'; import { Injectable } from '@angular/core'; -import { COURSE_PAGE_NAME } from '@features/course/course.module'; +import { COURSE_PAGE_NAME } from '@features/course/constants'; import { CorePushNotificationsClickHandler } from '@features/pushnotifications/services/push-delegate'; import { CorePushNotificationsNotificationBasicData } from '@features/pushnotifications/services/pushnotifications'; import { CoreNavigator } from '@services/navigator'; diff --git a/src/addons/competency/services/handlers/user-competency-link.ts b/src/addons/competency/services/handlers/user-competency-link.ts index 3cc83b2b0..74eefc0b9 100644 --- a/src/addons/competency/services/handlers/user-competency-link.ts +++ b/src/addons/competency/services/handlers/user-competency-link.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_SUMMARY_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_SUMMARY_PAGE } from '@addons/competency/constants'; import { Injectable } from '@angular/core'; import { CoreContentLinksHandlerBase } from '@features/contentlinks/classes/base-handler'; import { CoreContentLinksAction } from '@features/contentlinks/services/contentlinks-delegate'; diff --git a/src/addons/competency/services/handlers/user.ts b/src/addons/competency/services/handlers/user.ts index bfbce8765..28c06c66e 100644 --- a/src/addons/competency/services/handlers/user.ts +++ b/src/addons/competency/services/handlers/user.ts @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/competency.module'; +import { ADDON_COMPETENCY_COMPETENCIES_PAGE, ADDON_COMPETENCY_LEARNING_PLANS_PAGE } from '@addons/competency/constants'; import { Injectable } from '@angular/core'; -import { COURSE_PAGE_NAME } from '@features/course/course.module'; +import { COURSE_PAGE_NAME } from '@features/course/constants'; import { CoreUserProfile } from '@features/user/services/user'; import { CoreUserProfileHandler, @@ -22,7 +22,7 @@ import { CoreUserProfileHandlerData, CoreUserDelegateContext, } from '@features/user/services/user-delegate'; -import { PARTICIPANTS_PAGE_NAME } from '@features/user/user.module'; +import { PARTICIPANTS_PAGE_NAME } from '@features/user/constants'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; import { makeSingleton } from '@singletons'; diff --git a/src/addons/mod/forum/forum.module.ts b/src/addons/mod/forum/forum.module.ts index c7bfbe804..8dfe77225 100644 --- a/src/addons/mod/forum/forum.module.ts +++ b/src/addons/mod/forum/forum.module.ts @@ -37,7 +37,7 @@ import { CoreTagAreaDelegate } from '@features/tag/services/tag-area-delegate'; import { AddonModForumTagAreaHandler } from './services/handlers/tag-area'; import { CorePushNotificationsDelegate } from '@features/pushnotifications/services/push-delegate'; import { AddonModForumPushClickHandler } from './services/handlers/push-click'; -import { COURSE_CONTENTS_PATH } from '@features/course/course.module'; +import { COURSE_CONTENTS_PATH } from '@features/course/constants'; import { CoreCourseHelper } from '@features/course/services/course-helper'; import { ADDON_MOD_FORUM_COMPONENT, ADDON_MOD_FORUM_PAGE_NAME, ADDON_MOD_FORUM_SEARCH_PAGE_NAME } from './constants'; diff --git a/src/addons/mod/glossary/glossary.module.ts b/src/addons/mod/glossary/glossary.module.ts index 624e71874..e2af50f59 100644 --- a/src/addons/mod/glossary/glossary.module.ts +++ b/src/addons/mod/glossary/glossary.module.ts @@ -16,7 +16,7 @@ import { conditionalRoutes } from '@/app/app-routing.module'; import { APP_INITIALIZER, NgModule } from '@angular/core'; import { Routes } from '@angular/router'; import { CoreContentLinksDelegate } from '@features/contentlinks/services/contentlinks-delegate'; -import { COURSE_CONTENTS_PATH } from '@features/course/course.module'; +import { COURSE_CONTENTS_PATH } from '@features/course/constants'; import { CoreCourseContentsRoutingModule } from '@features/course/course-contents-routing.module'; import { CoreCourseHelper } from '@features/course/services/course-helper'; import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate'; diff --git a/src/core/features/course/constants.ts b/src/core/features/course/constants.ts new file mode 100644 index 000000000..1917eb51e --- /dev/null +++ b/src/core/features/course/constants.ts @@ -0,0 +1,18 @@ +// (C) Copyright 2015 Moodle Pty Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export const COURSE_INDEX_PATH = ':courseId'; +export const COURSE_PAGE_NAME = 'course'; +export const CONTENTS_PAGE_NAME = 'contents'; +export const COURSE_CONTENTS_PATH = `${COURSE_PAGE_NAME}/${COURSE_INDEX_PATH}/${CONTENTS_PAGE_NAME}`; diff --git a/src/core/features/course/course-lazy.module.ts b/src/core/features/course/course-lazy.module.ts index d89541958..e77e5637f 100644 --- a/src/core/features/course/course-lazy.module.ts +++ b/src/core/features/course/course-lazy.module.ts @@ -22,8 +22,7 @@ import { CoreCourseIndexPage } from '@features/course/pages/index'; import { CoreCourseListModTypePage } from '@features/course/pages/list-mod-type/list-mod-type'; import { CoreCourseModulePreviewPage } from '@features/course/pages/module-preview/module-preview'; import { CoreCourseHelper } from './services/course-helper'; - -export const COURSE_INDEX_PATH = ':courseId'; +import { COURSE_INDEX_PATH } from './constants'; /** * Build module routes. diff --git a/src/core/features/course/course.module.ts b/src/core/features/course/course.module.ts index 7533a65cb..a3b1a83da 100644 --- a/src/core/features/course/course.module.ts +++ b/src/core/features/course/course.module.ts @@ -29,9 +29,9 @@ import { CoreTagAreaDelegate } from '@features/tag/services/tag-area-delegate'; import { CoreCourseTagAreaHandler } from './services/handlers/course-tag-area'; import { CoreCourseModulesTagAreaHandler } from './services/handlers/modules-tag-area'; import { CoreCourse } from './services/course'; -import { COURSE_INDEX_PATH } from '@features/course/course-lazy.module'; import { buildRegExpUrlMatcher } from '@/app/app-routing.module'; import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module'; +import { COURSE_PAGE_NAME, CONTENTS_PAGE_NAME } from './constants'; /** * Get course services. @@ -87,10 +87,6 @@ export async function getCourseExportedObjects(): Promise[]> { ]; } -export const SHAREDFILES_PAGE_NAME = 'sharedfiles'; - const routes: Routes = [ { path: SHAREDFILES_PAGE_NAME, diff --git a/src/core/features/user/constants.ts b/src/core/features/user/constants.ts new file mode 100644 index 000000000..82edcc1d5 --- /dev/null +++ b/src/core/features/user/constants.ts @@ -0,0 +1,15 @@ +// (C) Copyright 2015 Moodle Pty Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export const PARTICIPANTS_PAGE_NAME = 'participants'; diff --git a/src/core/features/user/services/handlers/course-option.ts b/src/core/features/user/services/handlers/course-option.ts index 322799f5f..431668217 100644 --- a/src/core/features/user/services/handlers/course-option.ts +++ b/src/core/features/user/services/handlers/course-option.ts @@ -20,7 +20,7 @@ import { CoreCourseOptionsHandlerData, } from '@features/course/services/course-options-delegate'; import { CoreCourseAnyCourseData, CoreCourseUserAdminOrNavOptionIndexed } from '@features/courses/services/courses'; -import { PARTICIPANTS_PAGE_NAME } from '@features/user/user.module'; +import { PARTICIPANTS_PAGE_NAME } from '@features/user/constants'; import { makeSingleton } from '@singletons'; import { CoreUser } from '../user'; diff --git a/src/core/features/user/user.module.ts b/src/core/features/user/user.module.ts index 893a456b0..b40bce2bb 100644 --- a/src/core/features/user/user.module.ts +++ b/src/core/features/user/user.module.ts @@ -33,9 +33,9 @@ import { CoreUserCourseOptionHandler } from './services/handlers/course-option'; import { CoreUserHelper } from './services/user-helper'; import { AppRoutingModule, conditionalRoutes } from '@/app/app-routing.module'; import { CoreScreen } from '@services/screen'; -import { COURSE_PAGE_NAME } from '@features/course/course.module'; -import { COURSE_INDEX_PATH } from '@features/course/course-lazy.module'; import { CoreEvents } from '@singletons/events'; +import { COURSE_PAGE_NAME, COURSE_INDEX_PATH } from '@features/course/constants'; +import { PARTICIPANTS_PAGE_NAME } from './constants'; /** * Get user services. @@ -60,8 +60,6 @@ export async function getUsersServices(): Promise[]> { ]; } -export const PARTICIPANTS_PAGE_NAME = 'participants'; - const appRoutes: Routes = [ { path: 'user',