Merge pull request #3577 from NoelDeMartin/MOBILE-4270-cs
MOBILE-4270: Code style improvements
This commit is contained in:
		
						commit
						d26c83b63c
					
				
							
								
								
									
										3
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							| @ -1,5 +1,6 @@ | ||||
| { | ||||
|     "recommendations": [ | ||||
|         "dbaeumer.vscode-eslint" | ||||
|         "dbaeumer.vscode-eslint", | ||||
|         "angular.ng-template" | ||||
|     ] | ||||
| } | ||||
|  | ||||
							
								
								
									
										13
									
								
								patches/@ionic+core+5.9.2.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								patches/@ionic+core+5.9.2.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| diff --git a/node_modules/@ionic/core/dist/types/components.d.ts b/node_modules/@ionic/core/dist/types/components.d.ts
 | ||||
| index fd9b7ad..4d29d1e 100644
 | ||||
| --- a/node_modules/@ionic/core/dist/types/components.d.ts
 | ||||
| +++ b/node_modules/@ionic/core/dist/types/components.d.ts
 | ||||
| @@ -972,7 +972,7 @@ export namespace Components {
 | ||||
|          /** | ||||
|            * If `true`, a button tag will be rendered and the item will be tappable. | ||||
|           */ | ||||
| -        "button": boolean;
 | ||||
| +        "button": boolean | '';
 | ||||
|          /** | ||||
|            * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). | ||||
|           */ | ||||
| @ -19,8 +19,8 @@ import { conditionalRoutes } from '@/app/app-routing.module'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| 
 | ||||
| import { AddonBadgesIssuedBadgePage } from './pages/issued-badge/issued-badge.page'; | ||||
| import { AddonBadgesUserBadgesPage } from './pages/user-badges/user-badges.page'; | ||||
| import { AddonBadgesIssuedBadgePage } from './pages/issued-badge/issued-badge'; | ||||
| import { AddonBadgesUserBadgesPage } from './pages/user-badges/user-badges'; | ||||
| 
 | ||||
| const mobileRoutes: Routes = [ | ||||
|     { | ||||
|  | ||||
| @ -73,4 +73,4 @@ import { AddonBlockTimelineModule } from './timeline/timeline.module'; | ||||
|         AddonBlockTimelineModule, | ||||
|     ], | ||||
| }) | ||||
| export class AddonBlockModule { } | ||||
| export class AddonBlockModule {} | ||||
|  | ||||
| @ -24,6 +24,12 @@ import { buildTabMainRoutes } from '@features/mainmenu/mainmenu-tab-routing.modu | ||||
| import { AddonBlogMainMenuHandlerService } from './services/handlers/mainmenu'; | ||||
| import { CoreMainMenuComponentsModule } from '@features/mainmenu/components/components.module'; | ||||
| 
 | ||||
| /** | ||||
|  * Build module routes. | ||||
|  * | ||||
|  * @param injector Injector. | ||||
|  * @returns Routes. | ||||
|  */ | ||||
| function buildRoutes(injector: Injector): Routes { | ||||
|     return [ | ||||
|         ...buildTabMainRoutes(injector, { | ||||
|  | ||||
| @ -15,7 +15,7 @@ | ||||
| import { APP_INITIALIZER, NgModule, Type } from '@angular/core'; | ||||
| import { Routes } from '@angular/router'; | ||||
| import { CoreContentLinksDelegate } from '@features/contentlinks/services/contentlinks-delegate'; | ||||
| import { CoreCourseIndexRoutingModule } from '@features/course/pages/index/index-routing.module'; | ||||
| import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module'; | ||||
| import { CoreCourseOptionsDelegate } from '@features/course/services/course-options-delegate'; | ||||
| import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module'; | ||||
| import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module'; | ||||
|  | ||||
| @ -12,39 +12,49 @@ | ||||
| // See the License for the specific language governing permissions and
 | ||||
| // limitations under the License.
 | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonCalendarComponentsModule } from '@addons/calendar/components/components.module'; | ||||
| import { AddonCalendarDayPage } from '@addons/calendar/pages/day/day'; | ||||
| import { AddonCalendarEditEventPage } from '@addons/calendar/pages/edit-event/edit-event'; | ||||
| import { AddonCalendarEventPage } from '@addons/calendar/pages/event/event'; | ||||
| import { AddonCalendarIndexPage } from '@addons/calendar/pages/index'; | ||||
| import { AddonCalendarSettingsPage } from '@addons/calendar/pages/settings/settings'; | ||||
| import { Injector, NgModule } from '@angular/core'; | ||||
| import { RouterModule, ROUTES, Routes } from '@angular/router'; | ||||
| import { CoreEditorComponentsModule } from '@features/editor/components/components.module'; | ||||
| import { CoreMainMenuComponentsModule } from '@features/mainmenu/components/components.module'; | ||||
| 
 | ||||
| import { buildTabMainRoutes } from '@features/mainmenu/mainmenu-tab-routing.module'; | ||||
| import { AddonCalendarMainMenuHandlerService } from './services/handlers/mainmenu'; | ||||
| 
 | ||||
| /** | ||||
|  * Build module routes. | ||||
|  * | ||||
|  * @param injector Injector. | ||||
|  * @returns Routes. | ||||
|  */ | ||||
| function buildRoutes(injector: Injector): Routes { | ||||
|     return [ | ||||
|         { | ||||
|             path: 'index', | ||||
|             data: { | ||||
|                 mainMenuTabRoot: AddonCalendarMainMenuHandlerService.PAGE_NAME, | ||||
|             }, | ||||
|             loadChildren: () => import('@addons/calendar/pages/index/index.module').then(m => m.AddonCalendarIndexPageModule), | ||||
|             data: { mainMenuTabRoot: AddonCalendarMainMenuHandlerService.PAGE_NAME }, | ||||
|             component: AddonCalendarIndexPage, | ||||
|         }, | ||||
|         { | ||||
|             path: 'calendar-settings', | ||||
|             loadChildren: () => | ||||
|                 import('@addons/calendar/pages/settings/settings.module').then(m => m.AddonCalendarSettingsPageModule), | ||||
|             component: AddonCalendarSettingsPage, | ||||
|         }, | ||||
|         { | ||||
|             path: 'day', | ||||
|             loadChildren: () => | ||||
|                 import('@addons/calendar/pages/day/day.module').then(m => m.AddonCalendarDayPageModule), | ||||
|             component: AddonCalendarDayPage, | ||||
|         }, | ||||
|         { | ||||
|             path: 'event/:id', | ||||
|             loadChildren: () => import('@addons/calendar/pages/event/event.module').then(m => m.AddonCalendarEventPageModule), | ||||
|             component: AddonCalendarEventPage, | ||||
|         }, | ||||
|         { | ||||
|             path: 'edit/:eventId', | ||||
|             loadChildren: () => | ||||
|                 import('@addons/calendar/pages/edit-event/edit-event.module').then(m => m.AddonCalendarEditEventPageModule), | ||||
|             component: AddonCalendarEditEventPage, | ||||
|         }, | ||||
|         ...buildTabMainRoutes(injector, { | ||||
|             redirectTo: 'index', | ||||
| @ -54,7 +64,20 @@ function buildRoutes(injector: Injector): Routes { | ||||
| } | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         CoreSharedModule, | ||||
|         AddonCalendarComponentsModule, | ||||
|         CoreMainMenuComponentsModule, | ||||
|         CoreEditorComponentsModule, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
|     declarations: [ | ||||
|         AddonCalendarDayPage, | ||||
|         AddonCalendarEditEventPage, | ||||
|         AddonCalendarEventPage, | ||||
|         AddonCalendarIndexPage, | ||||
|         AddonCalendarSettingsPage, | ||||
|     ], | ||||
|     providers: [ | ||||
|         { | ||||
|             provide: ROUTES, | ||||
| @ -64,4 +87,4 @@ function buildRoutes(injector: Injector): Routes { | ||||
|         }, | ||||
|     ], | ||||
| }) | ||||
| export class AddonCalendarLazyModule { } | ||||
| export class AddonCalendarLazyModule {} | ||||
|  | ||||
| @ -1,43 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { CoreEditorComponentsModule } from '@features/editor/components/components.module'; | ||||
| 
 | ||||
| import { AddonCalendarEditEventPage } from './edit-event.page'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonCalendarEditEventPage, | ||||
|         canDeactivate: [CanLeaveGuard], | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreEditorComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonCalendarEditEventPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonCalendarEditEventPageModule {} | ||||
| @ -1,41 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonCalendarComponentsModule } from '../../components/components.module'; | ||||
| 
 | ||||
| import { AddonCalendarEventPage } from './event.page'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonCalendarEventPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         AddonCalendarComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonCalendarEventPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonCalendarEventPageModule {} | ||||
| @ -1,43 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonCalendarComponentsModule } from '../../components/components.module'; | ||||
| 
 | ||||
| import { AddonCalendarIndexPage } from './index.page'; | ||||
| import { CoreMainMenuComponentsModule } from '@features/mainmenu/components/components.module'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonCalendarIndexPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         AddonCalendarComponentsModule, | ||||
|         CoreMainMenuComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonCalendarIndexPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonCalendarIndexPageModule {} | ||||
| @ -1,38 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { AddonCalendarSettingsPage } from './settings'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonCalendarSettingsPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonCalendarSettingsPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonCalendarSettingsPageModule {} | ||||
| @ -29,7 +29,7 @@ import { AddonCompetencyUserHandler } from './services/handlers/user'; | ||||
| import { Routes } from '@angular/router'; | ||||
| import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module'; | ||||
| import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module'; | ||||
| import { CoreCourseIndexRoutingModule } from '@features/course/pages/index/index-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'; | ||||
| 
 | ||||
|  | ||||
| @ -15,7 +15,7 @@ | ||||
| import { APP_INITIALIZER, NgModule, Type } from '@angular/core'; | ||||
| import { Routes } from '@angular/router'; | ||||
| import { CoreContentLinksDelegate } from '@features/contentlinks/services/contentlinks-delegate'; | ||||
| import { CoreCourseIndexRoutingModule } from '@features/course/pages/index/index-routing.module'; | ||||
| import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module'; | ||||
| import { CoreCourseOptionsDelegate } from '@features/course/services/course-options-delegate'; | ||||
| import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module'; | ||||
| import { CoreUserDelegate } from '@features/user/services/user-delegate'; | ||||
|  | ||||
| @ -47,4 +47,4 @@ import { AddonFilterUrlToLinkModule } from './urltolink/urltolink.module'; | ||||
|         AddonFilterUrlToLinkModule, | ||||
|     ], | ||||
| }) | ||||
| export class AddonFilterModule { } | ||||
| export class AddonFilterModule {} | ||||
|  | ||||
| @ -22,18 +22,22 @@ import { | ||||
|     AddonMessageOutputAirnotifierHandlerService, | ||||
| } from './services/handlers/messageoutput'; | ||||
| import { AddonMessageOutputAirnotifier } from './services/airnotifier'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonMessageOutputAirnotifierDevicesPage } from '@addons/messageoutput/airnotifier/pages/devices/devices'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: AddonMessageOutputAirnotifierHandlerService.PAGE_NAME, | ||||
|         loadChildren: () => import('./pages/devices/devices.module').then( m => m.AddonMessageOutputAirnotifierDevicesPageModule), | ||||
|         component: AddonMessageOutputAirnotifierDevicesPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     declarations: [ | ||||
|         AddonMessageOutputAirnotifierDevicesPage, | ||||
|     ], | ||||
|     imports: [ | ||||
|         CoreSharedModule, | ||||
|         CoreMainMenuTabRoutingModule.forChild(routes), | ||||
|     ], | ||||
|     providers: [ | ||||
|  | ||||
| @ -1,38 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonMessageOutputAirnotifierDevicesPage } from './devices'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonMessageOutputAirnotifierDevicesPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonMessageOutputAirnotifierDevicesPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonMessageOutputAirnotifierDevicesPageModule {} | ||||
| @ -12,55 +12,112 @@ | ||||
| // See the License for the specific language governing permissions and
 | ||||
| // limitations under the License.
 | ||||
| 
 | ||||
| import { conditionalRoutes } from '@/app/app-routing.module'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonMessagesContacts35Page } from '@addons/messages/pages/contacts-35/contacts'; | ||||
| import { AddonMessagesContactsPage } from '@addons/messages/pages/contacts/contacts'; | ||||
| import { AddonMessagesDiscussionPage } from '@addons/messages/pages/discussion/discussion'; | ||||
| import { AddonMessagesDiscussions35Page } from '@addons/messages/pages/discussions-35/discussions'; | ||||
| import { AddonMessagesGroupConversationsPage } from '@addons/messages/pages/group-conversations/group-conversations'; | ||||
| import { AddonMessagesSearchPage } from '@addons/messages/pages/search/search'; | ||||
| import { AddonMessagesMainMenuHandlerService } from '@addons/messages/services/handlers/mainmenu'; | ||||
| import { Injector, NgModule } from '@angular/core'; | ||||
| import { Route, RouterModule, ROUTES, Routes } from '@angular/router'; | ||||
| import { CoreMainMenuComponentsModule } from '@features/mainmenu/components/components.module'; | ||||
| 
 | ||||
| import { buildTabMainRoutes } from '@features/mainmenu/mainmenu-tab-routing.module'; | ||||
| import { CoreSearchComponentsModule } from '@features/search/components/components.module'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| import { AddonMessagesIndexGuard } from './guards'; | ||||
| 
 | ||||
| export const DISCUSSION_ROUTES: Route[] = [ | ||||
|     { | ||||
|         path: 'discussion/user/:userId', | ||||
|         loadChildren: () => import('./pages/discussion/discussion.module') | ||||
|             .then(m => m.AddonMessagesDiscussionPageModule), | ||||
|     }, | ||||
|     { | ||||
|         path: 'discussion/:conversationId', | ||||
|         loadChildren: () => import('./pages/discussion/discussion.module') | ||||
|             .then(m => m.AddonMessagesDiscussionPageModule), | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| /** | ||||
|  * Build module routes. | ||||
|  * | ||||
|  * @param injector Injector. | ||||
|  * @returns Routes. | ||||
|  */ | ||||
| function buildRoutes(injector: Injector): Routes { | ||||
|     return [ | ||||
|     const discussionRoutes: Route[] = [ | ||||
|         { | ||||
|             path: 'index', // 3.5.
 | ||||
|             loadChildren: () => | ||||
|                 import('./pages/discussions-35/discussions.module').then(m => m.AddonMessagesDiscussions35PageModule), | ||||
|             path: 'discussion/user/:userId', | ||||
|             component: AddonMessagesDiscussionPage, | ||||
|         }, | ||||
|         { | ||||
|             path: 'discussion/:conversationId', | ||||
|             component: AddonMessagesDiscussionPage, | ||||
|         }, | ||||
|     ]; | ||||
| 
 | ||||
|     const mobileRoutes: Routes = [ | ||||
|         { | ||||
|             path: 'contacts', // 3.6 or greater.
 | ||||
|             component: AddonMessagesContactsPage, | ||||
|         }, | ||||
|         { | ||||
|             path: 'index', | ||||
|             data: { mainMenuTabRoot: AddonMessagesMainMenuHandlerService.PAGE_NAME }, | ||||
|             component: AddonMessagesDiscussions35Page, | ||||
|         }, | ||||
|         { | ||||
|             path: 'contacts-35', // 3.5.
 | ||||
|             loadChildren: () => import('./pages/contacts-35/contacts.module').then(m => m.AddonMessagesContacts35PageModule), | ||||
|             component: AddonMessagesContacts35Page, | ||||
|         }, | ||||
|         { | ||||
|             path: 'group-conversations', // 3.6 or greater.
 | ||||
|             loadChildren: () => import('./pages/group-conversations/group-conversations.module') | ||||
|                 .then(m => m.AddonMessagesGroupConversationsPageModule), | ||||
|             data: { mainMenuTabRoot: AddonMessagesMainMenuHandlerService.PAGE_NAME }, | ||||
|             component: AddonMessagesGroupConversationsPage, | ||||
|         }, | ||||
|         ...DISCUSSION_ROUTES, | ||||
|         { | ||||
|             path: 'search', | ||||
|             loadChildren: () => import('./pages/search/search.module') | ||||
|                 .then(m => m.AddonMessagesSearchPageModule), | ||||
|             component: AddonMessagesSearchPage, | ||||
|         }, | ||||
|     ] | ||||
|         .reduce((routes, mobileRoute) => [ | ||||
|             ...routes, | ||||
|             mobileRoute, | ||||
|             ...discussionRoutes.map(discussionRoute => ({ | ||||
|                 ...discussionRoute, | ||||
|                 path: `${mobileRoute.path}/${discussionRoute.path}`, | ||||
|             })), | ||||
|         ], []); | ||||
| 
 | ||||
|     const tabletRoutes: Routes = [ | ||||
|         { | ||||
|             path: 'contacts', // 3.6 or greater.
 | ||||
|             loadChildren: () => import('./pages/contacts/contacts.module') | ||||
|                 .then(m => m.AddonMessagesContactsPageModule), | ||||
|             component: AddonMessagesContactsPage, | ||||
|             children: discussionRoutes, | ||||
|         }, | ||||
|         { | ||||
|             path: 'index', | ||||
|             data: { mainMenuTabRoot: AddonMessagesMainMenuHandlerService.PAGE_NAME }, | ||||
|             component: AddonMessagesDiscussions35Page, | ||||
|             children: discussionRoutes, | ||||
|         }, | ||||
|         { | ||||
|             path: 'contacts-35', // 3.5.
 | ||||
|             component: AddonMessagesContacts35Page, | ||||
|             children: discussionRoutes, | ||||
|         }, | ||||
|         { | ||||
|             path: 'group-conversations', // 3.6 or greater.
 | ||||
|             data: { mainMenuTabRoot: AddonMessagesMainMenuHandlerService.PAGE_NAME }, | ||||
|             component: AddonMessagesGroupConversationsPage, | ||||
|             children: discussionRoutes, | ||||
|         }, | ||||
|         { | ||||
|             path: 'search', | ||||
|             component: AddonMessagesSearchPage, | ||||
|             children: discussionRoutes, | ||||
|         }, | ||||
|     ]; | ||||
| 
 | ||||
|     return [ | ||||
|         ...conditionalRoutes(mobileRoutes, () => CoreScreen.isMobile), | ||||
|         ...conditionalRoutes(tabletRoutes, () => CoreScreen.isTablet), | ||||
|         ...discussionRoutes, | ||||
|         { | ||||
|             path: 'message-settings', | ||||
|             loadChildren: () => import('./pages/settings/settings.module').then(m => m.AddonMessagesSettingsPageModule), | ||||
|             loadChildren: () => import('./messages-settings-lazy.module').then(m => m.AddonMessagesSettingsLazyModule), | ||||
|         }, | ||||
|         ...buildTabMainRoutes(injector, { | ||||
|             canActivate: [AddonMessagesIndexGuard], | ||||
| @ -69,6 +126,19 @@ function buildRoutes(injector: Injector): Routes { | ||||
| } | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         CoreSharedModule, | ||||
|         CoreSearchComponentsModule, | ||||
|         CoreMainMenuComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonMessagesContacts35Page, | ||||
|         AddonMessagesContactsPage, | ||||
|         AddonMessagesDiscussionPage, | ||||
|         AddonMessagesDiscussions35Page, | ||||
|         AddonMessagesGroupConversationsPage, | ||||
|         AddonMessagesSearchPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
|     providers: [ | ||||
|         { | ||||
| @ -79,4 +149,4 @@ function buildRoutes(injector: Injector): Routes { | ||||
|         }, | ||||
|     ], | ||||
| }) | ||||
| export class AddonMessagesLazyModule { } | ||||
| export class AddonMessagesLazyModule {} | ||||
|  | ||||
| @ -16,8 +16,7 @@ import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| 
 | ||||
| import { AddonMessagesSettingsPage } from './settings.page'; | ||||
| import { AddonMessagesSettingsPage } from '@addons/messages/pages/settings/settings'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
| @ -36,4 +35,4 @@ const routes: Routes = [ | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonMessagesSettingsPageModule {} | ||||
| export class AddonMessagesSettingsLazyModule {} | ||||
| @ -36,7 +36,7 @@ import { NgZone } from '@singletons'; | ||||
| import { CoreNetwork } from '@services/network'; | ||||
| import { AddonMessagesSync, AddonMessagesSyncProvider } from './services/messages-sync'; | ||||
| import { AddonMessagesSyncCronHandler } from './services/handlers/sync-cron'; | ||||
| import { CoreSitePreferencesRoutingModule } from '@features/settings/pages/site/site-routing'; | ||||
| import { CoreSitePreferencesRoutingModule } from '@features/settings/settings-site-routing.module'; | ||||
| import { AddonMessagesProvider } from './services/messages'; | ||||
| import { AddonMessagesOfflineProvider } from './services/messages-offline'; | ||||
| 
 | ||||
| @ -55,7 +55,7 @@ const mainMenuChildrenRoutes: Routes = [ | ||||
| const preferencesRoutes: Routes = [ | ||||
|     { | ||||
|         path: AddonMessagesSettingsHandlerService.PAGE_NAME, | ||||
|         loadChildren: () => import('./pages/settings/settings.module').then(m => m.AddonMessagesSettingsPageModule), | ||||
|         loadChildren: () => import('./messages-settings-lazy.module').then(m => m.AddonMessagesSettingsLazyModule), | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
|  | ||||
| @ -1,58 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { conditionalRoutes } from '@/app/app-routing.module'; | ||||
| import { DISCUSSION_ROUTES } from '@addons/messages/messages-lazy.module'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { CoreSearchComponentsModule } from '@features/search/components/components.module'; | ||||
| 
 | ||||
| import { AddonMessagesContacts35Page } from './contacts.page'; | ||||
| 
 | ||||
| const mobileRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonMessagesContacts35Page, | ||||
|     }, | ||||
|     ...DISCUSSION_ROUTES, | ||||
| ]; | ||||
| 
 | ||||
| const tabletRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonMessagesContacts35Page, | ||||
|         children: DISCUSSION_ROUTES, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     ...conditionalRoutes(mobileRoutes, () => CoreScreen.isMobile), | ||||
|     ...conditionalRoutes(tabletRoutes, () => CoreScreen.isTablet), | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreSearchComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonMessagesContacts35Page, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonMessagesContacts35PageModule {} | ||||
| @ -1,56 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { conditionalRoutes } from '@/app/app-routing.module'; | ||||
| import { DISCUSSION_ROUTES } from '@addons/messages/messages-lazy.module'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| 
 | ||||
| import { AddonMessagesContactsPage } from './contacts.page'; | ||||
| 
 | ||||
| const mobileRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonMessagesContactsPage, | ||||
|     }, | ||||
|     ...DISCUSSION_ROUTES, | ||||
| ]; | ||||
| 
 | ||||
| const tabletRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonMessagesContactsPage, | ||||
|         children: DISCUSSION_ROUTES, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     ...conditionalRoutes(mobileRoutes, () => CoreScreen.isMobile), | ||||
|     ...conditionalRoutes(tabletRoutes, () => CoreScreen.isTablet), | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonMessagesContactsPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonMessagesContactsPageModule {} | ||||
| @ -1,41 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| 
 | ||||
| import { AddonMessagesDiscussionPage } from './discussion.page'; | ||||
| import { AddonMessagesComponentsModule } from '@addons/messages/components/components.module'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonMessagesDiscussionPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         AddonMessagesComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonMessagesDiscussionPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonMessagesDiscussionPageModule {} | ||||
| @ -1,67 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| import { conditionalRoutes } from '@/app/app-routing.module'; | ||||
| import { DISCUSSION_ROUTES } from '@addons/messages/messages-lazy.module'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { CoreSearchComponentsModule } from '@features/search/components/components.module'; | ||||
| 
 | ||||
| import { AddonMessagesDiscussions35Page } from './discussions.page'; | ||||
| import { AddonMessagesMainMenuHandlerService } from '@addons/messages/services/handlers/mainmenu'; | ||||
| import { CoreMainMenuComponentsModule } from '@features/mainmenu/components/components.module'; | ||||
| 
 | ||||
| const mobileRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         data: { | ||||
|             mainMenuTabRoot: AddonMessagesMainMenuHandlerService.PAGE_NAME, | ||||
|         }, | ||||
|         component: AddonMessagesDiscussions35Page, | ||||
|     }, | ||||
|     ...DISCUSSION_ROUTES, | ||||
| ]; | ||||
| 
 | ||||
| const tabletRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         data: { | ||||
|             mainMenuTabRoot: AddonMessagesMainMenuHandlerService.PAGE_NAME, | ||||
|         }, | ||||
|         component: AddonMessagesDiscussions35Page, | ||||
|         children: DISCUSSION_ROUTES, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     ...conditionalRoutes(mobileRoutes, () => CoreScreen.isMobile), | ||||
|     ...conditionalRoutes(tabletRoutes, () => CoreScreen.isTablet), | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreSearchComponentsModule, | ||||
|         CoreMainMenuComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonMessagesDiscussions35Page, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonMessagesDiscussions35PageModule {} | ||||
| @ -1,65 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { conditionalRoutes } from '@/app/app-routing.module'; | ||||
| import { DISCUSSION_ROUTES } from '@addons/messages/messages-lazy.module'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| 
 | ||||
| import { AddonMessagesGroupConversationsPage } from './group-conversations.page'; | ||||
| import { AddonMessagesMainMenuHandlerService } from '@addons/messages/services/handlers/mainmenu'; | ||||
| import { CoreMainMenuComponentsModule } from '@features/mainmenu/components/components.module'; | ||||
| 
 | ||||
| const mobileRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         data: { | ||||
|             mainMenuTabRoot: AddonMessagesMainMenuHandlerService.PAGE_NAME, | ||||
|         }, | ||||
|         component: AddonMessagesGroupConversationsPage, | ||||
|     }, | ||||
|     ...DISCUSSION_ROUTES, | ||||
| ]; | ||||
| 
 | ||||
| const tabletRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         data: { | ||||
|             mainMenuTabRoot: AddonMessagesMainMenuHandlerService.PAGE_NAME, | ||||
|         }, | ||||
|         component: AddonMessagesGroupConversationsPage, | ||||
|         children: DISCUSSION_ROUTES, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     ...conditionalRoutes(mobileRoutes, () => CoreScreen.isMobile), | ||||
|     ...conditionalRoutes(tabletRoutes, () => CoreScreen.isTablet), | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreMainMenuComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonMessagesGroupConversationsPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonMessagesGroupConversationsPageModule {} | ||||
| @ -1,58 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| import { conditionalRoutes } from '@/app/app-routing.module'; | ||||
| import { DISCUSSION_ROUTES } from '@addons/messages/messages-lazy.module'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { CoreSearchComponentsModule } from '@features/search/components/components.module'; | ||||
| 
 | ||||
| import { AddonMessagesSearchPage } from './search.page'; | ||||
| 
 | ||||
| const mobileRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonMessagesSearchPage, | ||||
|     }, | ||||
|     ...DISCUSSION_ROUTES, | ||||
| ]; | ||||
| 
 | ||||
| const tabletRoutes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonMessagesSearchPage, | ||||
|         children: DISCUSSION_ROUTES, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     ...conditionalRoutes(mobileRoutes, () => CoreScreen.isMobile), | ||||
|     ...conditionalRoutes(tabletRoutes, () => CoreScreen.isTablet), | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreSearchComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonMessagesSearchPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonMessagesSearchPageModule {} | ||||
| @ -20,8 +20,8 @@ import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| import { AddonModAssignComponentsModule } from './components/components.module'; | ||||
| import { AddonModAssignEditPage } from './pages/edit/edit'; | ||||
| import { AddonModAssignIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModAssignSubmissionListPage } from './pages/submission-list/submission-list.page'; | ||||
| import { AddonModAssignIndexPage } from './pages/index'; | ||||
| import { AddonModAssignSubmissionListPage } from './pages/submission-list/submission-list'; | ||||
| import { AddonModAssignSubmissionReviewPage } from './pages/submission-review/submission-review'; | ||||
| 
 | ||||
| const commonRoutes: Routes = [ | ||||
|  | ||||
| @ -24,4 +24,4 @@ import { AddonModAssignFeedbackFileModule } from './file/file.module'; | ||||
|         AddonModAssignFeedbackFileModule, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModAssignFeedbackModule { } | ||||
| export class AddonModAssignFeedbackModule {} | ||||
|  | ||||
| @ -24,4 +24,4 @@ import { AddonModAssignSubmissionOnlineTextModule } from './onlinetext/onlinetex | ||||
|         AddonModAssignSubmissionOnlineTextModule, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModAssignSubmissionModule { } | ||||
| export class AddonModAssignSubmissionModule {} | ||||
|  | ||||
| @ -16,7 +16,9 @@ import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModBookComponentsModule } from './components/components.module'; | ||||
| import { AddonModBookIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModBookIndexPage } from './pages/index'; | ||||
| import { CoreTagComponentsModule } from '@features/tag/components/components.module'; | ||||
| import { AddonModBookContentsPage } from '@addons/mod/book/pages/contents/contents'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
| @ -25,7 +27,7 @@ const routes: Routes = [ | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/contents', | ||||
|         loadChildren: () => import('./pages/contents/contents.module').then(m => m.AddonModBookContentsPageModule), | ||||
|         component: AddonModBookContentsPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @ -34,9 +36,11 @@ const routes: Routes = [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         AddonModBookComponentsModule, | ||||
|         CoreTagComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModBookIndexPage, | ||||
|         AddonModBookContentsPage, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModBookLazyModule {} | ||||
|  | ||||
| @ -1,40 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModBookContentsPage } from './contents'; | ||||
| import { CoreTagComponentsModule } from '@features/tag/components/components.module'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModBookContentsPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreTagComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModBookContentsPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModBookContentsPageModule {} | ||||
| @ -42,4 +42,4 @@ import { AddonModDataFieldUrlModule } from './url/url.module'; | ||||
|         AddonModDataFieldUrlModule, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModDataFieldModule { } | ||||
| export class AddonModDataFieldModule {} | ||||
|  | ||||
| @ -20,6 +20,10 @@ import { AddonModFeedbackIndexPage } from './pages/index/index'; | ||||
| import { AddonModFeedbackAttemptsPage } from './pages/attempts/attempts'; | ||||
| import { conditionalRoutes } from '@/app/app-routing.module'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| import { AddonModFeedbackAttemptPage } from '@addons/mod/feedback/pages/attempt/attempt'; | ||||
| import { AddonModFeedbackFormPage } from '@addons/mod/feedback/pages/form/form'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { AddonModFeedbackNonRespondentsPage } from '@addons/mod/feedback/pages/nonrespondents/nonrespondents'; | ||||
| 
 | ||||
| const commonRoutes: Routes = [ | ||||
|     { | ||||
| @ -28,12 +32,12 @@ const commonRoutes: Routes = [ | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/form', | ||||
|         loadChildren: () => import('./pages/form/form.module').then(m => m.AddonModFeedbackFormPageModule), | ||||
|         component: AddonModFeedbackFormPage, | ||||
|         canDeactivate: [CanLeaveGuard], | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/nonrespondents', | ||||
|         loadChildren: () => import('./pages/nonrespondents/nonrespondents.module') | ||||
|             .then(m => m.AddonModFeedbackNonRespondentsPageModule), | ||||
|         component: AddonModFeedbackNonRespondentsPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @ -45,7 +49,7 @@ const mobileRoutes: Routes = [ | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/attempts/:attemptId', | ||||
|         loadChildren: () => import('./pages/attempt/attempt.module').then(m => m.AddonModFeedbackAttemptPageModule), | ||||
|         component: AddonModFeedbackAttemptPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @ -57,7 +61,7 @@ const tabletRoutes: Routes = [ | ||||
|         children: [ | ||||
|             { | ||||
|                 path: ':attemptId', | ||||
|                 loadChildren: () => import('./pages/attempt/attempt.module').then(m => m.AddonModFeedbackAttemptPageModule), | ||||
|                 component: AddonModFeedbackAttemptPage, | ||||
|             }, | ||||
|         ], | ||||
|     }, | ||||
| @ -75,8 +79,11 @@ const routes: Routes = [ | ||||
|         AddonModFeedbackComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModFeedbackIndexPage, | ||||
|         AddonModFeedbackAttemptsPage, | ||||
|         AddonModFeedbackFormPage, | ||||
|         AddonModFeedbackIndexPage, | ||||
|         AddonModFeedbackNonRespondentsPage, | ||||
|         AddonModFeedbackAttemptPage, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModFeedbackLazyModule {} | ||||
|  | ||||
| @ -1,37 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { AddonModFeedbackAttemptPage } from './attempt'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModFeedbackAttemptPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     declarations: [ | ||||
|         AddonModFeedbackAttemptPage, | ||||
|     ], | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModFeedbackAttemptPageModule {} | ||||
| @ -1,39 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { AddonModFeedbackFormPage } from './form'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModFeedbackFormPage, | ||||
|         canDeactivate: [CanLeaveGuard], | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     declarations: [ | ||||
|         AddonModFeedbackFormPage, | ||||
|     ], | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModFeedbackFormPageModule {} | ||||
| @ -1,37 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { AddonModFeedbackNonRespondentsPage } from './nonrespondents'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModFeedbackNonRespondentsPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     declarations: [ | ||||
|         AddonModFeedbackNonRespondentsPage, | ||||
|     ], | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModFeedbackNonRespondentsPageModule {} | ||||
| @ -18,7 +18,7 @@ import { RouterModule, Routes } from '@angular/router'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModFolderComponentsModule } from './components/components.module'; | ||||
| 
 | ||||
| import { AddonModFolderIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModFolderIndexPage } from './pages/index'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|  | ||||
| @ -15,7 +15,7 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { CoreCourseModuleMainActivityPage } from '@features/course/classes/main-activity-page'; | ||||
| import { CoreNavigator } from '@services/navigator'; | ||||
| import { AddonModFolderIndexComponent } from '../../components/index'; | ||||
| import { AddonModFolderIndexComponent } from '../../components/index/index'; | ||||
| import { AddonModFolderFolder } from '../../services/folder'; | ||||
| import { AddonModFolderFolderFormattedData } from '../../services/folder-helper'; | ||||
| 
 | ||||
| @ -50,7 +50,7 @@ import { AddonModForumPostOptionsMenuComponent } from '../post-options-menu/post | ||||
| import { CoreRatingInfo } from '@features/rating/services/rating'; | ||||
| import { CoreForms } from '@singletons/form'; | ||||
| import { CoreFileEntry } from '@services/file-helper'; | ||||
| import { AddonModForumSharedPostFormData } from '../../pages/discussion/discussion.page'; | ||||
| import { AddonModForumSharedPostFormData } from '../../pages/discussion/discussion'; | ||||
| import { CoreDom } from '@singletons/dom'; | ||||
| 
 | ||||
| /** | ||||
|  | ||||
| @ -18,8 +18,7 @@ import { RouterModule, Routes } from '@angular/router'; | ||||
| import { AddonModForumComponentsModule } from '@addons/mod/forum/components/components.module'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| 
 | ||||
| import { AddonModForumDiscussionPage } from './discussion.page'; | ||||
| import { AddonModForumDiscussionPage } from '@addons/mod/forum/pages/discussion/discussion'; | ||||
| 
 | ||||
| const routes: Routes = [{ | ||||
|     path: '', | ||||
| @ -37,4 +36,4 @@ const routes: Routes = [{ | ||||
|         AddonModForumDiscussionPage, | ||||
|     ], | ||||
| }) | ||||
| export class AddonForumDiscussionPageModule {} | ||||
| export class AddonForumDiscussionLazyModule {} | ||||
| @ -20,7 +20,7 @@ import { CoreScreen } from '@services/screen'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| 
 | ||||
| import { AddonModForumComponentsModule } from './components/components.module'; | ||||
| import { AddonModForumIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModForumIndexPage } from './pages/index'; | ||||
| 
 | ||||
| const mobileRoutes: Routes = [ | ||||
|     { | ||||
| @ -29,15 +29,15 @@ const mobileRoutes: Routes = [ | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/new/:timeCreated', | ||||
|         loadChildren: () => import('./pages/new-discussion/new-discussion.module').then(m => m.AddonForumNewDiscussionPageModule), | ||||
|         loadChildren: () => import('./forum-new-discussion-lazy.module').then(m => m.AddonForumNewDiscussionLazyModule), | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/:discussionId', | ||||
|         loadChildren: () => import('./pages/discussion/discussion.module').then(m => m.AddonForumDiscussionPageModule), | ||||
|         loadChildren: () => import('./forum-discussion-lazy.module').then(m => m.AddonForumDiscussionLazyModule), | ||||
|     }, | ||||
|     { | ||||
|         path: 'discussion/:discussionId', // Only for discussion link handling.
 | ||||
|         loadChildren: () => import('./pages/discussion/discussion.module').then(m => m.AddonForumDiscussionPageModule), | ||||
|         loadChildren: () => import('./forum-discussion-lazy.module').then(m => m.AddonForumDiscussionLazyModule), | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @ -48,13 +48,11 @@ const tabletRoutes: Routes = [ | ||||
|         children: [ | ||||
|             { | ||||
|                 path: 'new/:timeCreated', | ||||
|                 loadChildren: () => import('./pages/new-discussion/new-discussion.module') | ||||
|                     .then(m => m.AddonForumNewDiscussionPageModule), | ||||
|                 loadChildren: () => import('./forum-new-discussion-lazy.module').then(m => m.AddonForumNewDiscussionLazyModule), | ||||
|             }, | ||||
|             { | ||||
|                 path: ':discussionId', | ||||
|                 loadChildren: () => import('./pages/discussion/discussion.module').then(m => m.AddonForumDiscussionPageModule), | ||||
| 
 | ||||
|                 loadChildren: () => import('./forum-discussion-lazy.module').then(m => m.AddonForumDiscussionLazyModule), | ||||
|             }, | ||||
|         ], | ||||
|     }, | ||||
|  | ||||
| @ -19,8 +19,7 @@ import { AddonModForumComponentsModule } from '@addons/mod/forum/components/comp | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { CoreEditorComponentsModule } from '@features/editor/components/components.module'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| 
 | ||||
| import { AddonModForumNewDiscussionPage } from './new-discussion.page'; | ||||
| import { AddonModForumNewDiscussionPage } from '@addons/mod/forum/pages/new-discussion/new-discussion'; | ||||
| 
 | ||||
| const routes: Routes = [{ | ||||
|     path: '', | ||||
| @ -39,4 +38,4 @@ const routes: Routes = [{ | ||||
|         AddonModForumNewDiscussionPage, | ||||
|     ], | ||||
| }) | ||||
| export class AddonForumNewDiscussionPageModule {} | ||||
| export class AddonForumNewDiscussionLazyModule {} | ||||
| @ -17,7 +17,7 @@ import { Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { conditionalRoutes } from '@/app/app-routing.module'; | ||||
| import { CORE_SITE_SCHEMAS } from '@services/sites'; | ||||
| import { CoreCourseContentsRoutingModule } from '@features/course/pages/contents/contents-routing.module'; | ||||
| import { CoreCourseContentsRoutingModule } from '@features/course/course-contents-routing.module'; | ||||
| import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate'; | ||||
| import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module'; | ||||
| import { CoreScreen } from '@services/screen'; | ||||
| @ -55,7 +55,7 @@ export const ADDON_MOD_FORUM_SERVICES: Type<unknown>[] = [ | ||||
| const mainMenuRoutes: Routes = [ | ||||
|     { | ||||
|         path: `${AddonModForumModuleHandlerService.PAGE_NAME}/discussion/:discussionId`, | ||||
|         loadChildren: () => import('./pages/discussion/discussion.module').then(m => m.AddonForumDiscussionPageModule), | ||||
|         loadChildren: () => import('./forum-discussion-lazy.module').then(m => m.AddonForumDiscussionLazyModule), | ||||
|         data: { swipeEnabled: false }, | ||||
|     }, | ||||
|     { | ||||
| @ -66,13 +66,12 @@ const mainMenuRoutes: Routes = [ | ||||
|         [ | ||||
|             { | ||||
|                 path: `${COURSE_CONTENTS_PATH}/${AddonModForumModuleHandlerService.PAGE_NAME}/new/:timeCreated`, | ||||
|                 loadChildren: () => import('./pages/new-discussion/new-discussion.module') | ||||
|                     .then(m => m.AddonForumNewDiscussionPageModule), | ||||
|                 loadChildren: () => import('./forum-new-discussion-lazy.module').then(m => m.AddonForumNewDiscussionLazyModule), | ||||
|                 data: { discussionsPathPrefix: `${AddonModForumModuleHandlerService.PAGE_NAME}/` }, | ||||
|             }, | ||||
|             { | ||||
|                 path: `${COURSE_CONTENTS_PATH}/${AddonModForumModuleHandlerService.PAGE_NAME}/:discussionId`, | ||||
|                 loadChildren: () => import('./pages/discussion/discussion.module').then(m => m.AddonForumDiscussionPageModule), | ||||
|                 loadChildren: () => import('./forum-discussion-lazy.module').then(m => m.AddonForumDiscussionLazyModule), | ||||
|                 data: { discussionsPathPrefix: `${AddonModForumModuleHandlerService.PAGE_NAME}/` }, | ||||
|             }, | ||||
|         ], | ||||
| @ -84,13 +83,12 @@ const courseContentsRoutes: Routes = conditionalRoutes( | ||||
|     [ | ||||
|         { | ||||
|             path: `${AddonModForumModuleHandlerService.PAGE_NAME}/new/:timeCreated`, | ||||
|             loadChildren: () => import('./pages/new-discussion/new-discussion.module') | ||||
|                 .then(m => m.AddonForumNewDiscussionPageModule), | ||||
|             loadChildren: () => import('./forum-new-discussion-lazy.module').then(m => m.AddonForumNewDiscussionLazyModule), | ||||
|             data: { discussionsPathPrefix: `${AddonModForumModuleHandlerService.PAGE_NAME}/` }, | ||||
|         }, | ||||
|         { | ||||
|             path: `${AddonModForumModuleHandlerService.PAGE_NAME}/:discussionId`, | ||||
|             loadChildren: () => import('./pages/discussion/discussion.module').then(m => m.AddonForumDiscussionPageModule), | ||||
|             loadChildren: () => import('./forum-discussion-lazy.module').then(m => m.AddonForumDiscussionLazyModule), | ||||
|             data: { discussionsPathPrefix: `${AddonModForumModuleHandlerService.PAGE_NAME}/` }, | ||||
|         }, | ||||
|     ], | ||||
|  | ||||
| @ -15,7 +15,7 @@ | ||||
| import { Component, ViewChild } from '@angular/core'; | ||||
| 
 | ||||
| import { CoreCourseModuleMainActivityPage } from '@features/course/classes/main-activity-page'; | ||||
| import { AddonModForumIndexComponent } from '../../components/index'; | ||||
| import { AddonModForumIndexComponent } from '../../components/index/index'; | ||||
| 
 | ||||
| @Component({ | ||||
|     selector: 'page-addon-mod-forum-index', | ||||
| @ -13,11 +13,11 @@ | ||||
| // limitations under the License.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { AddonModGlossaryEditPage } from './edit'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { CoreEditorComponentsModule } from '@features/editor/components/components.module'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { AddonModGlossaryEditPage } from '@addons/mod/glossary/pages/edit/edit'; | ||||
| 
 | ||||
| const routes: Routes = [{ | ||||
|     path: '', | ||||
| @ -35,4 +35,4 @@ const routes: Routes = [{ | ||||
|         CoreEditorComponentsModule, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModGlossaryEditPageModule {} | ||||
| export class AddonModGlossaryEditLazyModule {} | ||||
| @ -14,11 +14,11 @@ | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModGlossaryEntryPage } from './entry'; | ||||
| import { CoreCommentsComponentsModule } from '@features/comments/components/components.module'; | ||||
| import { CoreRatingComponentsModule } from '@features/rating/components/components.module'; | ||||
| import { CoreTagComponentsModule } from '@features/tag/components/components.module'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { AddonModGlossaryEntryPage } from '@addons/mod/glossary/pages/entry/entry'; | ||||
| 
 | ||||
| const routes: Routes = [{ | ||||
|     path: '', | ||||
| @ -37,4 +37,4 @@ const routes: Routes = [{ | ||||
|         CoreTagComponentsModule, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModGlossaryEntryPageModule {} | ||||
| export class AddonModGlossaryEntryLazyModule {} | ||||
| @ -28,11 +28,11 @@ const mobileRoutes: Routes = [ | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/entry/:entryId', | ||||
|         loadChildren: () => import('./pages/entry/entry.module').then(m => m.AddonModGlossaryEntryPageModule), | ||||
|         loadChildren: () => import('./glossary-entry-lazy.module').then(m => m.AddonModGlossaryEntryLazyModule), | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/edit/:timecreated', | ||||
|         loadChildren: () => import('./pages/edit/edit.module').then(m => m.AddonModGlossaryEditPageModule), | ||||
|         loadChildren: () => import('./glossary-edit-lazy.module').then(m => m.AddonModGlossaryEditLazyModule), | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @ -43,11 +43,11 @@ const tabletRoutes: Routes = [ | ||||
|         children: [ | ||||
|             { | ||||
|                 path: 'entry/:entryId', | ||||
|                 loadChildren: () => import('./pages/entry/entry.module').then(m => m.AddonModGlossaryEntryPageModule), | ||||
|                 loadChildren: () => import('./glossary-entry-lazy.module').then(m => m.AddonModGlossaryEntryLazyModule), | ||||
|             }, | ||||
|             { | ||||
|                 path: 'edit/:timecreated', | ||||
|                 loadChildren: () => import('./pages/edit/edit.module').then(m => m.AddonModGlossaryEditPageModule), | ||||
|                 loadChildren: () => import('./glossary-edit-lazy.module').then(m => m.AddonModGlossaryEditLazyModule), | ||||
|             }, | ||||
|         ], | ||||
|     }, | ||||
|  | ||||
| @ -17,7 +17,7 @@ import { APP_INITIALIZER, NgModule, Type } 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 { CoreCourseContentsRoutingModule } from '@features/course/pages/contents/contents-routing.module'; | ||||
| 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'; | ||||
| import { CoreCourseModulePrefetchDelegate } from '@features/course/services/module-prefetch-delegate'; | ||||
| @ -51,12 +51,12 @@ export const ADDON_MOD_GLOSSARY_SERVICES: Type<unknown>[] = [ | ||||
| const mainMenuRoutes: Routes = [ | ||||
|     { | ||||
|         path: `${AddonModGlossaryModuleHandlerService.PAGE_NAME}/entry/:entryId`, | ||||
|         loadChildren: () => import('./pages/entry/entry.module').then(m => m.AddonModGlossaryEntryPageModule), | ||||
|         loadChildren: () => import('./glossary-entry-lazy.module').then(m => m.AddonModGlossaryEntryLazyModule), | ||||
|         data: { swipeEnabled: false }, | ||||
|     }, | ||||
|     { | ||||
|         path: `${AddonModGlossaryModuleHandlerService.PAGE_NAME}/edit/:timecreated`, | ||||
|         loadChildren: () => import('./pages/edit/edit.module').then(m => m.AddonModGlossaryEditPageModule), | ||||
|         loadChildren: () => import('./glossary-edit-lazy.module').then(m => m.AddonModGlossaryEditLazyModule), | ||||
|         data: { swipeEnabled: false }, | ||||
|     }, | ||||
|     { | ||||
| @ -67,12 +67,12 @@ const mainMenuRoutes: Routes = [ | ||||
|         [ | ||||
|             { | ||||
|                 path: `${COURSE_CONTENTS_PATH}/${AddonModGlossaryModuleHandlerService.PAGE_NAME}/entry/:entryId`, | ||||
|                 loadChildren: () => import('./pages/entry/entry.module').then(m => m.AddonModGlossaryEntryPageModule), | ||||
|                 loadChildren: () => import('./glossary-entry-lazy.module').then(m => m.AddonModGlossaryEntryLazyModule), | ||||
|                 data: { glossaryPathPrefix: `${AddonModGlossaryModuleHandlerService.PAGE_NAME}/` }, | ||||
|             }, | ||||
|             { | ||||
|                 path: `${COURSE_CONTENTS_PATH}/${AddonModGlossaryModuleHandlerService.PAGE_NAME}/edit/:timecreated`, | ||||
|                 loadChildren: () => import('./pages/edit/edit.module').then(m => m.AddonModGlossaryEditPageModule), | ||||
|                 loadChildren: () => import('./glossary-edit-lazy.module').then(m => m.AddonModGlossaryEditLazyModule), | ||||
|                 data: { glossaryPathPrefix: `${AddonModGlossaryModuleHandlerService.PAGE_NAME}/` }, | ||||
|             }, | ||||
|         ], | ||||
| @ -84,12 +84,12 @@ const courseContentsRoutes: Routes = conditionalRoutes( | ||||
|     [ | ||||
|         { | ||||
|             path: `${AddonModGlossaryModuleHandlerService.PAGE_NAME}/entry/:entryId`, | ||||
|             loadChildren: () => import('./pages/entry/entry.module').then(m => m.AddonModGlossaryEntryPageModule), | ||||
|             loadChildren: () => import('./glossary-entry-lazy.module').then(m => m.AddonModGlossaryEntryLazyModule), | ||||
|             data: { glossaryPathPrefix: `${AddonModGlossaryModuleHandlerService.PAGE_NAME}/` }, | ||||
|         }, | ||||
|         { | ||||
|             path: `${AddonModGlossaryModuleHandlerService.PAGE_NAME}/edit/:timecreated`, | ||||
|             loadChildren: () => import('./pages/edit/edit.module').then(m => m.AddonModGlossaryEditPageModule), | ||||
|             loadChildren: () => import('./glossary-edit-lazy.module').then(m => m.AddonModGlossaryEditLazyModule), | ||||
|             data: { glossaryPathPrefix: `${AddonModGlossaryModuleHandlerService.PAGE_NAME}/` }, | ||||
|         }, | ||||
|     ], | ||||
|  | ||||
| @ -19,6 +19,9 @@ import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { AddonModH5PActivityComponentsModule } from './components/components.module'; | ||||
| import { AddonModH5PActivityIndexPage } from './pages/index/index'; | ||||
| import { AddonModH5PActivityUserAttemptsPage } from '@addons/mod/h5pactivity/pages/user-attempts/user-attempts'; | ||||
| import { AddonModH5PActivityAttemptResultsPage } from '@addons/mod/h5pactivity/pages/attempt-results/attempt-results'; | ||||
| import { AddonModH5PActivityUsersAttemptsPage } from '@addons/mod/h5pactivity/pages/users-attempts/users-attempts'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
| @ -28,18 +31,15 @@ const routes: Routes = [ | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/userattempts/:userId', | ||||
|         loadChildren: () => import('./pages/user-attempts/user-attempts.module') | ||||
|             .then( m => m.AddonModH5PActivityUserAttemptsPageModule), | ||||
|         component: AddonModH5PActivityUserAttemptsPage, | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/attemptresults/:attemptId', | ||||
|         loadChildren: () => import('./pages/attempt-results/attempt-results.module') | ||||
|             .then( m => m.AddonModH5PActivityAttemptResultsPageModule), | ||||
|         component: AddonModH5PActivityAttemptResultsPage, | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/users', | ||||
|         loadChildren: () => import('./pages/users-attempts/users-attempts.module') | ||||
|             .then( m => m.AddonModH5PActivityUsersAttemptsPageModule), | ||||
|         component: AddonModH5PActivityUsersAttemptsPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @ -51,6 +51,9 @@ const routes: Routes = [ | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModH5PActivityIndexPage, | ||||
|         AddonModH5PActivityUserAttemptsPage, | ||||
|         AddonModH5PActivityAttemptResultsPage, | ||||
|         AddonModH5PActivityUsersAttemptsPage, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModH5PActivityLazyModule {} | ||||
|  | ||||
| @ -1,38 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModH5PActivityAttemptResultsPage } from './attempt-results'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModH5PActivityAttemptResultsPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModH5PActivityAttemptResultsPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModH5PActivityAttemptResultsPageModule {} | ||||
| @ -1,38 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModH5PActivityUserAttemptsPage } from './user-attempts'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModH5PActivityUserAttemptsPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModH5PActivityUserAttemptsPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModH5PActivityUserAttemptsPageModule {} | ||||
| @ -1,38 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModH5PActivityUsersAttemptsPage } from './users-attempts'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModH5PActivityUsersAttemptsPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModH5PActivityUsersAttemptsPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModH5PActivityUsersAttemptsPageModule {} | ||||
| @ -17,7 +17,8 @@ import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModImscpComponentsModule } from './components/components.module'; | ||||
| import { AddonModImscpIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModImscpIndexPage } from './pages/index/index'; | ||||
| import { AddonModImscpViewPage } from '@addons/mod/imscp/pages/view/view'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
| @ -26,7 +27,7 @@ const routes: Routes = [ | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/view', | ||||
|         loadChildren: () => import('./pages/view/view.module').then(m => m.AddonModImscpViewPageModule), | ||||
|         component: AddonModImscpViewPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @ -38,6 +39,7 @@ const routes: Routes = [ | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModImscpIndexPage, | ||||
|         AddonModImscpViewPage, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModImscpLazyModule {} | ||||
|  | ||||
| @ -1,38 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModImscpViewPage } from './view'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModImscpViewPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModImscpViewPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModImscpViewPageModule {} | ||||
| @ -15,7 +15,7 @@ | ||||
| import { Component, Input } from '@angular/core'; | ||||
| 
 | ||||
| import { ModalController } from '@singletons'; | ||||
| import { AddonModLessonPlayerPage } from '../../pages/player/player.page'; | ||||
| import { AddonModLessonPlayerPage } from '../../pages/player/player'; | ||||
| 
 | ||||
| /** | ||||
|  * Modal that renders the lesson menu and media file. | ||||
|  | ||||
| @ -18,7 +18,11 @@ import { RouterModule, Routes } from '@angular/router'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModLessonComponentsModule } from './components/components.module'; | ||||
| 
 | ||||
| import { AddonModLessonIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModLessonIndexPage } from './pages/index'; | ||||
| import { CoreEditorComponentsModule } from '@features/editor/components/components.module'; | ||||
| import { AddonModLessonPlayerPage } from '@addons/mod/lesson/pages/player/player'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { AddonModLessonUserRetakePage } from '@addons/mod/lesson/pages/user-retake/user-retake'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
| @ -27,11 +31,12 @@ const routes: Routes = [ | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/player', | ||||
|         loadChildren: () => import('./pages/player/player.module').then( m => m.AddonModLessonPlayerPageModule), | ||||
|         component: AddonModLessonPlayerPage, | ||||
|         canDeactivate: [CanLeaveGuard], | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/user-retake/:userId', | ||||
|         loadChildren: () => import('./pages/user-retake/user-retake.module').then( m => m.AddonModLessonUserRetakePageModule), | ||||
|         component: AddonModLessonUserRetakePage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @ -39,10 +44,13 @@ const routes: Routes = [ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreEditorComponentsModule, | ||||
|         AddonModLessonComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModLessonIndexPage, | ||||
|         AddonModLessonPlayerPage, | ||||
|         AddonModLessonUserRetakePage, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModLessonLazyModule {} | ||||
|  | ||||
| @ -1,42 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModLessonPlayerPage } from './player.page'; | ||||
| import { CoreEditorComponentsModule } from '@features/editor/components/components.module'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModLessonPlayerPage, | ||||
|         canDeactivate: [CanLeaveGuard], | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreEditorComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModLessonPlayerPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModLessonPlayerPageModule {} | ||||
| @ -1,38 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModLessonUserRetakePage } from './user-retake.page'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModLessonUserRetakePage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModLessonUserRetakePage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModLessonUserRetakePageModule {} | ||||
| @ -16,7 +16,7 @@ import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { AddonModLtiComponentsModule } from './components/components.module'; | ||||
| import { AddonModLtiIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModLtiIndexPage } from './pages/index'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|  | ||||
| @ -65,4 +65,4 @@ import { AddonModWorkshopModule } from './workshop/workshop.module'; | ||||
|         AddonModWorkshopModule, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModModule { } | ||||
| export class AddonModModule {} | ||||
|  | ||||
| @ -17,7 +17,7 @@ import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModPageComponentsModule } from './components/components.module'; | ||||
| import { AddonModPageIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModPageIndexPage } from './pages/index'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|  | ||||
| @ -37,4 +37,4 @@ import { AddonModQuizAccessTimeLimitModule } from './timelimit/timelimit.module' | ||||
|         AddonModQuizAccessTimeLimitModule, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModQuizAccessRulesModule { } | ||||
| export class AddonModQuizAccessRulesModule {} | ||||
|  | ||||
| @ -1,38 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModQuizAttemptPage } from './attempt.page'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModQuizAttemptPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModQuizAttemptPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModQuizAttemptPageModule {} | ||||
| @ -1,42 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreQuestionComponentsModule } from '@features/question/components/components.module'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { AddonModQuizPlayerPage } from './player.page'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModQuizPlayerPage, | ||||
|         canDeactivate: [CanLeaveGuard], | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreQuestionComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModQuizPlayerPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModQuizPlayerPageModule {} | ||||
| @ -1,40 +0,0 @@ | ||||
| // (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.
 | ||||
| 
 | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| 
 | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { CoreQuestionComponentsModule } from '@features/question/components/components.module'; | ||||
| import { AddonModQuizReviewPage } from './review.page'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|         path: '', | ||||
|         component: AddonModQuizReviewPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         CoreQuestionComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModQuizReviewPage, | ||||
|     ], | ||||
|     exports: [RouterModule], | ||||
| }) | ||||
| export class AddonModQuizReviewPageModule {} | ||||
| @ -18,7 +18,12 @@ import { RouterModule, Routes } from '@angular/router'; | ||||
| import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { AddonModQuizComponentsModule } from './components/components.module'; | ||||
| 
 | ||||
| import { AddonModQuizIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModQuizIndexPage } from './pages/index'; | ||||
| import { AddonModQuizAttemptPage } from '@addons/mod/quiz/pages/attempt/attempt'; | ||||
| import { CoreQuestionComponentsModule } from '@features/question/components/components.module'; | ||||
| import { AddonModQuizPlayerPage } from '@addons/mod/quiz/pages/player/player'; | ||||
| import { CanLeaveGuard } from '@guards/can-leave'; | ||||
| import { AddonModQuizReviewPage } from '@addons/mod/quiz/pages/review/review'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
| @ -27,15 +32,16 @@ const routes: Routes = [ | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/player', | ||||
|         loadChildren: () => import('./pages/player/player.module').then( m => m.AddonModQuizPlayerPageModule), | ||||
|         component: AddonModQuizPlayerPage, | ||||
|         canDeactivate: [CanLeaveGuard], | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/attempt/:attemptId', | ||||
|         loadChildren: () => import('./pages/attempt/attempt.module').then( m => m.AddonModQuizAttemptPageModule), | ||||
|         component: AddonModQuizAttemptPage, | ||||
|     }, | ||||
|     { | ||||
|         path: ':courseId/:cmId/review/:attemptId', | ||||
|         loadChildren: () => import('./pages/review/review.module').then( m => m.AddonModQuizReviewPageModule), | ||||
|         component: AddonModQuizReviewPage, | ||||
|     }, | ||||
| ]; | ||||
| 
 | ||||
| @ -44,9 +50,13 @@ const routes: Routes = [ | ||||
|         RouterModule.forChild(routes), | ||||
|         CoreSharedModule, | ||||
|         AddonModQuizComponentsModule, | ||||
|         CoreQuestionComponentsModule, | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AddonModQuizIndexPage, | ||||
|         AddonModQuizAttemptPage, | ||||
|         AddonModQuizPlayerPage, | ||||
|         AddonModQuizReviewPage, | ||||
|     ], | ||||
| }) | ||||
| export class AddonModQuizLazyModule {} | ||||
|  | ||||
| @ -16,7 +16,7 @@ import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { AddonModResourceComponentsModule } from './components/components.module'; | ||||
| import { AddonModResourceIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModResourceIndexPage } from './pages/index'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|  | ||||
| @ -16,7 +16,7 @@ import { CoreSharedModule } from '@/core/shared.module'; | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { AddonModUrlComponentsModule } from './components/components.module'; | ||||
| import { AddonModUrlIndexPage } from './pages/index/index.page'; | ||||
| import { AddonModUrlIndexPage } from './pages/index'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|  | ||||
| @ -17,7 +17,7 @@ import { NgModule } from '@angular/core'; | ||||
| import { Routes, RouterModule } from '@angular/router'; | ||||
| import { CoreCommentsComponentsModule } from '@features/comments/components/components.module'; | ||||
| import { CoreTagComponentsModule } from '@features/tag/components/components.module'; | ||||
| import { AddonNotesListPage } from './pages/list/list.page'; | ||||
| import { AddonNotesListPage } from './pages/list/list'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|  | ||||
| @ -27,7 +27,7 @@ import { NOTES_OFFLINE_SITE_SCHEMA } from './services/database/notes'; | ||||
| import { AddonNotesComponentsModule } from './components/components.module'; | ||||
| import { Routes } from '@angular/router'; | ||||
| import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module'; | ||||
| import { CoreCourseIndexRoutingModule } from '@features/course/pages/index/index-routing.module'; | ||||
| import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module'; | ||||
| 
 | ||||
| // List of providers (without handlers).
 | ||||
| export const ADDON_NOTES_SERVICES: Type<unknown>[] = [ | ||||
|  | ||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user