From 5cc2ede32a5c995b4327ea1b41850d9ae89e6005 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 17 Nov 2025 13:46:00 -0800 Subject: [PATCH 01/21] Remove milestone modules, move custom element definition to milestones component --- .../milestones/milestones.component.ts | 21 +++++++++- src/app/teacher/classroom-monitor.module.ts | 4 +- src/app/teacher/milestone/milestone.module.ts | 40 ------------------- 3 files changed, 21 insertions(+), 44 deletions(-) delete mode 100644 src/app/teacher/milestone/milestone.module.ts diff --git a/src/app/classroom-monitor/milestones/milestones.component.ts b/src/app/classroom-monitor/milestones/milestones.component.ts index ec3e020fc42..d17c570038e 100644 --- a/src/app/classroom-monitor/milestones/milestones.component.ts +++ b/src/app/classroom-monitor/milestones/milestones.component.ts @@ -1,4 +1,5 @@ -import { Component } from '@angular/core'; +import { Component, Injector } from '@angular/core'; +import { createCustomElement } from '@angular/elements'; import { MatDialog } from '@angular/material/dialog'; import { Subscription } from 'rxjs'; import { MilestoneDetailsDialogComponent } from '../../../assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-details-dialog/milestone-details-dialog.component'; @@ -12,6 +13,8 @@ import { MatCard, MatCardContent } from '@angular/material/card'; import { MatProgressSpinner } from '@angular/material/progress-spinner'; import { NgClass } from '@angular/common'; import { MatIcon } from '@angular/material/icon'; +import { MilestoneReportDataComponent } from '../../teacher/milestone/milestone-report-data/milestone-report-data.component'; +import { MilestoneReportGraphComponent } from '../../teacher/milestone/milestone-report-graph/milestone-report-graph.component'; @Component({ imports: [MatCard, MatCardContent, MatProgressSpinner, NgClass, MatIcon], @@ -27,9 +30,23 @@ export class MilestonesComponent { private achievementService: AchievementService, private annotationService: AnnotationService, private milestoneService: MilestoneService, + private injector: Injector, private dialog: MatDialog, private dataService: TeacherDataService - ) {} + ) { + if (!customElements.get('milestone-report-data')) { + customElements.define( + 'milestone-report-data', + createCustomElement(MilestoneReportDataComponent, { injector: this.injector }) + ); + } + if (!customElements.get('milestone-report-graph')) { + customElements.define( + 'milestone-report-graph', + createCustomElement(MilestoneReportGraphComponent, { injector: this.injector }) + ); + } + } ngOnInit() { this.loadProjectMilestones(); diff --git a/src/app/teacher/classroom-monitor.module.ts b/src/app/teacher/classroom-monitor.module.ts index dd367cdc0a7..388d4cd8d5f 100644 --- a/src/app/teacher/classroom-monitor.module.ts +++ b/src/app/teacher/classroom-monitor.module.ts @@ -11,12 +11,12 @@ import { NotebookGradingComponent } from '../../assets/wise5/classroomMonitor/no import { StudentGradingComponent } from '../../assets/wise5/classroomMonitor/student-grading/student-grading.component'; import { StudentProgressComponent } from '../../assets/wise5/classroomMonitor/student-progress/student-progress.component'; import { ClassroomMonitorComponent } from '../../assets/wise5/classroomMonitor/classroom-monitor.component'; -import { MilestoneModule } from './milestone/milestone.module'; import { ManageStudentsComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/manageStudents/manage-students/manage-students.component'; import { RouterModule } from '@angular/router'; import { SelectPeriodComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/select-period/select-period.component'; import { GradingNodeService } from '../../assets/wise5/services/gradingNodeService'; import { StudentTeacherCommonServicesModule } from '../student-teacher-common-services.module'; +import { MilestonesComponent } from '../classroom-monitor/milestones/milestones.component'; @NgModule({ imports: [ @@ -24,7 +24,7 @@ import { StudentTeacherCommonServicesModule } from '../student-teacher-common-se ComponentNewWorkBadgeComponent, ComponentStudentModule, ManageStudentsComponent, - MilestoneModule, + MilestonesComponent, NavItemComponent, NotificationsMenuComponent, PeerGroupGradingModule, diff --git a/src/app/teacher/milestone/milestone.module.ts b/src/app/teacher/milestone/milestone.module.ts deleted file mode 100644 index d17357680b3..00000000000 --- a/src/app/teacher/milestone/milestone.module.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Injector, NgModule } from '@angular/core'; -import { createCustomElement } from '@angular/elements'; -import { MilestoneDetailsDialogComponent } from '../../../assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-details-dialog/milestone-details-dialog.component'; -import { MilestoneDetailsComponent } from '../../../assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-details/milestone-details.component'; -import { MilestoneClassResponsesComponent } from '../../../assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component'; -import { MilestoneWorkgroupItemComponent } from '../../../assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component'; -import { MilestonesComponent } from '../../classroom-monitor/milestones/milestones.component'; -import { MilestoneReportDataComponent } from './milestone-report-data/milestone-report-data.component'; -import { MilestoneReportGraphComponent } from './milestone-report-graph/milestone-report-graph.component'; -import { SelectPeriodComponent } from '../../../assets/wise5/classroomMonitor/classroomMonitorComponents/select-period/select-period.component'; - -@NgModule({ - imports: [ - SelectPeriodComponent, - MilestonesComponent, - MilestoneDetailsComponent, - MilestoneDetailsDialogComponent, - MilestoneClassResponsesComponent, - MilestoneReportDataComponent, - MilestoneReportGraphComponent, - MilestoneWorkgroupItemComponent - ], - exports: [MilestonesComponent] -}) -export class MilestoneModule { - constructor(private injector: Injector) { - if (!customElements.get('milestone-report-data')) { - customElements.define( - 'milestone-report-data', - createCustomElement(MilestoneReportDataComponent, { injector: this.injector }) - ); - } - if (!customElements.get('milestone-report-graph')) { - customElements.define( - 'milestone-report-graph', - createCustomElement(MilestoneReportGraphComponent, { injector: this.injector }) - ); - } - } -} From 06aad3fb0206394fc152eba3bda756ba0bbb8206 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 17 Nov 2025 14:04:32 -0800 Subject: [PATCH 02/21] Remove redundant deps from ClassroomMonitorModule. --- src/app/teacher/classroom-monitor.module.ts | 36 +-------------------- src/app/teacher/teacher-tools.module.ts | 2 ++ 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/app/teacher/classroom-monitor.module.ts b/src/app/teacher/classroom-monitor.module.ts index 388d4cd8d5f..f3060e654ab 100644 --- a/src/app/teacher/classroom-monitor.module.ts +++ b/src/app/teacher/classroom-monitor.module.ts @@ -1,43 +1,9 @@ import { NgModule } from '@angular/core'; -import { ComponentNewWorkBadgeComponent } from '../classroom-monitor/component-new-work-badge/component-new-work-badge.component'; import { PeerGroupGradingModule } from './peer-group-grading.module'; import { ComponentStudentModule } from '../../assets/wise5/components/component/component-student.module'; -import { NotebookWorkgroupGradingComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/notebook/notebook-workgroup-grading/notebook-workgroup-grading.component'; -import { StepItemComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component'; -import { NotificationsMenuComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/shared/notifications-menu/notifications-menu.component'; -import { NavItemComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/nodeProgress/nav-item/nav-item.component'; -import { NodeProgressViewComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/nodeProgress/node-progress-view/node-progress-view.component'; -import { NotebookGradingComponent } from '../../assets/wise5/classroomMonitor/notebook-grading/notebook-grading.component'; -import { StudentGradingComponent } from '../../assets/wise5/classroomMonitor/student-grading/student-grading.component'; -import { StudentProgressComponent } from '../../assets/wise5/classroomMonitor/student-progress/student-progress.component'; -import { ClassroomMonitorComponent } from '../../assets/wise5/classroomMonitor/classroom-monitor.component'; -import { ManageStudentsComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/manageStudents/manage-students/manage-students.component'; -import { RouterModule } from '@angular/router'; -import { SelectPeriodComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/select-period/select-period.component'; -import { GradingNodeService } from '../../assets/wise5/services/gradingNodeService'; import { StudentTeacherCommonServicesModule } from '../student-teacher-common-services.module'; -import { MilestonesComponent } from '../classroom-monitor/milestones/milestones.component'; @NgModule({ - imports: [ - ClassroomMonitorComponent, - ComponentNewWorkBadgeComponent, - ComponentStudentModule, - ManageStudentsComponent, - MilestonesComponent, - NavItemComponent, - NotificationsMenuComponent, - PeerGroupGradingModule, - RouterModule, - SelectPeriodComponent, - StepItemComponent, - StudentProgressComponent, - StudentTeacherCommonServicesModule, - NodeProgressViewComponent, - NotebookGradingComponent, - NotebookWorkgroupGradingComponent, - StudentGradingComponent - ], - providers: [GradingNodeService] + imports: [ComponentStudentModule, PeerGroupGradingModule, StudentTeacherCommonServicesModule] }) export class ClassroomMonitorModule {} diff --git a/src/app/teacher/teacher-tools.module.ts b/src/app/teacher/teacher-tools.module.ts index 8cf51303108..cea23594107 100644 --- a/src/app/teacher/teacher-tools.module.ts +++ b/src/app/teacher/teacher-tools.module.ts @@ -31,6 +31,7 @@ import { RouterModule } from '@angular/router'; import { TeacherToolsRoutingModule } from './teacher-tools-routing.module'; import { TeacherPauseScreenService } from '../../assets/wise5/services/teacherPauseScreenService'; import { RunStatusService } from '../../assets/wise5/services/runStatusService'; +import { GradingNodeService } from '../../assets/wise5/services/gradingNodeService'; @NgModule({ imports: [ClassroomMonitorModule, RouterModule, TeacherToolsRoutingModule], @@ -41,6 +42,7 @@ import { RunStatusService } from '../../assets/wise5/services/runStatusService'; DataExportService, { provide: DataService, useExisting: TeacherDataService }, GetWorkgroupService, + GradingNodeService, DeleteNodeService, ImportComponentService, InsertComponentService, From bdcf5fe0fd4855cef97e28ef8c4cabf3c472d602 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 17 Nov 2025 14:56:11 -0800 Subject: [PATCH 03/21] Remove PeerGroupGradingModule. Redundant. --- src/app/teacher/classroom-monitor.module.ts | 3 +- src/app/teacher/peer-group-grading.module.ts | 32 -------------------- 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 src/app/teacher/peer-group-grading.module.ts diff --git a/src/app/teacher/classroom-monitor.module.ts b/src/app/teacher/classroom-monitor.module.ts index f3060e654ab..b110a0a3d7b 100644 --- a/src/app/teacher/classroom-monitor.module.ts +++ b/src/app/teacher/classroom-monitor.module.ts @@ -1,9 +1,8 @@ import { NgModule } from '@angular/core'; -import { PeerGroupGradingModule } from './peer-group-grading.module'; import { ComponentStudentModule } from '../../assets/wise5/components/component/component-student.module'; import { StudentTeacherCommonServicesModule } from '../student-teacher-common-services.module'; @NgModule({ - imports: [ComponentStudentModule, PeerGroupGradingModule, StudentTeacherCommonServicesModule] + imports: [ComponentStudentModule, StudentTeacherCommonServicesModule] }) export class ClassroomMonitorModule {} diff --git a/src/app/teacher/peer-group-grading.module.ts b/src/app/teacher/peer-group-grading.module.ts deleted file mode 100644 index 0be30ee55be..00000000000 --- a/src/app/teacher/peer-group-grading.module.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { NgModule } from '@angular/core'; -import { PeerGroupAssignedWorkgroupsComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/peer-group/peer-group-assigned-workgroups/peer-group-assigned-workgroups.component'; -import { PeerGroupDialogComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/peer-group/peer-group-dialog/peer-group-dialog.component'; -import { PeerGroupGroupingComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/peer-group/peer-group-grouping/peer-group-grouping.component'; -import { PeerGroupMoveWorkgroupConfirmDialogComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/peer-group/peer-group-move-workgroup-confirm-dialog/peer-group-move-workgroup-confirm-dialog.component'; -import { PeerGroupPeriodComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/peer-group/peer-group-period/peer-group-period.component'; -import { PeerGroupUnassignedWorkgroupsComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/peer-group/peer-group-unassigned-workgroups/peer-group-unassigned-workgroups.component'; -import { PeerGroupWorkgroupComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/peer-group/peer-group-workgroup/peer-group-workgroup.component'; -import { SelectPeriodComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/select-period/select-period.component'; - -@NgModule({ - imports: [ - SelectPeriodComponent, - PeerGroupAssignedWorkgroupsComponent, - PeerGroupDialogComponent, - PeerGroupGroupingComponent, - PeerGroupMoveWorkgroupConfirmDialogComponent, - PeerGroupPeriodComponent, - PeerGroupUnassignedWorkgroupsComponent, - PeerGroupWorkgroupComponent - ], - exports: [ - PeerGroupAssignedWorkgroupsComponent, - PeerGroupDialogComponent, - PeerGroupGroupingComponent, - PeerGroupMoveWorkgroupConfirmDialogComponent, - PeerGroupPeriodComponent, - PeerGroupUnassignedWorkgroupsComponent, - PeerGroupWorkgroupComponent - ] -}) -export class PeerGroupGradingModule {} From a091d1d40e955ea827a9e425debc74cd1183ce69 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 17 Nov 2025 15:07:20 -0800 Subject: [PATCH 04/21] Remove ClassroomMonitorModule move deps to TeacherToolsModule. Remove unnecessary RouterModule dep --- src/app/teacher/classroom-monitor.module.ts | 8 -------- src/app/teacher/teacher-tools.module.ts | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 src/app/teacher/classroom-monitor.module.ts diff --git a/src/app/teacher/classroom-monitor.module.ts b/src/app/teacher/classroom-monitor.module.ts deleted file mode 100644 index b110a0a3d7b..00000000000 --- a/src/app/teacher/classroom-monitor.module.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { NgModule } from '@angular/core'; -import { ComponentStudentModule } from '../../assets/wise5/components/component/component-student.module'; -import { StudentTeacherCommonServicesModule } from '../student-teacher-common-services.module'; - -@NgModule({ - imports: [ComponentStudentModule, StudentTeacherCommonServicesModule] -}) -export class ClassroomMonitorModule {} diff --git a/src/app/teacher/teacher-tools.module.ts b/src/app/teacher/teacher-tools.module.ts index cea23594107..4419dfc995e 100644 --- a/src/app/teacher/teacher-tools.module.ts +++ b/src/app/teacher/teacher-tools.module.ts @@ -15,7 +15,6 @@ import { ImportComponentService } from '../../assets/wise5/services/importCompon import { InsertComponentService } from '../../assets/wise5/services/insertComponentService'; import { InsertNodesService } from '../../assets/wise5/services/insertNodesService'; import { MoveNodesService } from '../../assets/wise5/services/moveNodesService'; -import { ClassroomMonitorModule } from '../teacher/classroom-monitor.module'; import { UpdateWorkgroupService } from '../services/updateWorkgroupService'; import { GetWorkgroupService } from '../services/getWorkgroupService'; import { WorkgroupService } from '../services/workgroup.service'; @@ -27,14 +26,15 @@ import { PeerGroupService } from '../../assets/wise5/services/peerGroupService'; import { NodeService } from '../../assets/wise5/services/nodeService'; import { TeacherNodeService } from '../../assets/wise5/services/teacherNodeService'; import { MilestoneReportService } from '../../assets/wise5/services/milestoneReportService'; -import { RouterModule } from '@angular/router'; import { TeacherToolsRoutingModule } from './teacher-tools-routing.module'; import { TeacherPauseScreenService } from '../../assets/wise5/services/teacherPauseScreenService'; import { RunStatusService } from '../../assets/wise5/services/runStatusService'; import { GradingNodeService } from '../../assets/wise5/services/gradingNodeService'; +import { ComponentStudentModule } from '../../assets/wise5/components/component/component-student.module'; +import { StudentTeacherCommonServicesModule } from '../student-teacher-common-services.module'; @NgModule({ - imports: [ClassroomMonitorModule, RouterModule, TeacherToolsRoutingModule], + imports: [ComponentStudentModule, StudentTeacherCommonServicesModule, TeacherToolsRoutingModule], providers: [ ClassroomStatusService, CopyNodesService, From ab81de250cdc0c197fb49250be0c07f7cc3d02dd Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 17 Nov 2025 16:29:47 -0800 Subject: [PATCH 05/21] Remove StudentTeacherCommonServicesModule dep from ClassroomMonitorTestingModule --- .../classroom-monitor-testing.module.ts | 42 +++++++++++++++---- .../classroom-monitor.component.spec.ts | 8 +++- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts b/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts index bc446eec3cc..94495f73112 100644 --- a/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts +++ b/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts @@ -3,10 +3,8 @@ import { ClassroomStatusService } from '../services/classroomStatusService'; import { TeacherDataService } from '../services/teacherDataService'; import { TeacherProjectService } from '../services/teacherProjectService'; import { TeacherWebSocketService } from '../services/teacherWebSocketService'; -import { StudentTeacherCommonServicesModule } from '../../../app/student-teacher-common-services.module'; import { MatDialogModule } from '@angular/material/dialog'; import { provideHttpClientTesting } from '@angular/common/http/testing'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { MilestoneService } from '../services/milestoneService'; import { TeacherPeerGroupService } from '../services/teacherPeerGroupService'; import { MatSnackBarModule } from '@angular/material/snack-bar'; @@ -15,19 +13,47 @@ import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { TeacherPauseScreenService } from '../services/teacherPauseScreenService'; import { RunStatusService } from '../services/runStatusService'; import { GradingNodeService } from '../services/gradingNodeService'; +import { ConfigService } from '../services/configService'; +import { NotebookService } from '../services/notebookService'; +import { NotificationService } from '../services/notificationService'; +import { AnnotationService } from '../services/annotationService'; +import { BranchService } from '../services/branchService'; +import { ProjectService } from '../services/projectService'; +import { PathService } from '../services/pathService'; +import { ComponentServiceLookupService } from '../services/componentServiceLookupService'; +import { MockProvider } from 'ng-mocks'; +import { AchievementService } from '../services/achievementService'; +import { StudentAssetService } from '../services/studentAssetService'; +import { NodeService } from '../services/nodeService'; +import { SessionService } from '../services/sessionService'; +import { StudentNodeService } from '../services/studentNodeService'; +import { ConstraintService } from '../services/constraintService'; +import { StudentDataService } from '../services/studentDataService'; +import { NodeStatusService } from '../services/nodeStatusService'; @NgModule({ - imports: [ - BrowserAnimationsModule, - MatDialogModule, - MatSnackBarModule, - StudentTeacherCommonServicesModule - ], + imports: [MatDialogModule, MatSnackBarModule], providers: [ + AnnotationService, + MockProvider(AchievementService), + BranchService, + MockProvider(ComponentServiceLookupService), + ConfigService, + MockProvider(ConstraintService), ClassroomStatusService, GradingNodeService, MilestoneService, MilestoneReportService, + { provide: NodeService, useClass: StudentNodeService }, + NodeStatusService, + NotebookService, + NotificationService, + PathService, + ProjectService, + SessionService, + StudentAssetService, + StudentDataService, + StudentNodeService, TeacherDataService, TeacherPauseScreenService, TeacherPeerGroupService, diff --git a/src/assets/wise5/classroomMonitor/classroom-monitor.component.spec.ts b/src/assets/wise5/classroomMonitor/classroom-monitor.component.spec.ts index 28bebf674b2..223113bd3de 100644 --- a/src/assets/wise5/classroomMonitor/classroom-monitor.component.spec.ts +++ b/src/assets/wise5/classroomMonitor/classroom-monitor.component.spec.ts @@ -9,6 +9,8 @@ import { MainMenuComponent } from '../common/main-menu/main-menu.component'; import { WorkgroupService } from '../../../app/services/workgroup.service'; import { ConfigService } from '../services/configService'; import { TeacherDataService } from '../services/teacherDataService'; +import { NodeService } from '../services/nodeService'; +import { TeacherNodeService } from '../services/teacherNodeService'; let component: ClassroomMonitorComponent; let fixture: ComponentFixture; @@ -21,7 +23,11 @@ describe('ClassroomMonitorComponent', () => { MainMenuComponent, TopBarComponent ], - providers: [provideRouter([]), WorkgroupService] + providers: [ + provideRouter([]), + WorkgroupService, + { provide: NodeService, useClass: TeacherNodeService } + ] }).compileComponents(); const notebookService = TestBed.inject(NotebookService); spyOn(notebookService, 'isNotebookEnabled').and.returnValue(true); From 8b214fdc1de4b03f3ead8377f64f5c1395e4a376 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 17 Nov 2025 16:43:51 -0800 Subject: [PATCH 06/21] Removed PeerChatModule and imported components directly instead. --- .../peer-chat-authoring.component.ts | 4 +--- .../peer-chat-grading/peer-chat-grading.component.ts | 7 +++++-- .../peer-chat-student/peer-chat-student.component.ts | 5 ++--- .../wise5/components/peerChat/peer-chat.module.ts | 11 ----------- 4 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 src/assets/wise5/components/peerChat/peer-chat.module.ts diff --git a/src/assets/wise5/components/peerChat/peer-chat-authoring/peer-chat-authoring.component.ts b/src/assets/wise5/components/peerChat/peer-chat-authoring/peer-chat-authoring.component.ts index e549231c80a..b42e0c206fe 100644 --- a/src/assets/wise5/components/peerChat/peer-chat-authoring/peer-chat-authoring.component.ts +++ b/src/assets/wise5/components/peerChat/peer-chat-authoring/peer-chat-authoring.component.ts @@ -5,15 +5,13 @@ import { EditComponentPrompt } from '../../../../../app/authoring-tool/edit-comp import { EditDynamicPromptComponent } from '../../../../../app/authoring-tool/edit-dynamic-prompt/edit-dynamic-prompt.component'; import { EditQuestionBankComponent } from '../../../../../app/authoring-tool/edit-question-bank/edit-question-bank.component'; import { EditComponentPeerGroupingTagComponent } from '../../../../../app/authoring-tool/edit-component-peer-grouping-tag/edit-component-peer-grouping-tag.component'; -import { PeerChatModule } from '../peer-chat.module'; @Component({ imports: [ EditComponentPrompt, EditDynamicPromptComponent, EditQuestionBankComponent, - EditComponentPeerGroupingTagComponent, - PeerChatModule + EditComponentPeerGroupingTagComponent ], styleUrl: './peer-chat-authoring.component.scss', templateUrl: './peer-chat-authoring.component.html' diff --git a/src/assets/wise5/components/peerChat/peer-chat-grading/peer-chat-grading.component.ts b/src/assets/wise5/components/peerChat/peer-chat-grading/peer-chat-grading.component.ts index 65f1d6155a0..0caf7e0e7ad 100644 --- a/src/assets/wise5/components/peerChat/peer-chat-grading/peer-chat-grading.component.ts +++ b/src/assets/wise5/components/peerChat/peer-chat-grading/peer-chat-grading.component.ts @@ -13,10 +13,13 @@ import { PeerChatShowWorkComponent } from '../peer-chat-show-work/peer-chat-show import { PeerChatMessage } from '../PeerChatMessage'; import { PeerChatService } from '../peerChatService'; import { PeerGroup } from '../PeerGroup'; -import { PeerChatModule } from '../peer-chat.module'; +import { QuestionBankService } from '../peer-chat-question-bank/questionBank.service'; +import { PeerChatChatBoxComponent } from '../peer-chat-chat-box/peer-chat-chat-box.component'; +import { PeerChatQuestionBankComponent } from '../peer-chat-question-bank/peer-chat-question-bank.component'; @Component({ - imports: [PeerChatModule], + imports: [PeerChatChatBoxComponent, PeerChatQuestionBankComponent], + providers: [QuestionBankService], styleUrl: './peer-chat-grading.component.scss', templateUrl: './peer-chat-grading.component.html' }) diff --git a/src/assets/wise5/components/peerChat/peer-chat-student/peer-chat-student.component.ts b/src/assets/wise5/components/peerChat/peer-chat-student/peer-chat-student.component.ts index 4559e05d6fd..e0308bd75b6 100644 --- a/src/assets/wise5/components/peerChat/peer-chat-student/peer-chat-student.component.ts +++ b/src/assets/wise5/components/peerChat/peer-chat-student/peer-chat-student.component.ts @@ -27,16 +27,15 @@ import { ComponentHeaderComponent } from '../../../directives/component-header/c import { PeerChatQuestionBankComponent } from '../peer-chat-question-bank/peer-chat-question-bank.component'; import { PeerChatChatBoxComponent } from '../peer-chat-chat-box/peer-chat-chat-box.component'; import { ComponentAnnotationsComponent } from '../../../directives/componentAnnotations/component-annotations.component'; -import { PeerChatModule } from '../peer-chat.module'; @Component({ imports: [ ComponentAnnotationsComponent, ComponentHeaderComponent, PeerChatChatBoxComponent, - PeerChatQuestionBankComponent, - PeerChatModule + PeerChatQuestionBankComponent ], + providers: [QuestionBankService], selector: 'peer-chat-student', templateUrl: './peer-chat-student.component.html' }) diff --git a/src/assets/wise5/components/peerChat/peer-chat.module.ts b/src/assets/wise5/components/peerChat/peer-chat.module.ts deleted file mode 100644 index 96079d0630b..00000000000 --- a/src/assets/wise5/components/peerChat/peer-chat.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; -import { PeerChatChatBoxComponent } from './peer-chat-chat-box/peer-chat-chat-box.component'; -import { PeerChatQuestionBankComponent } from './peer-chat-question-bank/peer-chat-question-bank.component'; -import { QuestionBankService } from './peer-chat-question-bank/questionBank.service'; - -@NgModule({ - imports: [PeerChatChatBoxComponent, PeerChatQuestionBankComponent], - exports: [PeerChatChatBoxComponent, PeerChatQuestionBankComponent], - providers: [QuestionBankService] -}) -export class PeerChatModule {} From 03e2a9d59c7ab92b437f0be3ac16f32bf1fe2cf4 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 17 Nov 2025 17:23:15 -0800 Subject: [PATCH 07/21] Replace ngIf with new syntax --- .../milestone-class-responses.component.html | 230 +++++++++--------- .../milestone-class-responses.component.ts | 3 +- 2 files changed, 122 insertions(+), 111 deletions(-) diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html index fb2706fb1ac..c989c9e8c08 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html @@ -39,125 +39,137 @@ i18n-aria-label > Team - - arrow_drop_up - + @if (sortBy === 'workgroupId' || sortBy === '-workgroupId') { + + arrow_drop_up + + } - - + } + @if (milestone.report.locations.length == 1) { + - + } + @if (milestone.report.locations.length > 1) { + - + } + @if (milestone.report.locations.length > 1) { + - + } + @if (milestone.report.locations.length > 1) { + + +/- + @if (sortBy === 'changeInScore' || sortBy === '-changeInScore') { + + arrow_drop_up + + } + + }
- - + @if (isWorkgroupShown(workgroup)) { + + + }
diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.ts index e897975032e..a98e0a87414 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.ts +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.ts @@ -8,7 +8,7 @@ import { Notification } from '../../../../../../app/domain/notification'; import { MatList, MatListItem } from '@angular/material/list'; import { WorkgroupSelectAutocompleteComponent } from '../../../../../../app/classroom-monitor/workgroup-select/workgroup-select-autocomplete/workgroup-select-autocomplete.component'; import { MatButton } from '@angular/material/button'; -import { NgIf, NgClass, NgFor } from '@angular/common'; +import { NgClass, NgFor } from '@angular/common'; import { MatIcon } from '@angular/material/icon'; import { MatTooltip } from '@angular/material/tooltip'; import { IntersectionObserverModule } from '@ng-web-apis/intersection-observer'; @@ -20,7 +20,6 @@ import { MilestoneWorkgroupItemComponent } from '../milestone-workgroup-item/mil MatListItem, WorkgroupSelectAutocompleteComponent, MatButton, - NgIf, MatIcon, NgClass, MatTooltip, From e9e6e60a8ba5ef21982c107818cb01bc375e4eaf Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 17 Nov 2025 17:27:29 -0800 Subject: [PATCH 08/21] Replace ngFor with new syntax --- .../milestone-class-responses.component.html | 4 +-- .../milestone-class-responses.component.ts | 3 +- src/messages.xlf | 32 +++++++++---------- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html index c989c9e8c08..b63649b53cd 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html @@ -157,7 +157,7 @@
- + @for (workgroup of sortedWorkgroups; track workgroup.workgroupId) { @if (isWorkgroupShown(workgroup)) { } - + }
diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.ts index a98e0a87414..9dd5a7a4056 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.ts +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.ts @@ -8,7 +8,7 @@ import { Notification } from '../../../../../../app/domain/notification'; import { MatList, MatListItem } from '@angular/material/list'; import { WorkgroupSelectAutocompleteComponent } from '../../../../../../app/classroom-monitor/workgroup-select/workgroup-select-autocomplete/workgroup-select-autocomplete.component'; import { MatButton } from '@angular/material/button'; -import { NgClass, NgFor } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatIcon } from '@angular/material/icon'; import { MatTooltip } from '@angular/material/tooltip'; import { IntersectionObserverModule } from '@ng-web-apis/intersection-observer'; @@ -24,7 +24,6 @@ import { MilestoneWorkgroupItemComponent } from '../milestone-workgroup-item/mil NgClass, MatTooltip, IntersectionObserverModule, - NgFor, MilestoneWorkgroupItemComponent ], encapsulation: ViewEncapsulation.None, diff --git a/src/messages.xlf b/src/messages.xlf index 5f678b4d7f8..8fa89812f11 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -2441,7 +2441,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 75,77 + 78,80 src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html @@ -14133,7 +14133,7 @@ The branches will be removed but the steps will remain in the unit. Team src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 41,43 + 41,42 src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-details/milestone-details.component.html @@ -14156,7 +14156,7 @@ The branches will be removed but the steps will remain in the unit. Sort by completion src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 55,58 + 56,59 src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html @@ -14167,7 +14167,7 @@ The branches will be removed but the steps will remain in the unit. Status src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 58,60 + 59,60 src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html @@ -14182,7 +14182,7 @@ The branches will be removed but the steps will remain in the unit. Sort by score src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 72,75 + 75,78 src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html @@ -14197,37 +14197,37 @@ The branches will be removed but the steps will remain in the unit. Sort by score on Step src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 89,90 + 94,95 src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 91,92 + 96,97 src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 109,110 + 116,117 src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 111,112 + 118,119 Sort by change in score src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 130,132 + 139,141 src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 132,135 + 141,144 +/- src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 136,138 + 145,146 @@ -20635,14 +20635,14 @@ If this problem continues, let your teacher know and move on to the next activit You are not allowed to delete this Grouping Logic because you must have at least one. src/assets/wise5/components/peerChat/peer-chat-authoring/peer-chat-authoring.component.ts - 68 + 66 Are you sure you want to delete this Grouping Logic? src/assets/wise5/components/peerChat/peer-chat-authoring/peer-chat-authoring.component.ts - 70 + 68 @@ -20730,14 +20730,14 @@ If this problem continues, let your teacher know and move on to the next activit You have new chat messages src/assets/wise5/components/peerChat/peer-chat-student/peer-chat-student.component.ts - 252 + 251 Are you sure you want to replace the current text in your response input box with this text? src/assets/wise5/components/peerChat/peer-chat-student/peer-chat-student.component.ts - 302 + 301 From 12e4d575347e9687990874c44deb4ba3aca79062 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Wed, 19 Nov 2025 12:04:31 -0800 Subject: [PATCH 09/21] Added comments on why we can't replace ShowGroup/MyWorkStudentModule with components --- .../wise5/components/component/component-student.module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/wise5/components/component/component-student.module.ts b/src/assets/wise5/components/component/component-student.module.ts index 1bb857809fd..13c2c664dc9 100644 --- a/src/assets/wise5/components/component/component-student.module.ts +++ b/src/assets/wise5/components/component/component-student.module.ts @@ -37,8 +37,8 @@ import { OpenResponseStudent } from '../openResponse/open-response-student/open- OpenResponseStudent, OutsideUrlStudent, PeerChatStudentComponent, - ShowGroupWorkStudentModule, - ShowMyWorkStudentModule, + ShowGroupWorkStudentModule, // can't be converted to component - circular dependency with ComponentStudent? + ShowMyWorkStudentModule, // can't be converted to component - circular dependency with ComponentStudent? StudentAssetsDialogComponent, SummaryStudent, TableStudentComponent From 10a7b399de60b099f29236e1f88f82d9a9cdc46f Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Wed, 19 Nov 2025 12:22:07 -0800 Subject: [PATCH 10/21] Remove Dialog and Snack modules from ClassroomMonitorTesting module. Unused. --- .../wise5/classroomMonitor/classroom-monitor-testing.module.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts b/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts index 94495f73112..4c36554035b 100644 --- a/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts +++ b/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts @@ -3,11 +3,9 @@ import { ClassroomStatusService } from '../services/classroomStatusService'; import { TeacherDataService } from '../services/teacherDataService'; import { TeacherProjectService } from '../services/teacherProjectService'; import { TeacherWebSocketService } from '../services/teacherWebSocketService'; -import { MatDialogModule } from '@angular/material/dialog'; import { provideHttpClientTesting } from '@angular/common/http/testing'; import { MilestoneService } from '../services/milestoneService'; import { TeacherPeerGroupService } from '../services/teacherPeerGroupService'; -import { MatSnackBarModule } from '@angular/material/snack-bar'; import { MilestoneReportService } from '../services/milestoneReportService'; import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; import { TeacherPauseScreenService } from '../services/teacherPauseScreenService'; @@ -32,7 +30,6 @@ import { StudentDataService } from '../services/studentDataService'; import { NodeStatusService } from '../services/nodeStatusService'; @NgModule({ - imports: [MatDialogModule, MatSnackBarModule], providers: [ AnnotationService, MockProvider(AchievementService), From a9b15543269303248c2b5809fc60d124ab7698f7 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 10:36:08 -0800 Subject: [PATCH 11/21] Update tests to not use ComponentTypeService. Removed ComponentInfoDialogComponent. Should be re-written from scratch. --- .../component-info-dialog.component.spec.ts | 122 ------------------ .../component-type-selector.component.spec.ts | 38 +++++- .../services/componentTypeService.module.ts | 10 -- 3 files changed, 31 insertions(+), 139 deletions(-) delete mode 100644 src/assets/wise5/authoringTool/components/component-info-dialog/component-info-dialog.component.spec.ts delete mode 100644 src/assets/wise5/services/componentTypeService.module.ts diff --git a/src/assets/wise5/authoringTool/components/component-info-dialog/component-info-dialog.component.spec.ts b/src/assets/wise5/authoringTool/components/component-info-dialog/component-info-dialog.component.spec.ts deleted file mode 100644 index ef53b19aaec..00000000000 --- a/src/assets/wise5/authoringTool/components/component-info-dialog/component-info-dialog.component.spec.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ComponentInfoDialogComponent } from './component-info-dialog.component'; -import { MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { provideHttpClientTesting } from '@angular/common/http/testing'; -import { ProjectService } from '../../../services/projectService'; -import { ComponentInfoService } from '../../../services/componentInfoService'; -import { ComponentInfoDialogHarness } from './component-info-dialog.harness'; -import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; -import { MultipleChoiceInfo } from '../../../components/multipleChoice/MultipleChoiceInfo'; -import { OutsideUrlInfo } from '../../../components/outsideURL/OutsideUrlInfo'; -import { OpenResponseInfo } from '../../../components/openResponse/OpenResponseInfo'; -import { ComponentInfo } from '../../../components/ComponentInfo'; -import { ComponentTypeServiceModule } from '../../../services/componentTypeService.module'; -import { ComponentStudentModule } from '../../../../../assets/wise5/components/component/component-student.module'; -import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; - -let component: ComponentInfoDialogComponent; -let fixture: ComponentFixture; -let harness: ComponentInfoDialogHarness; -let multipleChoiceInfo = new MultipleChoiceInfo(); -let openResponseInfo = new OpenResponseInfo(); -let outsideUrlInfo = new OutsideUrlInfo(); - -// TODO: get tests working again -xdescribe('ComponentInfoDialogComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ComponentInfoDialogComponent, ComponentStudentModule, ComponentTypeServiceModule], - providers: [ - ComponentInfoService, - { provide: MAT_DIALOG_DATA, useValue: 'OpenResponse' }, - provideHttpClient(withInterceptorsFromDi()), - provideHttpClientTesting() - ] - }).compileComponents(); - fixture = TestBed.createComponent(ComponentInfoDialogComponent); - const projectService = TestBed.inject(ProjectService); - projectService.project = {}; - component = fixture.componentInstance; - fixture.detectChanges(); - harness = await TestbedHarnessEnvironment.harnessForFixture( - fixture, - ComponentInfoDialogHarness - ); - }); - displayComponentWhenLoaded(); - goToPreviousComponent(); - goToNextComponent(); - selectComponent(); - selectComponentWithMultipleExamples(); -}); - -function displayComponentWhenLoaded(): void { - describe('initially loads with a component type', () => { - it('displays the component', async () => { - await expectComponentType(openResponseInfo); - }); - }); -} - -function goToPreviousComponent(): void { - describe('go to previous component', () => { - it('displays the previous component', async () => { - const componentTypeSelector = await harness.getComponentTypeSelector(); - (await componentTypeSelector.getPreviousComponentTypeButton()).click(); - await expectComponentType(multipleChoiceInfo); - }); - }); -} - -function goToNextComponent(): void { - describe('go to next component', () => { - it('displays the next component', async () => { - const componentTypeSelector = await harness.getComponentTypeSelector(); - (await componentTypeSelector.getNextComponentTypeButton()).click(); - await expectComponentType(outsideUrlInfo); - }); - }); -} - -function selectComponent(): void { - describe('select component', () => { - it('displays the selected component', async () => { - await selectComponentType('Multiple Choice'); - await expectComponentType(multipleChoiceInfo); - }); - }); -} - -function selectComponentWithMultipleExamples(): void { - describe('change to component type with multiple examples', () => { - it('displays multiple examples', async () => { - await selectComponentType('Multiple Choice'); - const tabGroup = await harness.getTabGroup(); - const expectedLabels = multipleChoiceInfo - .getPreviewExamples() - .map((example: any) => example.label); - await expectTabLabels(await tabGroup.getTabs(), expectedLabels); - }); - }); -} - -async function selectComponentType(componentType: string): Promise { - const componentTypeSelector = await harness.getComponentTypeSelector(); - const select = await componentTypeSelector.getComponentTypeSelect(); - await select.clickOptions({ text: componentType }); -} - -async function expectComponentType(componentInfo: ComponentInfo): Promise { - const componentTypeSelector = await harness.getComponentTypeSelector(); - const select = await componentTypeSelector.getComponentTypeSelect(); - expect(await select.getValueText()).toEqual(componentInfo.getLabel()); - const description = await harness.getDescription(); - expect(await description.text()).toEqual(componentInfo.getDescription()); -} - -async function expectTabLabels(tabs: any[], expectedLabels: string[]): Promise { - for (let i = 0; i < tabs.length; i++) { - const tabLabel = await tabs[i].getLabel(); - expect(tabLabel).toEqual(expectedLabels[i]); - } -} diff --git a/src/assets/wise5/authoringTool/components/component-type-selector/component-type-selector.component.spec.ts b/src/assets/wise5/authoringTool/components/component-type-selector/component-type-selector.component.spec.ts index 61931450ceb..c430964161d 100644 --- a/src/assets/wise5/authoringTool/components/component-type-selector/component-type-selector.component.spec.ts +++ b/src/assets/wise5/authoringTool/components/component-type-selector/component-type-selector.component.spec.ts @@ -3,10 +3,11 @@ import { provideHttpClient } from '@angular/common/http'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { UserService } from '../../../../../app/services/user.service'; import { StudentTeacherCommonServicesModule } from '../../../../../app/student-teacher-common-services.module'; -import { ComponentTypeServiceModule } from '../../../services/componentTypeService.module'; import { ConfigService } from '../../../services/configService'; import { ComponentTypeSelectorComponent } from './component-type-selector.component'; import { ComponentTypeSelectorHarness } from './component-type-selector.harness'; +import { MockProviders } from 'ng-mocks'; +import { ComponentTypeService } from '../../../services/componentTypeService'; let component: ComponentTypeSelectorComponent; let componentTypeSelectorHarness: ComponentTypeSelectorHarness; @@ -16,14 +17,37 @@ let userService: UserService; describe('ComponentTypeSelectorComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - imports: [ - ComponentTypeSelectorComponent, - ComponentTypeServiceModule, - StudentTeacherCommonServicesModule - ], - providers: [provideHttpClient()] + imports: [ComponentTypeSelectorComponent, StudentTeacherCommonServicesModule], + providers: [ + MockProviders(ComponentTypeService, ConfigService, UserService), + provideHttpClient() + ] }); fixture = TestBed.createComponent(ComponentTypeSelectorComponent); + const componentTypeService = TestBed.inject(ComponentTypeService); + spyOn(componentTypeService, 'getComponentTypes').and.returnValue([ + { type: 'AiChat', name: 'AI Chat' }, + { type: 'Animation', name: 'Animation' }, + { type: 'AudioOscillator', name: 'Audio Oscillator' }, + { type: 'ConceptMap', name: 'Concept Map' }, + { type: 'DialogGuidance', name: 'Dialog Guidance' }, + { type: 'Discussion', name: 'Discussion' }, + { type: 'Draw', name: 'Draw' }, + { type: 'Embedded', name: 'Embedded' }, + { type: 'Graph', name: 'Graph' }, + { type: 'Label', name: 'Label' }, + { type: 'Match', name: 'Match' }, + { type: 'MultipleChoice', name: 'Multiple Choice' }, + { type: 'OpenResponse', name: 'Open Response' }, + { type: 'OutsideURL', name: 'Outside URL' }, + { type: 'PeerChat', name: 'Peer Chat' }, + { type: 'HTML', name: 'HTML' }, + { type: 'ShowGroupWork', name: 'Show Group Work' }, + { type: 'ShowMyWork', name: 'Show My Work' }, + { type: 'Summary', name: 'Summary' }, + { type: 'Table', name: 'Table' } + ]); + configService = TestBed.inject(ConfigService); spyOn(configService, 'getConfigParam').and.returnValue(true); userService = TestBed.inject(UserService); diff --git a/src/assets/wise5/services/componentTypeService.module.ts b/src/assets/wise5/services/componentTypeService.module.ts deleted file mode 100644 index 2b1ec0038f1..00000000000 --- a/src/assets/wise5/services/componentTypeService.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { ComponentServiceLookupService } from './componentServiceLookupService'; -import { UserService } from '../../../app/services/user.service'; -import { ComponentTypeService } from './componentTypeService'; -import { ConfigService } from '../../../app/services/config.service'; - -@NgModule({ - providers: [ComponentServiceLookupService, ComponentTypeService, ConfigService, UserService] -}) -export class ComponentTypeServiceModule {} From ad21fb28e49cb6f7710e0dc030bae6c7d92f778b Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 11:37:25 -0800 Subject: [PATCH 12/21] Replace ImportComponentRoutingModule with just a an array of Routes --- ...nt-routing.module.ts => import-component.routes.ts} | 10 ++-------- .../node/node-authoring-routing.module.ts | 4 +--- 2 files changed, 3 insertions(+), 11 deletions(-) rename src/assets/wise5/authoringTool/importComponent/{import-component-routing.module.ts => import-component.routes.ts} (64%) diff --git a/src/assets/wise5/authoringTool/importComponent/import-component-routing.module.ts b/src/assets/wise5/authoringTool/importComponent/import-component.routes.ts similarity index 64% rename from src/assets/wise5/authoringTool/importComponent/import-component-routing.module.ts rename to src/assets/wise5/authoringTool/importComponent/import-component.routes.ts index 52f5600acd2..40e88cab1e1 100644 --- a/src/assets/wise5/authoringTool/importComponent/import-component-routing.module.ts +++ b/src/assets/wise5/authoringTool/importComponent/import-component.routes.ts @@ -1,9 +1,8 @@ -import { RouterModule, Routes } from '@angular/router'; -import { NgModule } from '@angular/core'; +import { Routes } from '@angular/router'; import { ChooseImportComponentComponent } from './choose-import-component/choose-import-component.component'; import { ChooseImportUnitComponent } from '../../../../app/authoring-tool/import-step/choose-import-unit/choose-import-unit.component'; -const routes: Routes = [ +export const routes: Routes = [ { path: 'choose-component', component: ChooseImportComponentComponent @@ -13,8 +12,3 @@ const routes: Routes = [ component: ChooseImportUnitComponent } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)] -}) -export class ImportComponentRoutingModule {} diff --git a/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts b/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts index 55e08584450..2d05d259df0 100644 --- a/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts +++ b/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts @@ -20,9 +20,7 @@ const routes: Routes = [ { path: 'import-component', loadChildren: () => - import('../importComponent/import-component-routing.module').then( - (m) => m.ImportComponentRoutingModule - ) + import('../importComponent/import-component.routes').then((m) => m.routes) } ] } From ed31bc820a0548a7621972d9fdff473a0fde6443 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 11:41:13 -0800 Subject: [PATCH 13/21] Replace NodeAdvancedAuthoringRoutingModule with a simple array of Routes --- ...anced-routing.module.ts => node-advanced.routes.ts} | 10 ++-------- .../node/node-authoring-routing.module.ts | 3 +-- 2 files changed, 3 insertions(+), 10 deletions(-) rename src/assets/wise5/authoringTool/node/advanced/{node-advanced-routing.module.ts => node-advanced.routes.ts} (82%) diff --git a/src/assets/wise5/authoringTool/node/advanced/node-advanced-routing.module.ts b/src/assets/wise5/authoringTool/node/advanced/node-advanced.routes.ts similarity index 82% rename from src/assets/wise5/authoringTool/node/advanced/node-advanced-routing.module.ts rename to src/assets/wise5/authoringTool/node/advanced/node-advanced.routes.ts index f70609ed9d7..43ff0a3f8af 100644 --- a/src/assets/wise5/authoringTool/node/advanced/node-advanced-routing.module.ts +++ b/src/assets/wise5/authoringTool/node/advanced/node-advanced.routes.ts @@ -1,5 +1,4 @@ -import { RouterModule, Routes } from '@angular/router'; -import { NgModule } from '@angular/core'; +import { Routes } from '@angular/router'; import { NodeAdvancedAuthoringComponent } from './node-advanced-authoring/node-advanced-authoring.component'; import { NodeAdvancedConstraintAuthoringComponent } from './constraint/node-advanced-constraint-authoring.component'; import { NodeAdvancedGeneralAuthoringComponent } from './general/node-advanced-general-authoring.component'; @@ -7,7 +6,7 @@ import { NodeAdvancedJsonAuthoringComponent } from './json/node-advanced-json-au import { NodeAdvancedPathAuthoringComponent } from './path/node-advanced-path-authoring.component'; import { EditNodeRubricComponent } from '../editRubric/edit-node-rubric.component'; -const routes: Routes = [ +export const routes: Routes = [ { path: '', component: NodeAdvancedAuthoringComponent, @@ -20,8 +19,3 @@ const routes: Routes = [ ] } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)] -}) -export class NodeAdvancedRoutingModule {} diff --git a/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts b/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts index 2d05d259df0..604f7102f79 100644 --- a/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts +++ b/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts @@ -14,8 +14,7 @@ const routes: Routes = [ }, { path: 'advanced', - loadChildren: () => - import('./advanced/node-advanced-routing.module').then((m) => m.NodeAdvancedRoutingModule) + loadChildren: () => import('./advanced/node-advanced.routes').then((m) => m.routes) }, { path: 'import-component', From f2fa94e3012935a2933eaea3493dc0a932c624e6 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 11:44:20 -0800 Subject: [PATCH 14/21] Replace NodeAuthoringRoutingModule with a simple array of Routes --- src/app/teacher/authoring-routing.module.ts | 4 ++-- ...ring-routing.module.ts => node-authoring.routes.ts} | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) rename src/assets/wise5/authoringTool/node/{node-authoring-routing.module.ts => node-authoring.routes.ts} (74%) diff --git a/src/app/teacher/authoring-routing.module.ts b/src/app/teacher/authoring-routing.module.ts index d4f506fde32..b1f646f1302 100644 --- a/src/app/teacher/authoring-routing.module.ts +++ b/src/app/teacher/authoring-routing.module.ts @@ -123,8 +123,8 @@ const routes: Routes = [ { path: 'node/:nodeId', loadChildren: () => - import('../../assets/wise5/authoringTool/node/node-authoring-routing.module').then( - (m) => m.NodeAuthoringRoutingModule + import('../../assets/wise5/authoringTool/node/node-authoring.routes').then( + (m) => m.routes ) }, { diff --git a/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts b/src/assets/wise5/authoringTool/node/node-authoring.routes.ts similarity index 74% rename from src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts rename to src/assets/wise5/authoringTool/node/node-authoring.routes.ts index 604f7102f79..9be00dd5cba 100644 --- a/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts +++ b/src/assets/wise5/authoringTool/node/node-authoring.routes.ts @@ -1,9 +1,8 @@ -import { RouterModule, Routes } from '@angular/router'; -import { NgModule } from '@angular/core'; +import { Routes } from '@angular/router'; import { NodeAuthoringParentComponent } from './node-authoring-parent/node-authoring-parent.component'; import { NodeAuthoringComponent } from './node-authoring/node-authoring.component'; -const routes: Routes = [ +export const routes: Routes = [ { path: '', component: NodeAuthoringParentComponent, @@ -24,8 +23,3 @@ const routes: Routes = [ ] } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)] -}) -export class NodeAuthoringRoutingModule {} From b7b3287a318a8a927a96dae6707aaaa5161686ab Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 11:58:53 -0800 Subject: [PATCH 15/21] Replace StructureAuthoringRoutingModule with a simple array of Routes --- .../addLesson/add-lesson-routing.module.ts | 6 +++--- ...routing.module.ts => structure-authoring.routes.ts} | 10 ++-------- 2 files changed, 5 insertions(+), 11 deletions(-) rename src/assets/wise5/authoringTool/structure/{structure-authoring-routing.module.ts => structure-authoring.routes.ts} (76%) diff --git a/src/assets/wise5/authoringTool/addLesson/add-lesson-routing.module.ts b/src/assets/wise5/authoringTool/addLesson/add-lesson-routing.module.ts index c28f9947343..209aba15fe6 100644 --- a/src/assets/wise5/authoringTool/addLesson/add-lesson-routing.module.ts +++ b/src/assets/wise5/authoringTool/addLesson/add-lesson-routing.module.ts @@ -15,9 +15,9 @@ const routes: Routes = [ { path: 'structure', loadChildren: () => - import( - '../../../../assets/wise5/authoringTool/structure/structure-authoring-routing.module' - ).then((m) => m.StructureAuthoringRoutingModule) + import('../../../../assets/wise5/authoringTool/structure/structure-authoring.routes').then( + (m) => m.routes + ) } ]; diff --git a/src/assets/wise5/authoringTool/structure/structure-authoring-routing.module.ts b/src/assets/wise5/authoringTool/structure/structure-authoring.routes.ts similarity index 76% rename from src/assets/wise5/authoringTool/structure/structure-authoring-routing.module.ts rename to src/assets/wise5/authoringTool/structure/structure-authoring.routes.ts index 230450530a8..e172bb7a2d4 100644 --- a/src/assets/wise5/authoringTool/structure/structure-authoring-routing.module.ts +++ b/src/assets/wise5/authoringTool/structure/structure-authoring.routes.ts @@ -1,11 +1,10 @@ -import { NgModule } from '@angular/core'; import { JigsawComponent } from './jigsaw/jigsaw.component'; import { SelfDirectedInvestigationComponent } from './self-directed-investigation/self-directed-investigation.component'; import { KiCycleUsingOerComponent } from './ki-cycle-using-oer/ki-cycle-using-oer.component'; import { PeerReviewAndRevisionComponent } from './peer-review-and-revision/peer-review-and-revision.component'; -import { RouterModule, Routes } from '@angular/router'; +import { Routes } from '@angular/router'; -const routes: Routes = [ +export const routes: Routes = [ { path: '', children: [ @@ -16,8 +15,3 @@ const routes: Routes = [ ] } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)] -}) -export class StructureAuthoringRoutingModule {} From 0e327ed159240cbde0b86020231698439d8f953d Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 12:03:32 -0800 Subject: [PATCH 16/21] Replace AddLessonRoutingModule with a simple array of Routes. Fix insert lesson before button orientation --- src/app/teacher/authoring-routing.module.ts | 4 ++-- .../add-lesson-button.component.html | 2 +- ...son-routing.module.ts => add-lesson.routes.ts} | 15 +++------------ 3 files changed, 6 insertions(+), 15 deletions(-) rename src/assets/wise5/authoringTool/addLesson/{add-lesson-routing.module.ts => add-lesson.routes.ts} (51%) diff --git a/src/app/teacher/authoring-routing.module.ts b/src/app/teacher/authoring-routing.module.ts index b1f646f1302..0558bf3d453 100644 --- a/src/app/teacher/authoring-routing.module.ts +++ b/src/app/teacher/authoring-routing.module.ts @@ -53,8 +53,8 @@ const routes: Routes = [ { path: 'add-lesson', loadChildren: () => - import('../../assets/wise5/authoringTool/addLesson/add-lesson-routing.module').then( - (m) => m.AddLessonRoutingModule + import('../../assets/wise5/authoringTool/addLesson/add-lesson.routes').then( + (m) => m.routes ) }, { diff --git a/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html b/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html index ded923378b0..849f60986aa 100644 --- a/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html +++ b/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html @@ -25,7 +25,7 @@ } diff --git a/src/assets/wise5/authoringTool/addNode/add-node-routing.module.ts b/src/assets/wise5/authoringTool/addNode/add-node.routes.ts similarity index 79% rename from src/assets/wise5/authoringTool/addNode/add-node-routing.module.ts rename to src/assets/wise5/authoringTool/addNode/add-node.routes.ts index 02ad5584c98..2d09084cce9 100644 --- a/src/assets/wise5/authoringTool/addNode/add-node-routing.module.ts +++ b/src/assets/wise5/authoringTool/addNode/add-node.routes.ts @@ -1,5 +1,4 @@ -import { RouterModule, Routes } from '@angular/router'; -import { NgModule } from '@angular/core'; +import { Routes } from '@angular/router'; import { AddYourOwnNodeComponent } from './add-your-own-node/add-your-own-node.component'; import { ChooseAutomatedAssessmentComponent } from './choose-automated-assessment/choose-automated-assessment.component'; import { ConfigureAutomatedAssessmentComponent } from './configure-automated-assessment/configure-automated-assessment.component'; @@ -8,7 +7,7 @@ import { ChooseSimulationComponent } from './choose-simulation/choose-simulation import { ChooseImportStepComponent } from '../../../../app/authoring-tool/import-step/choose-import-step/choose-import-step.component'; import { ChooseImportUnitComponent } from '../../../../app/authoring-tool/import-step/choose-import-unit/choose-import-unit.component'; -const routes: Routes = [ +export const routes: Routes = [ { path: 'add-your-own', component: AddYourOwnNodeComponent @@ -20,7 +19,10 @@ const routes: Routes = [ path: 'choose-item', component: ChooseAutomatedAssessmentComponent }, - { path: 'configure', component: ConfigureAutomatedAssessmentComponent } + { + path: 'configure', + component: ConfigureAutomatedAssessmentComponent + } ] }, { @@ -42,11 +44,11 @@ const routes: Routes = [ }, { path: 'simulation', - children: [{ path: 'choose-item', component: ChooseSimulationComponent }] + children: [ + { + path: 'choose-item', + component: ChooseSimulationComponent + } + ] } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)] -}) -export class AddNodeRoutingModule {} From 590f5a01494b735b7f81a5a340f1d53ad20f06a0 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 12:32:22 -0800 Subject: [PATCH 18/21] Replace AuthoringRoutingModule with a simple array of Routes --- ...uthoring-routing.module.ts => authoring.routes.ts} | 11 ++--------- src/app/teacher/teacher-authoring.module.ts | 5 +++-- 2 files changed, 5 insertions(+), 11 deletions(-) rename src/app/teacher/{authoring-routing.module.ts => authoring.routes.ts} (95%) diff --git a/src/app/teacher/authoring-routing.module.ts b/src/app/teacher/authoring.routes.ts similarity index 95% rename from src/app/teacher/authoring-routing.module.ts rename to src/app/teacher/authoring.routes.ts index 125fbeaddbb..6310e0a952a 100644 --- a/src/app/teacher/authoring-routing.module.ts +++ b/src/app/teacher/authoring.routes.ts @@ -1,10 +1,9 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; +import { Routes } from '@angular/router'; import { AuthoringConfigResolver } from './authoring.config.resolver'; import { AuthoringProjectResolver } from './authoring.project.resolver'; import { RecoveryAuthoringProjectResolver } from './recovery-authoring-project.resolver'; -const routes: Routes = [ +export const authoringRoutes: Routes = [ { path: '', loadComponent: () => @@ -139,9 +138,3 @@ const routes: Routes = [ ] } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class AuthoringRoutingModule {} diff --git a/src/app/teacher/teacher-authoring.module.ts b/src/app/teacher/teacher-authoring.module.ts index 96288dca94d..5555d1ed662 100644 --- a/src/app/teacher/teacher-authoring.module.ts +++ b/src/app/teacher/teacher-authoring.module.ts @@ -26,7 +26,7 @@ import { PeerGroupService } from '../../assets/wise5/services/peerGroupService'; import { NodeService } from '../../assets/wise5/services/nodeService'; import { TeacherNodeService } from '../../assets/wise5/services/teacherNodeService'; import { MilestoneReportService } from '../../assets/wise5/services/milestoneReportService'; -import { AuthoringRoutingModule } from './authoring-routing.module'; +import { authoringRoutes } from './authoring.routes'; import { ComponentInfoService } from '../../assets/wise5/services/componentInfoService'; import { CreateBranchService } from '../../assets/wise5/services/createBranchService'; import { EditBranchService } from '../../assets/wise5/services/editBranchService'; @@ -42,10 +42,11 @@ import { RegisterProjectService } from '../../assets/wise5/services/registerProj import { StudentTeacherCommonServicesModule } from '../student-teacher-common-services.module'; import { EditComponentAdvancedComponent } from '../authoring-tool/edit-component-advanced/edit-component-advanced.component'; import { PeerGroupingAuthoringService } from '../../assets/wise5/services/peerGroupingAuthoringService'; +import { RouterModule } from '@angular/router'; @NgModule({ imports: [ - AuthoringRoutingModule, + RouterModule.forChild(authoringRoutes), EditComponentAdvancedComponent, // TODO: refactor. currently needed for peer grouping authoring dialog to work StudentTeacherCommonServicesModule ], From 7f81fc804749b442c00cfe5775500b762e10a959 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 12:36:51 -0800 Subject: [PATCH 19/21] Replace TeacherToolsRoutingModule with a simple array of Routes --- src/app/teacher/teacher-tools.module.ts | 9 ++++++-- ...ting.module.ts => teacher-tools.routes.ts} | 21 ++++--------------- 2 files changed, 11 insertions(+), 19 deletions(-) rename src/app/teacher/{teacher-tools-routing.module.ts => teacher-tools.routes.ts} (88%) diff --git a/src/app/teacher/teacher-tools.module.ts b/src/app/teacher/teacher-tools.module.ts index 4419dfc995e..53d9871b6dc 100644 --- a/src/app/teacher/teacher-tools.module.ts +++ b/src/app/teacher/teacher-tools.module.ts @@ -26,15 +26,20 @@ import { PeerGroupService } from '../../assets/wise5/services/peerGroupService'; import { NodeService } from '../../assets/wise5/services/nodeService'; import { TeacherNodeService } from '../../assets/wise5/services/teacherNodeService'; import { MilestoneReportService } from '../../assets/wise5/services/milestoneReportService'; -import { TeacherToolsRoutingModule } from './teacher-tools-routing.module'; +import { teacherToolsRoutes } from './teacher-tools.routes'; import { TeacherPauseScreenService } from '../../assets/wise5/services/teacherPauseScreenService'; import { RunStatusService } from '../../assets/wise5/services/runStatusService'; import { GradingNodeService } from '../../assets/wise5/services/gradingNodeService'; import { ComponentStudentModule } from '../../assets/wise5/components/component/component-student.module'; import { StudentTeacherCommonServicesModule } from '../student-teacher-common-services.module'; +import { RouterModule } from '@angular/router'; @NgModule({ - imports: [ComponentStudentModule, StudentTeacherCommonServicesModule, TeacherToolsRoutingModule], + imports: [ + ComponentStudentModule, + StudentTeacherCommonServicesModule, + RouterModule.forChild(teacherToolsRoutes) + ], providers: [ ClassroomStatusService, CopyNodesService, diff --git a/src/app/teacher/teacher-tools-routing.module.ts b/src/app/teacher/teacher-tools.routes.ts similarity index 88% rename from src/app/teacher/teacher-tools-routing.module.ts rename to src/app/teacher/teacher-tools.routes.ts index 1f7761f8f85..7e72cb04fa6 100644 --- a/src/app/teacher/teacher-tools-routing.module.ts +++ b/src/app/teacher/teacher-tools.routes.ts @@ -1,5 +1,4 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; +import { Routes } from '@angular/router'; import { ClassroomMonitorComponent } from '../../assets/wise5/classroomMonitor/classroom-monitor.component'; import { TeacherToolsResolver } from './teacher-tools.resolver'; import { NodeProgressViewComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/nodeProgress/node-progress-view/node-progress-view.component'; @@ -18,7 +17,7 @@ import { ExportOneWorkgroupPerRowComponent } from '../../assets/wise5/classroomM import { ExportStudentWorkComponent } from '../../assets/wise5/classroomMonitor/dataExport/export-student-work/export-student-work.component'; import { NodeGradingComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component'; -const routes: Routes = [ +export const teacherToolsRoutes: Routes = [ { path: 'unit/:unitId', component: ClassroomMonitorComponent, @@ -35,15 +34,9 @@ const routes: Routes = [ { path: 'manage-students', component: ManageStudentsComponent }, { path: 'milestones', component: MilestonesComponent }, { path: 'group/:nodeId', component: NodeProgressViewComponent }, - { - path: 'node/:nodeId', - component: NodeGradingComponent - }, + { path: 'node/:nodeId', component: NodeGradingComponent }, { path: 'notebook', component: NotebookGradingComponent }, - { - path: 'team', - component: StudentProgressComponent - }, + { path: 'team', component: StudentProgressComponent }, { path: 'team/:workgroupId', component: StudentGradingComponent, @@ -52,9 +45,3 @@ const routes: Routes = [ ] } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class TeacherToolsRoutingModule {} From 934eddd83382c6937fe6097e2a4e4652e9ff15a8 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 17:08:37 -0800 Subject: [PATCH 20/21] Replace ForgotRoutingModule with a simple array of Routes --- src/app/app-routing.module.ts | 2 +- .../{forgot-routing.module.ts => forgot.routes.ts} | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) rename src/app/forgot/{forgot-routing.module.ts => forgot.routes.ts} (92%) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 0e5ba41938f..aa911b01b88 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -32,7 +32,7 @@ const routes: Routes = [ }, { path: 'forgot', - loadChildren: () => import('./forgot/forgot-routing.module').then((m) => m.ForgotRoutingModule) + loadChildren: () => import('./forgot/forgot.routes').then((m) => m.routes) }, { path: 'help', diff --git a/src/app/forgot/forgot-routing.module.ts b/src/app/forgot/forgot.routes.ts similarity index 92% rename from src/app/forgot/forgot-routing.module.ts rename to src/app/forgot/forgot.routes.ts index 66c1d8eb9db..91c299e4f3c 100644 --- a/src/app/forgot/forgot-routing.module.ts +++ b/src/app/forgot/forgot.routes.ts @@ -1,5 +1,4 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { Routes } from '@angular/router'; import { ForgotComponent } from './forgot.component'; import { ForgotHomeComponent } from './forgot-home/forgot-home.component'; import { ForgotStudentComponent } from './student/forgot-student/forgot-student.component'; @@ -15,7 +14,7 @@ import { ForgotTeacherPasswordVerifyComponent } from './teacher/forgot-teacher-p import { ForgotTeacherPasswordChangeComponent } from './teacher/forgot-teacher-password-change/forgot-teacher-password-change.component'; import { ForgotUserPasswordCompleteComponent } from './forgot-user-password-complete/forgot-user-password-complete.component'; -const routes: Routes = [ +export const routes: Routes = [ { path: '', component: ForgotComponent, @@ -37,9 +36,3 @@ const routes: Routes = [ ] } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class ForgotRoutingModule {} From d01285e5e8710cb3cca1c05c3bc554d797f714ae Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 21 Nov 2025 17:10:35 -0800 Subject: [PATCH 21/21] Replace HelpRoutingModule with a simple array of Routes --- src/app/app-routing.module.ts | 2 +- .../help/{help-routing.module.ts => help.routes.ts} | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) rename src/app/help/{help-routing.module.ts => help.routes.ts} (73%) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index aa911b01b88..12143ef17f2 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -36,7 +36,7 @@ const routes: Routes = [ }, { path: 'help', - loadChildren: () => import('./help/help-routing.module').then((m) => m.HelpRoutingModule) + loadChildren: () => import('./help/help.routes').then((m) => m.routes) }, { path: 'join', diff --git a/src/app/help/help-routing.module.ts b/src/app/help/help.routes.ts similarity index 73% rename from src/app/help/help-routing.module.ts rename to src/app/help/help.routes.ts index 7ddfc43d57b..c2567a6fab3 100644 --- a/src/app/help/help-routing.module.ts +++ b/src/app/help/help.routes.ts @@ -1,12 +1,11 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; +import { Routes } from '@angular/router'; import { HelpComponent } from './help.component'; import { HelpHomeComponent } from './help-home/help-home.component'; import { GettingStartedComponent } from './faq/getting-started/getting-started.component'; import { TeacherFaqComponent } from './faq/teacher-faq/teacher-faq.component'; import { StudentFaqComponent } from './faq/student-faq/student-faq.component'; -const helpRoutes: Routes = [ +export const routes: Routes = [ { path: '', component: HelpComponent, @@ -18,9 +17,3 @@ const helpRoutes: Routes = [ ] } ]; - -@NgModule({ - imports: [RouterModule.forChild(helpRoutes)], - exports: [RouterModule] -}) -export class HelpRoutingModule {}