diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 0e5ba41938f..12143ef17f2 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -32,11 +32,11 @@ 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', - 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/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/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 {} 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 {} diff --git a/src/app/teacher/authoring-routing.module.ts b/src/app/teacher/authoring.routes.ts similarity index 90% rename from src/app/teacher/authoring-routing.module.ts rename to src/app/teacher/authoring.routes.ts index d4f506fde32..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: () => @@ -53,15 +52,15 @@ 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 ) }, { path: 'add-node', loadChildren: () => - import('../../assets/wise5/authoringTool/addNode/add-node-routing.module').then( - (m) => m.AddNodeRoutingModule + import('../../assets/wise5/authoringTool/addNode/add-node.routes').then( + (m) => m.routes ) }, { @@ -123,8 +122,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 ) }, { @@ -139,9 +138,3 @@ const routes: Routes = [ ] } ]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class AuthoringRoutingModule {} diff --git a/src/app/teacher/classroom-monitor.module.ts b/src/app/teacher/classroom-monitor.module.ts deleted file mode 100644 index dd367cdc0a7..00000000000 --- a/src/app/teacher/classroom-monitor.module.ts +++ /dev/null @@ -1,43 +0,0 @@ -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 { 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'; - -@NgModule({ - imports: [ - ClassroomMonitorComponent, - ComponentNewWorkBadgeComponent, - ComponentStudentModule, - ManageStudentsComponent, - MilestoneModule, - NavItemComponent, - NotificationsMenuComponent, - PeerGroupGradingModule, - RouterModule, - SelectPeriodComponent, - StepItemComponent, - StudentProgressComponent, - StudentTeacherCommonServicesModule, - NodeProgressViewComponent, - NotebookGradingComponent, - NotebookWorkgroupGradingComponent, - StudentGradingComponent - ], - providers: [GradingNodeService] -}) -export class ClassroomMonitorModule {} 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 }) - ); - } - } -} 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 {} 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 ], diff --git a/src/app/teacher/teacher-tools.module.ts b/src/app/teacher/teacher-tools.module.ts index 8cf51303108..53d9871b6dc 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,13 +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 { RouterModule } from '@angular/router'; -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: [ClassroomMonitorModule, RouterModule, TeacherToolsRoutingModule], + imports: [ + ComponentStudentModule, + StudentTeacherCommonServicesModule, + RouterModule.forChild(teacherToolsRoutes) + ], providers: [ ClassroomStatusService, CopyNodesService, @@ -41,6 +47,7 @@ import { RunStatusService } from '../../assets/wise5/services/runStatusService'; DataExportService, { provide: DataService, useExisting: TeacherDataService }, GetWorkgroupService, + GradingNodeService, DeleteNodeService, ImportComponentService, InsertComponentService, 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 {} 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/addLesson/add-lesson-routing.module.ts b/src/assets/wise5/authoringTool/addLesson/add-lesson-routing.module.ts deleted file mode 100644 index c28f9947343..00000000000 --- a/src/assets/wise5/authoringTool/addLesson/add-lesson-routing.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { RouterModule, Routes } from '@angular/router'; -import { AddLessonChooseTemplateComponent } from './add-lesson-choose-template/add-lesson-choose-template.component'; -import { AddLessonConfigureComponent } from './add-lesson-configure/add-lesson-configure.component'; -import { NgModule } from '@angular/core'; - -const routes: Routes = [ - { - path: '', - component: AddLessonChooseTemplateComponent - }, - { - path: 'configure', - component: AddLessonConfigureComponent - }, - { - path: 'structure', - loadChildren: () => - import( - '../../../../assets/wise5/authoringTool/structure/structure-authoring-routing.module' - ).then((m) => m.StructureAuthoringRoutingModule) - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)] -}) -export class AddLessonRoutingModule {} diff --git a/src/assets/wise5/authoringTool/addLesson/add-lesson.routes.ts b/src/assets/wise5/authoringTool/addLesson/add-lesson.routes.ts new file mode 100644 index 00000000000..c5c7ba99727 --- /dev/null +++ b/src/assets/wise5/authoringTool/addLesson/add-lesson.routes.ts @@ -0,0 +1,18 @@ +import { Routes } from '@angular/router'; +import { AddLessonChooseTemplateComponent } from './add-lesson-choose-template/add-lesson-choose-template.component'; +import { AddLessonConfigureComponent } from './add-lesson-configure/add-lesson-configure.component'; + +export const routes: Routes = [ + { + path: '', + component: AddLessonChooseTemplateComponent + }, + { + path: 'configure', + component: AddLessonConfigureComponent + }, + { + path: 'structure', + loadChildren: () => import('../structure/structure-authoring.routes').then((m) => m.routes) + } +]; 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 {} 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/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/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 deleted file mode 100644 index 55e08584450..00000000000 --- a/src/assets/wise5/authoringTool/node/node-authoring-routing.module.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { RouterModule, Routes } from '@angular/router'; -import { NgModule } from '@angular/core'; -import { NodeAuthoringParentComponent } from './node-authoring-parent/node-authoring-parent.component'; -import { NodeAuthoringComponent } from './node-authoring/node-authoring.component'; - -const routes: Routes = [ - { - path: '', - component: NodeAuthoringParentComponent, - children: [ - { - path: '', - component: NodeAuthoringComponent - }, - { - path: 'advanced', - loadChildren: () => - import('./advanced/node-advanced-routing.module').then((m) => m.NodeAdvancedRoutingModule) - }, - { - path: 'import-component', - loadChildren: () => - import('../importComponent/import-component-routing.module').then( - (m) => m.ImportComponentRoutingModule - ) - } - ] - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)] -}) -export class NodeAuthoringRoutingModule {} diff --git a/src/assets/wise5/authoringTool/node/node-authoring.routes.ts b/src/assets/wise5/authoringTool/node/node-authoring.routes.ts new file mode 100644 index 00000000000..9be00dd5cba --- /dev/null +++ b/src/assets/wise5/authoringTool/node/node-authoring.routes.ts @@ -0,0 +1,25 @@ +import { Routes } from '@angular/router'; +import { NodeAuthoringParentComponent } from './node-authoring-parent/node-authoring-parent.component'; +import { NodeAuthoringComponent } from './node-authoring/node-authoring.component'; + +export const routes: Routes = [ + { + path: '', + component: NodeAuthoringParentComponent, + children: [ + { + path: '', + component: NodeAuthoringComponent + }, + { + path: 'advanced', + loadChildren: () => import('./advanced/node-advanced.routes').then((m) => m.routes) + }, + { + path: 'import-component', + loadChildren: () => + import('../importComponent/import-component.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 {} diff --git a/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts b/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts index bc446eec3cc..4c36554035b 100644 --- a/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts +++ b/src/assets/wise5/classroomMonitor/classroom-monitor-testing.module.ts @@ -3,31 +3,54 @@ 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'; import { MilestoneReportService } from '../services/milestoneReportService'; 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 - ], 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); 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..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 @@ -39,126 +39,138 @@ 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 + + } + + }
- - - - + @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 e897975032e..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 { NgIf, 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'; @@ -20,12 +20,10 @@ import { MilestoneWorkgroupItemComponent } from '../milestone-workgroup-item/mil MatListItem, WorkgroupSelectAutocompleteComponent, MatButton, - NgIf, MatIcon, NgClass, MatTooltip, IntersectionObserverModule, - NgFor, MilestoneWorkgroupItemComponent ], encapsulation: ViewEncapsulation.None, 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 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 {} 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 {} 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