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/authoring-tool/edit-component-advanced/edit-component-advanced.component.ts b/src/app/authoring-tool/edit-component-advanced/edit-component-advanced.component.ts index 5ed088f581a..92d606db2b1 100644 --- a/src/app/authoring-tool/edit-component-advanced/edit-component-advanced.component.ts +++ b/src/app/authoring-tool/edit-component-advanced/edit-component-advanced.component.ts @@ -15,11 +15,11 @@ import { Component as WISEComponent } from '../../../assets/wise5/common/Compone import { components } from '../../../assets/wise5/components/Components'; @Component({ - templateUrl: './edit-component-advanced.component.html', + imports: [MatDivider, MatDialogModule, MatButtonModule], styles: [ '.mat-divider { margin: 0 -16px; } .mat-mdc-dialog-content { padding-top: 10px !important; padding-bottom: 10px !important; }' ], - imports: [MatDivider, MatDialogModule, MatButtonModule] + templateUrl: './edit-component-advanced.component.html' }) export class EditComponentAdvancedComponent { @ViewChild('component') private componentElementRef: ElementRef; diff --git a/src/app/classroom-monitor/alert-status-corner/alert-status-corner.component.ts b/src/app/classroom-monitor/alert-status-corner/alert-status-corner.component.ts index d0fd0273542..97e5f3e1ca1 100644 --- a/src/app/classroom-monitor/alert-status-corner/alert-status-corner.component.ts +++ b/src/app/classroom-monitor/alert-status-corner/alert-status-corner.component.ts @@ -3,10 +3,10 @@ import { Component, Input } from '@angular/core'; import { MatTooltipModule } from '@angular/material/tooltip'; @Component({ - imports: [CommonModule, MatTooltipModule], - selector: 'alert-status-corner', - styleUrl: 'alert-status-corner.scss', - templateUrl: 'alert-status-corner.component.html' + imports: [CommonModule, MatTooltipModule], + selector: 'alert-status-corner', + styleUrl: 'alert-status-corner.scss', + templateUrl: 'alert-status-corner.component.html' }) export class AlertStatusCornerComponent { @Input() hasNewAlert: boolean; 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/classroom-monitor/status-icon/status-icon.component.html b/src/app/classroom-monitor/status-icon/status-icon.component.html deleted file mode 100644 index 2d9ba937c0e..00000000000 --- a/src/app/classroom-monitor/status-icon/status-icon.component.html +++ /dev/null @@ -1,3 +0,0 @@ - - {{ name }} - diff --git a/src/app/classroom-monitor/status-icon/status-icon.component.ts b/src/app/classroom-monitor/status-icon/status-icon.component.ts index 916b246a9ff..85d9af57b02 100644 --- a/src/app/classroom-monitor/status-icon/status-icon.component.ts +++ b/src/app/classroom-monitor/status-icon/status-icon.component.ts @@ -3,9 +3,18 @@ import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; @Component({ - imports: [MatIconModule, MatTooltipModule], - selector: 'status-icon', - templateUrl: 'status-icon.component.html' + imports: [MatIconModule, MatTooltipModule], + selector: 'status-icon', + template: ` + + {{ name }} + + ` }) export class StatusIconComponent { @Input() class: string; diff --git a/src/app/forgot/forgot-user-password-complete/forgot-user-password-complete.component.ts b/src/app/forgot/forgot-user-password-complete/forgot-user-password-complete.component.ts index 06a3b48323f..a1046b5f2c9 100644 --- a/src/app/forgot/forgot-user-password-complete/forgot-user-password-complete.component.ts +++ b/src/app/forgot/forgot-user-password-complete/forgot-user-password-complete.component.ts @@ -4,8 +4,8 @@ import { MatButton } from '@angular/material/button'; import { MatCard, MatCardContent } from '@angular/material/card'; @Component({ - templateUrl: './forgot-user-password-complete.component.html', - imports: [MatCard, MatCardContent, MatButton] + imports: [MatCard, MatCardContent, MatButton], + templateUrl: './forgot-user-password-complete.component.html' }) export class ForgotUserPasswordCompleteComponent { @Input() username: string; 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.component.ts b/src/app/help/help.component.ts index 4a43be9a7d9..10077fd8380 100644 --- a/src/app/help/help.component.ts +++ b/src/app/help/help.component.ts @@ -2,9 +2,9 @@ import { Component } from '@angular/core'; import { RouterModule } from '@angular/router'; @Component({ - imports: [RouterModule], - selector: 'app-help', - styleUrl: './help.component.scss', - templateUrl: './help.component.html' + imports: [RouterModule], + selector: 'app-help', + styleUrl: './help.component.scss', + templateUrl: './help.component.html' }) export class HelpComponent {} 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/modules/header/header-signin/header-signin.component.ts b/src/app/modules/header/header-signin/header-signin.component.ts index 4a1e34e2ca6..d23c6aba1a7 100644 --- a/src/app/modules/header/header-signin/header-signin.component.ts +++ b/src/app/modules/header/header-signin/header-signin.component.ts @@ -2,9 +2,9 @@ import { Component } from '@angular/core'; import { RouterModule } from '@angular/router'; @Component({ - selector: 'app-header-signin', - imports: [RouterModule], - templateUrl: './header-signin.component.html', - styleUrls: ['./header-signin.component.scss'] + imports: [RouterModule], + selector: 'app-header-signin', + styleUrl: './header-signin.component.scss', + templateUrl: './header-signin.component.html' }) export class HeaderSigninComponent {} diff --git a/src/app/modules/library/select-all-items-checkbox/select-all-items-checkbox.component.ts b/src/app/modules/library/select-all-items-checkbox/select-all-items-checkbox.component.ts index 284ce2f3cff..b7938150b00 100644 --- a/src/app/modules/library/select-all-items-checkbox/select-all-items-checkbox.component.ts +++ b/src/app/modules/library/select-all-items-checkbox/select-all-items-checkbox.component.ts @@ -5,11 +5,11 @@ import { MatTooltipModule } from '@angular/material/tooltip'; type SelectAllItemsStatus = 'none' | 'some' | 'all'; @Component({ - imports: [MatCheckboxModule, MatTooltipModule], - providers: [{ provide: MAT_CHECKBOX_DEFAULT_OPTIONS, useValue: { clickAction: 'noop' } }], - selector: 'select-all-items-checkbox', - styleUrl: 'select-all-items-checkbox.component.scss', - templateUrl: './select-all-items-checkbox.component.html' + imports: [MatCheckboxModule, MatTooltipModule], + providers: [{ provide: MAT_CHECKBOX_DEFAULT_OPTIONS, useValue: { clickAction: 'noop' } }], + selector: 'select-all-items-checkbox', + styleUrl: 'select-all-items-checkbox.component.scss', + templateUrl: './select-all-items-checkbox.component.html' }) export class SelectAllItemsCheckboxComponent { @Output() allSelectedEvent: EventEmitter = new EventEmitter(); diff --git a/src/app/modules/shared/blurb/blurb.component.ts b/src/app/modules/shared/blurb/blurb.component.ts index 6359b46d8fd..f185623b995 100644 --- a/src/app/modules/shared/blurb/blurb.component.ts +++ b/src/app/modules/shared/blurb/blurb.component.ts @@ -2,10 +2,10 @@ import { CommonModule } from '@angular/common'; import { Component, ContentChild, Input, TemplateRef } from '@angular/core'; @Component({ - imports: [CommonModule], - selector: 'app-blurb', - styleUrl: './blurb.component.scss', - templateUrl: './blurb.component.html' + imports: [CommonModule], + selector: 'app-blurb', + styleUrl: './blurb.component.scss', + templateUrl: './blurb.component.html' }) export class BlurbComponent { @Input() content: string; diff --git a/src/app/modules/shared/search-bar/search-bar.component.ts b/src/app/modules/shared/search-bar/search-bar.component.ts index 50fbc9b2307..60a1d321378 100644 --- a/src/app/modules/shared/search-bar/search-bar.component.ts +++ b/src/app/modules/shared/search-bar/search-bar.component.ts @@ -16,18 +16,18 @@ import { MatInputModule } from '@angular/material/input'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; @Component({ - encapsulation: ViewEncapsulation.None, - imports: [ - CommonModule, - MatButtonModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - ReactiveFormsModule - ], - selector: 'app-search-bar', - styleUrl: './search-bar.component.scss', - templateUrl: './search-bar.component.html' + encapsulation: ViewEncapsulation.None, + imports: [ + CommonModule, + MatButtonModule, + MatFormFieldModule, + MatIconModule, + MatInputModule, + ReactiveFormsModule + ], + selector: 'app-search-bar', + styleUrl: './search-bar.component.scss', + templateUrl: './search-bar.component.html' }) export class SearchBarComponent implements OnInit { @Output('update') change: EventEmitter = new EventEmitter(); diff --git a/src/app/notebook/notebook-launcher/notebook-launcher.component.ts b/src/app/notebook/notebook-launcher/notebook-launcher.component.ts index fb800baa662..8bea999e762 100644 --- a/src/app/notebook/notebook-launcher/notebook-launcher.component.ts +++ b/src/app/notebook/notebook-launcher/notebook-launcher.component.ts @@ -7,16 +7,19 @@ import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; @Component({ - imports: [MatButtonModule, MatIconModule, MatTooltipModule], - selector: 'notebook-launcher', - templateUrl: 'notebook-launcher.component.html' + imports: [MatButtonModule, MatIconModule, MatTooltipModule], + selector: 'notebook-launcher', + templateUrl: 'notebook-launcher.component.html' }) export class NotebookLauncherComponent { protected label: string = ''; @Input() notebookConfig: any; private subscription: Subscription = new Subscription(); - constructor(private notebookService: NotebookService, private projectService: ProjectService) {} + constructor( + private notebookService: NotebookService, + private projectService: ProjectService + ) {} ngOnInit(): void { this.setLabel(); diff --git a/src/app/notebook/notebook.module.ts b/src/app/notebook/notebook.module.ts deleted file mode 100644 index 928f6fa8967..00000000000 --- a/src/app/notebook/notebook.module.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatSidenavModule } from '@angular/material/sidenav'; -import { MatTabsModule } from '@angular/material/tabs'; -import { MatToolbarModule } from '@angular/material/toolbar'; -import { MatTooltipModule } from '@angular/material/tooltip'; -import { EditorModule } from '@tinymce/tinymce-angular'; -import { ComponentStateInfoComponent } from '../../assets/wise5/common/component-state-info/component-state-info.component'; -import { NotebookItemComponent } from './notebook-item/notebook-item.component'; -import { NotebookLauncherComponent } from './notebook-launcher/notebook-launcher.component'; -import { NotebookNotesComponent } from './notebook-notes/notebook-notes.component'; -import { NotebookReportComponent } from './notebook-report/notebook-report.component'; -import { WiseTinymceEditorComponent } from '../../assets/wise5/directives/wise-tinymce-editor/wise-tinymce-editor.component'; - -@NgModule({ - imports: [ - CommonModule, - ComponentStateInfoComponent, - EditorModule, - MatButtonModule, - MatCardModule, - MatDialogModule, - MatDividerModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - MatSidenavModule, - MatTabsModule, - MatToolbarModule, - MatTooltipModule, - NotebookItemComponent, - NotebookLauncherComponent, - NotebookNotesComponent, - NotebookReportComponent, - WiseTinymceEditorComponent - ], - exports: [ - NotebookItemComponent, - NotebookLauncherComponent, - NotebookNotesComponent, - NotebookReportComponent - ] -}) -export class NotebookModule {} diff --git a/src/app/student-teacher-common-services.module.ts b/src/app/student-teacher-common-services.module.ts index 98ac36eec2d..54f5d1bacd6 100644 --- a/src/app/student-teacher-common-services.module.ts +++ b/src/app/student-teacher-common-services.module.ts @@ -37,7 +37,6 @@ import { OutsideURLService } from '../assets/wise5/components/outsideURL/outside import { PathService } from '../assets/wise5/services/pathService'; import { PeerChatService } from '../assets/wise5/components/peerChat/peerChatService'; import { PeerGroupService } from '../assets/wise5/services/peerGroupService'; -import { CRaterPingService } from '../assets/wise5/services/cRaterPingService'; import { ProjectLibraryService } from '../assets/wise5/services/projectLibraryService'; import { ProjectService } from '../assets/wise5/services/projectService'; import { SessionService } from '../assets/wise5/services/sessionService'; @@ -101,7 +100,6 @@ import { WiseLinkService } from './services/wiseLinkService'; PathService, PeerChatService, PeerGroupService, - CRaterPingService, ProjectLibraryService, { provide: ProjectService, useExisting: VLEProjectService }, SessionService, diff --git a/src/app/student-teacher-common.module.ts b/src/app/student-teacher-common.module.ts deleted file mode 100644 index e7f7ea6ffa2..00000000000 --- a/src/app/student-teacher-common.module.ts +++ /dev/null @@ -1,112 +0,0 @@ -import '../assets/wise5/lib/jquery/jquery-global'; -import { NgModule } from '@angular/core'; -import { DragDropModule } from '@angular/cdk/drag-drop'; -import { CommonModule } from '@angular/common'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatButtonModule } from '@angular/material/button'; -import { MatListModule } from '@angular/material/list'; -import { NodeIconComponent } from '../assets/wise5/vle/node-icon/node-icon.component'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatTooltipModule } from '@angular/material/tooltip'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatCardModule } from '@angular/material/card'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatSelectModule } from '@angular/material/select'; -import { NodeStatusIconComponent } from '../assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { EditorModule } from '@tinymce/tinymce-angular'; -import { MatSidenavModule } from '@angular/material/sidenav'; -import { MatTabsModule } from '@angular/material/tabs'; -import { MatAutocompleteModule } from '@angular/material/autocomplete'; -import { MatButtonToggleModule } from '@angular/material/button-toggle'; -import { MatToolbarModule } from '@angular/material/toolbar'; -import { MatSlideToggleModule } from '@angular/material/slide-toggle'; -import { MatRadioModule } from '@angular/material/radio'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatChipsModule } from '@angular/material/chips'; -import { NotebookModule } from './notebook/notebook.module'; -import { MatSliderModule } from '@angular/material/slider'; -import { DialogResponsesComponent } from '../assets/wise5/components/dialogGuidance/dialog-responses/dialog-responses.component'; -import { HighchartsChartModule } from 'highcharts-angular'; -import { StudentTeacherCommonServicesModule } from './student-teacher-common-services.module'; -import { MathModule } from './math/math.module'; -import { MatMenuModule } from '@angular/material/menu'; -import { ScrollingModule } from '@angular/cdk/scrolling'; - -@NgModule({ - imports: [ - CommonModule, - DialogResponsesComponent, - DragDropModule, - EditorModule, - FormsModule, - HighchartsChartModule, - MatAutocompleteModule, - MatButtonModule, - MatButtonToggleModule, - MatCardModule, - MatCheckboxModule, - MatDialogModule, - MatDividerModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - MatListModule, - MatMenuModule, - MatProgressBarModule, - MatProgressSpinnerModule, - MatRadioModule, - MatSelectModule, - MatSidenavModule, - MatSliderModule, - MatTabsModule, - MatToolbarModule, - MatSlideToggleModule, - MatTooltipModule, - MathModule, - NodeIconComponent, - NodeStatusIconComponent, - NotebookModule, - ReactiveFormsModule, - ScrollingModule, - StudentTeacherCommonServicesModule - ], - exports: [ - CommonModule, - DialogResponsesComponent, - DragDropModule, - EditorModule, - FormsModule, - MatAutocompleteModule, - MatButtonModule, - MatButtonToggleModule, - MatCardModule, - MatCheckboxModule, - MatChipsModule, - MatDialogModule, - MatDividerModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - MatListModule, - MatMenuModule, - MatProgressBarModule, - MatProgressSpinnerModule, - MatRadioModule, - MatSelectModule, - MatSidenavModule, - MatSliderModule, - MatSlideToggleModule, - MatTabsModule, - MatToolbarModule, - MatTooltipModule, - MathModule, - NodeIconComponent, - NotebookModule, - ReactiveFormsModule - ] -}) -export class StudentTeacherCommonModule {} diff --git a/src/app/student/student-routing.module.ts b/src/app/student/student-routing.module.ts index 9039d55dd8c..8269d47f7d5 100644 --- a/src/app/student/student-routing.module.ts +++ b/src/app/student/student-routing.module.ts @@ -1,6 +1,5 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; - import { StudentComponent } from './student.component'; import { StudentHomeComponent } from './student-home/student-home.component'; import { AuthGuard } from './auth.guard'; @@ -18,7 +17,8 @@ const studentRoutes: Routes = [ { path: 'profile/edit', component: EditComponent }, { path: 'unit/:unitId', - loadChildren: () => import('./vle/student-vle.module').then((m) => m.StudentVLEModule) + loadChildren: () => + import('./vle/student-vle-routing.module').then((m) => m.StudentVLERoutingModule) } ] } diff --git a/src/app/student/student.component.module.ts b/src/app/student/student.component.module.ts deleted file mode 100644 index c0b766b231a..00000000000 --- a/src/app/student/student.component.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule } from '@angular/core'; -import { AddToNotebookButtonComponent } from '../../assets/wise5/directives/add-to-notebook-button/add-to-notebook-button.component'; -import { ComponentHeaderComponent } from '../../assets/wise5/directives/component-header/component-header.component'; -import { ComponentSaveSubmitButtonsComponent } from '../../assets/wise5/directives/component-save-submit-buttons/component-save-submit-buttons.component'; -import { ComponentAnnotationsComponent } from '../../assets/wise5/directives/componentAnnotations/component-annotations.component'; -import { ComponentStateInfoComponent } from '../../assets/wise5/common/component-state-info/component-state-info.component'; - -@NgModule({ - imports: [ - AddToNotebookButtonComponent, - ComponentAnnotationsComponent, - ComponentHeaderComponent, - ComponentSaveSubmitButtonsComponent, - ComponentStateInfoComponent - ], - exports: [ - AddToNotebookButtonComponent, - ComponentAnnotationsComponent, - ComponentHeaderComponent, - ComponentSaveSubmitButtonsComponent - ] -}) -export class StudentComponentModule {} diff --git a/src/app/student/vle/student-vle-routing.module.ts b/src/app/student/vle/student-vle-routing.module.ts index b34e5958f5d..c68ed3be4c5 100644 --- a/src/app/student/vle/student-vle-routing.module.ts +++ b/src/app/student/vle/student-vle-routing.module.ts @@ -1,7 +1,21 @@ +import '../../../assets/wise5/lib/jquery/jquery-global'; import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { VLEParentComponent } from '../../../assets/wise5/vle/vle-parent/vle-parent.component'; import { VLEComponent } from '../../../assets/wise5/vle/vle.component'; +import { GenerateImageService } from '../../../assets/wise5/services/generateImageService'; +import { InitializeVLEService } from '../../../assets/wise5/services/initializeVLEService'; +import { PauseScreenService } from '../../../assets/wise5/services/pauseScreenService'; +import { ComponentStudentModule } from '../../../assets/wise5/components/component/component-student.module'; +import { ProjectService } from '../../../assets/wise5/services/projectService'; +import { StudentDataService } from '../../../assets/wise5/services/studentDataService'; +import { VLEProjectService } from '../../../assets/wise5/vle/vleProjectService'; +import { DataService } from '../../services/data.service'; +import { StudentNotificationService } from '../../../assets/wise5/services/studentNotificationService'; +import { NotificationService } from '../../../assets/wise5/services/notificationService'; +import { StudentPeerGroupService } from '../../../assets/wise5/services/studentPeerGroupService'; +import { PeerGroupService } from '../../../assets/wise5/services/peerGroupService'; +import { StudentTeacherCommonServicesModule } from '../../student-teacher-common-services.module'; const routes: Routes = [ { @@ -17,7 +31,21 @@ const routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] + imports: [ + RouterModule.forChild(routes), + ComponentStudentModule, + StudentTeacherCommonServicesModule + ], + providers: [ + GenerateImageService, + InitializeVLEService, + PauseScreenService, + { provide: DataService, useExisting: StudentDataService }, + { provide: NotificationService, useExisting: StudentNotificationService }, + { provide: PeerGroupService, useExisting: StudentPeerGroupService }, + { provide: ProjectService, useExisting: VLEProjectService }, + StudentNotificationService, + VLEProjectService + ] }) export class StudentVLERoutingModule {} diff --git a/src/app/student/vle/student-vle.module.ts b/src/app/student/vle/student-vle.module.ts deleted file mode 100644 index f330518de7d..00000000000 --- a/src/app/student/vle/student-vle.module.ts +++ /dev/null @@ -1,48 +0,0 @@ -import '../../../assets/wise5/lib/jquery/jquery-global'; -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { MatDialogModule } from '@angular/material/dialog'; -import { ComponentStudentModule } from '../../../assets/wise5/components/component/component-student.module'; -import { InitializeVLEService } from '../../../assets/wise5/services/initializeVLEService'; -import { ProjectService } from '../../../assets/wise5/services/projectService'; -import { StudentDataService } from '../../../assets/wise5/services/studentDataService'; -import { VLEComponent } from '../../../assets/wise5/vle/vle.component'; -import { VLEProjectService } from '../../../assets/wise5/vle/vleProjectService'; -import { StudentTeacherCommonModule } from '../../student-teacher-common.module'; -import { DataService } from '../../services/data.service'; -import { StudentComponentModule } from '../student.component.module'; -import { StudentVLERoutingModule } from './student-vle-routing.module'; -import { PauseScreenService } from '../../../assets/wise5/services/pauseScreenService'; -import { StudentNotificationService } from '../../../assets/wise5/services/studentNotificationService'; -import { NotificationService } from '../../../assets/wise5/services/notificationService'; -import { VLEParentComponent } from '../../../assets/wise5/vle/vle-parent/vle-parent.component'; -import { StudentPeerGroupService } from '../../../assets/wise5/services/studentPeerGroupService'; -import { PeerGroupService } from '../../../assets/wise5/services/peerGroupService'; -import { StudentAssetsDialogComponent } from '../../../assets/wise5/vle/studentAsset/student-assets-dialog/student-assets-dialog.component'; -import { GenerateImageService } from '../../../assets/wise5/services/generateImageService'; - -@NgModule({ - imports: [ - CommonModule, - ComponentStudentModule, - MatDialogModule, - StudentAssetsDialogComponent, - StudentComponentModule, - StudentTeacherCommonModule, - StudentVLERoutingModule, - VLEComponent, - VLEParentComponent - ], - providers: [ - GenerateImageService, - InitializeVLEService, - PauseScreenService, - { provide: DataService, useExisting: StudentDataService }, - { provide: NotificationService, useExisting: StudentNotificationService }, - { provide: PeerGroupService, useExisting: StudentPeerGroupService }, - { provide: ProjectService, useExisting: VLEProjectService }, - StudentNotificationService, - VLEProjectService - ] -}) -export class StudentVLEModule {} 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 6869de64fc2..00000000000 --- a/src/app/teacher/classroom-monitor.module.ts +++ /dev/null @@ -1,53 +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 { HighchartsChartModule } from 'highcharts-angular'; -import { StudentTeacherCommonModule } from '../student-teacher-common.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 { PauseScreensMenuComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/pause-screens-menu/pause-screens-menu.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 { GradingCommonModule } from './grading-common.module'; -import { ManageStudentsComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/manageStudents/manage-students/manage-students.component'; -import { RouterModule } from '@angular/router'; -import { PreviewComponentComponent } from '../../assets/wise5/authoringTool/components/preview-component/preview-component.component'; -import { ComponentGradingComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading.component'; -import { SelectPeriodComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/select-period/select-period.component'; -import { GradingNodeService } from '../../assets/wise5/services/gradingNodeService'; - -@NgModule({ - imports: [ - ClassroomMonitorComponent, - ComponentGradingComponent, - ComponentNewWorkBadgeComponent, - ComponentStudentModule, - GradingCommonModule, - HighchartsChartModule, - ManageStudentsComponent, - MilestoneModule, - NavItemComponent, - NotificationsMenuComponent, - PauseScreensMenuComponent, - PeerGroupGradingModule, - PreviewComponentComponent, - RouterModule, - SelectPeriodComponent, - StepItemComponent, - StudentProgressComponent, - StudentTeacherCommonModule, - NodeProgressViewComponent, - NotebookGradingComponent, - NotebookWorkgroupGradingComponent, - StudentGradingComponent - ], - providers: [GradingNodeService] -}) -export class ClassroomMonitorModule {} diff --git a/src/app/teacher/component-authoring.module.ts b/src/app/teacher/component-authoring.module.ts deleted file mode 100644 index ae31d74a59c..00000000000 --- a/src/app/teacher/component-authoring.module.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { NgModule } from '@angular/core'; -import { AnimationAuthoring } from '../../assets/wise5/components/animation/animation-authoring/animation-authoring.component'; -import { AudioOscillatorAuthoring } from '../../assets/wise5/components/audioOscillator/audio-oscillator-authoring/audio-oscillator-authoring.component'; -import { ConceptMapAuthoring } from '../../assets/wise5/components/conceptMap/concept-map-authoring/concept-map-authoring.component'; -import { DialogGuidanceAuthoringComponent } from '../../assets/wise5/components/dialogGuidance/dialog-guidance-authoring/dialog-guidance-authoring.component'; -import { DiscussionAuthoring } from '../../assets/wise5/components/discussion/discussion-authoring/discussion-authoring.component'; -import { DrawAuthoring } from '../../assets/wise5/components/draw/draw-authoring/draw-authoring.component'; -import { EmbeddedAuthoring } from '../../assets/wise5/components/embedded/embedded-authoring/embedded-authoring.component'; -import { GraphAuthoring } from '../../assets/wise5/components/graph/graph-authoring/graph-authoring.component'; -import { HtmlAuthoringComponent } from '../../assets/wise5/components/html/html-authoring/html-authoring.component'; -import { LabelAuthoring } from '../../assets/wise5/components/label/label-authoring/label-authoring.component'; -import { MatchAuthoringComponent } from '../../assets/wise5/components/match/match-authoring/match-authoring.component'; -import { MultipleChoiceAuthoring } from '../../assets/wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component'; -import { OpenResponseAuthoringComponent } from '../../assets/wise5/components/openResponse/open-response-authoring/open-response-authoring.component'; -import { OutsideUrlAuthoring } from '../../assets/wise5/components/outsideURL/outside-url-authoring/outside-url-authoring.component'; -import { SummaryAuthoring } from '../../assets/wise5/components/summary/summary-authoring/summary-authoring.component'; -import { TableAuthoring } from '../../assets/wise5/components/table/table-authoring/table-authoring.component'; -import { PeerChatAuthoringComponent } from '../../assets/wise5/components/peerChat/peer-chat-authoring/peer-chat-authoring.component'; -import { ShowMyWorkAuthoringComponent } from '../../assets/wise5/components/showMyWork/show-my-work-authoring/show-my-work-authoring.component'; -import { ShowGroupWorkAuthoringComponent } from '../../assets/wise5/components/showGroupWork/show-group-work-authoring/show-group-work-authoring.component'; -import { EditComponentAdvancedComponent } from '../authoring-tool/edit-component-advanced/edit-component-advanced.component'; -import { AiChatAuthoringComponent } from '../../assets/wise5/components/aiChat/ai-chat-authoring/ai-chat-authoring.component'; -import { PeerGroupingAuthoringService } from '../../assets/wise5/services/peerGroupingAuthoringService'; - -@NgModule({ - imports: [ - AiChatAuthoringComponent, - AnimationAuthoring, - AudioOscillatorAuthoring, - ConceptMapAuthoring, - DiscussionAuthoring, - DrawAuthoring, - DialogGuidanceAuthoringComponent, - EditComponentAdvancedComponent, - EmbeddedAuthoring, - GraphAuthoring, - LabelAuthoring, - OutsideUrlAuthoring, - PeerChatAuthoringComponent, - ShowGroupWorkAuthoringComponent, - ShowMyWorkAuthoringComponent, - SummaryAuthoring, - TableAuthoring, - HtmlAuthoringComponent, - MatchAuthoringComponent, - MultipleChoiceAuthoring, - OpenResponseAuthoringComponent - ], - providers: [PeerGroupingAuthoringService] -}) -export class ComponentAuthoringModule {} diff --git a/src/app/teacher/grading-common.module.ts b/src/app/teacher/grading-common.module.ts deleted file mode 100644 index b22665511e6..00000000000 --- a/src/app/teacher/grading-common.module.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { NgModule } from '@angular/core'; -import { IntersectionObserverModule } from '@ng-web-apis/intersection-observer'; -import { EditComponentAnnotationsComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component'; -import { WorkgroupInfoComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroupInfo/workgroup-info.component'; -import { WorkgroupNodeScoreComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/shared/workgroupNodeScore/workgroup-node-score.component'; -import { WorkgroupComponentGradingComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/workgroup-component-grading/workgroup-component-grading.component'; -import { WorkgroupNodeStatusComponent } from '../classroom-monitor/workgroup-node-status/workgroup-node-status.component'; -import { WorkgroupSelectAutocompleteComponent } from '../classroom-monitor/workgroup-select/workgroup-select-autocomplete/workgroup-select-autocomplete.component'; -import { StudentTeacherCommonModule } from '../student-teacher-common.module'; -import { StatusIconComponent } from '../classroom-monitor/status-icon/status-icon.component'; -import { NavItemProgressComponent } from '../classroom-monitor/nav-item-progress/nav-item-progress.component'; -import { ComponentGradingComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading.component'; -import { ComponentStateInfoComponent } from '../../assets/wise5/common/component-state-info/component-state-info.component'; - -@NgModule({ - imports: [ - ComponentGradingComponent, - ComponentStateInfoComponent, - EditComponentAnnotationsComponent, - IntersectionObserverModule, - NavItemProgressComponent, - StatusIconComponent, - StudentTeacherCommonModule, - WorkgroupInfoComponent, - WorkgroupComponentGradingComponent, - WorkgroupNodeScoreComponent, - WorkgroupNodeStatusComponent, - WorkgroupSelectAutocompleteComponent - ], - exports: [ - ComponentGradingComponent, - ComponentStateInfoComponent, - EditComponentAnnotationsComponent, - IntersectionObserverModule, - NavItemProgressComponent, - StatusIconComponent, - WorkgroupComponentGradingComponent, - WorkgroupInfoComponent, - WorkgroupNodeScoreComponent, - WorkgroupNodeStatusComponent, - WorkgroupSelectAutocompleteComponent - ] -}) -export class GradingCommonModule {} diff --git a/src/app/teacher/milestone/milestone.module.ts b/src/app/teacher/milestone/milestone.module.ts deleted file mode 100644 index 90ecfb21a02..00000000000 --- a/src/app/teacher/milestone/milestone.module.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Injector, NgModule } from '@angular/core'; -import { createCustomElement } from '@angular/elements'; -import { HighchartsChartModule } from 'highcharts-angular'; -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 { StudentTeacherCommonModule } from '../../student-teacher-common.module'; -import { GradingCommonModule } from '../grading-common.module'; -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: [ - GradingCommonModule, - HighchartsChartModule, - SelectPeriodComponent, - StudentTeacherCommonModule, - 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 6f14f3b4646..00000000000 --- a/src/app/teacher/peer-group-grading.module.ts +++ /dev/null @@ -1,34 +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 { StudentTeacherCommonModule } from '../student-teacher-common.module'; -import { SelectPeriodComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/select-period/select-period.component'; - -@NgModule({ - imports: [ - StudentTeacherCommonModule, - 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/tag/tag.component.ts b/src/app/teacher/tag/tag.component.ts index c5b1dfc64d2..e70ad984ba1 100644 --- a/src/app/teacher/tag/tag.component.ts +++ b/src/app/teacher/tag/tag.component.ts @@ -6,10 +6,10 @@ import { MatButtonModule } from '@angular/material/button'; import { MatDividerModule } from '@angular/material/divider'; @Component({ - imports: [CommonModule, MatButtonModule, MatDividerModule, MatIconModule], - selector: 'tag', - templateUrl: './tag.component.html', - styleUrl: './tag.component.scss' + imports: [CommonModule, MatButtonModule, MatDividerModule, MatIconModule], + selector: 'tag', + styleUrl: './tag.component.scss', + templateUrl: './tag.component.html' }) export class TagComponent implements OnChanges { @Input() allowRemove: boolean; diff --git a/src/app/teacher/teacher-authoring.module.ts b/src/app/teacher/teacher-authoring.module.ts index efbcbdd07a4..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'; @@ -39,11 +39,17 @@ import { CreateComponentService } from '../../assets/wise5/services/createCompon import { NotifyAuthorService } from '../../assets/wise5/services/notifyAuthorService'; import { RemoveNodeIdFromTransitionsService } from '../../assets/wise5/services/removeNodeIdFromTransitionsService'; import { RegisterProjectService } from '../../assets/wise5/services/registerProjectService'; -import { ComponentAuthoringModule } from './component-authoring.module'; 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, ComponentAuthoringModule, StudentTeacherCommonServicesModule], + imports: [ + RouterModule.forChild(authoringRoutes), + EditComponentAdvancedComponent, // TODO: refactor. currently needed for peer grouping authoring dialog to work + StudentTeacherCommonServicesModule + ], providers: [ ClassroomStatusService, ComponentInfoService, @@ -68,6 +74,7 @@ import { StudentTeacherCommonServicesModule } from '../student-teacher-common-se MoveNodesService, { provide: NodeService, useExisting: TeacherNodeService }, NotifyAuthorService, + PeerGroupingAuthoringService, ProjectAssetService, SpaceService, DeleteTranslationsService, diff --git a/src/app/teacher/teacher-tools.module.ts b/src/app/teacher/teacher-tools.module.ts index 5ffa0b4a4c8..53d9871b6dc 100644 --- a/src/app/teacher/teacher-tools.module.ts +++ b/src/app/teacher/teacher-tools.module.ts @@ -1,6 +1,4 @@ import { NgModule } from '@angular/core'; - -import { StudentTeacherCommonModule } from '../student-teacher-common.module'; import { ProjectService } from '../../assets/wise5/services/projectService'; import { TeacherProjectService } from '../../assets/wise5/services/teacherProjectService'; import { ProjectAssetService } from '../services/projectAssetService'; @@ -17,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'; @@ -29,17 +26,19 @@ 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: [ - StudentTeacherCommonModule, - ClassroomMonitorModule, - RouterModule, - TeacherToolsRoutingModule + ComponentStudentModule, + StudentTeacherCommonServicesModule, + RouterModule.forChild(teacherToolsRoutes) ], providers: [ ClassroomStatusService, @@ -48,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 77980bbedb9..00000000000 --- a/src/assets/wise5/authoringTool/components/component-info-dialog/component-info-dialog.component.spec.ts +++ /dev/null @@ -1,135 +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 { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -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(); - -describe('ComponentInfoDialogComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ - BrowserAnimationsModule, - 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; - window.MathJax = { - startup: { - promise: new Promise((resolve, reject) => { - resolve({}); - }) - }, - typesetPromise: () => {} - }; - 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/components/edit-component-advanced-button/edit-component-advanced-button.component.ts b/src/assets/wise5/authoringTool/components/edit-component-advanced-button/edit-component-advanced-button.component.ts index 3f434eaea4b..ccb8afb1798 100644 --- a/src/assets/wise5/authoringTool/components/edit-component-advanced-button/edit-component-advanced-button.component.ts +++ b/src/assets/wise5/authoringTool/components/edit-component-advanced-button/edit-component-advanced-button.component.ts @@ -8,9 +8,9 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { MatIconModule } from '@angular/material/icon'; @Component({ - imports: [MatButtonModule, MatIconModule, MatTooltipModule], - selector: 'edit-component-advanced-button', - templateUrl: 'edit-component-advanced-button.component.html' + imports: [MatButtonModule, MatIconModule, MatTooltipModule], + selector: 'edit-component-advanced-button', + templateUrl: 'edit-component-advanced-button.component.html' }) export class EditComponentAdvancedButtonComponent { @Input() componentContent: ComponentContent; diff --git a/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.ts b/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.ts index b6e84f95473..005c4246981 100644 --- a/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.ts +++ b/src/assets/wise5/authoringTool/components/translatable-input/translatable-input.component.ts @@ -5,10 +5,10 @@ import { AbstractTranslatableFieldComponent } from '../abstract-translatable-fie import { MatIconModule } from '@angular/material/icon'; @Component({ - selector: 'translatable-input', + encapsulation: ViewEncapsulation.None, imports: [FormsModule, MatIconModule, MatInputModule], + selector: 'translatable-input', styleUrl: '../abstract-translatable-field/abstract-translatable-field.component.scss', - templateUrl: './translatable-input.component.html', - encapsulation: ViewEncapsulation.None + templateUrl: './translatable-input.component.html' }) export class TranslatableInputComponent extends AbstractTranslatableFieldComponent {} diff --git a/src/assets/wise5/authoringTool/components/translatable-textarea/translatable-textarea.component.ts b/src/assets/wise5/authoringTool/components/translatable-textarea/translatable-textarea.component.ts index f8091a0de87..4591b7ddfce 100644 --- a/src/assets/wise5/authoringTool/components/translatable-textarea/translatable-textarea.component.ts +++ b/src/assets/wise5/authoringTool/components/translatable-textarea/translatable-textarea.component.ts @@ -5,10 +5,10 @@ import { AbstractTranslatableFieldComponent } from '../abstract-translatable-fie import { MatIconModule } from '@angular/material/icon'; @Component({ - selector: 'translatable-textarea', + encapsulation: ViewEncapsulation.None, imports: [FormsModule, MatIconModule, MatInputModule], + selector: 'translatable-textarea', styleUrl: '../abstract-translatable-field/abstract-translatable-field.component.scss', - templateUrl: './translatable-textarea.component.html', - encapsulation: ViewEncapsulation.None + templateUrl: './translatable-textarea.component.html' }) export class TranslatableTextareaComponent extends AbstractTranslatableFieldComponent {} 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/add-component/add-component.component.ts b/src/assets/wise5/authoringTool/node/add-component/add-component.component.ts index 416376b647e..17c02852366 100644 --- a/src/assets/wise5/authoringTool/node/add-component/add-component.component.ts +++ b/src/assets/wise5/authoringTool/node/add-component/add-component.component.ts @@ -5,10 +5,10 @@ import { Node } from '../../../common/Node'; import { CommonModule } from '@angular/common'; @Component({ - selector: 'add-component', imports: [AddComponentButtonComponent, CommonModule, MatDividerModule], - templateUrl: './add-component.component.html', - styleUrl: './add-component.component.scss' + selector: 'add-component', + styleUrl: './add-component.component.scss', + templateUrl: './add-component.component.html' }) export class AddComponentComponent { @Input() afterComponentId: string; 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/copy-component-button/copy-component-button.component.ts b/src/assets/wise5/authoringTool/node/copy-component-button/copy-component-button.component.ts index e6c34c6cbf8..46507426285 100644 --- a/src/assets/wise5/authoringTool/node/copy-component-button/copy-component-button.component.ts +++ b/src/assets/wise5/authoringTool/node/copy-component-button/copy-component-button.component.ts @@ -7,9 +7,9 @@ import { MatButtonModule } from '@angular/material/button'; import { MatTooltipModule } from '@angular/material/tooltip'; @Component({ - imports: [MatButtonModule, MatIconModule, MatTooltipModule], - selector: 'copy-component-button', - templateUrl: './copy-component-button.component.html' + imports: [MatButtonModule, MatIconModule, MatTooltipModule], + selector: 'copy-component-button', + templateUrl: './copy-component-button.component.html' }) export class CopyComponentButtonComponent { @Input() componentId: string; diff --git a/src/assets/wise5/authoringTool/node/edit-node-title/edit-node-title.component.html b/src/assets/wise5/authoringTool/node/edit-node-title/edit-node-title.component.html deleted file mode 100644 index 8614c17edd7..00000000000 --- a/src/assets/wise5/authoringTool/node/edit-node-title/edit-node-title.component.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/src/assets/wise5/authoringTool/node/edit-node-title/edit-node-title.component.ts b/src/assets/wise5/authoringTool/node/edit-node-title/edit-node-title.component.ts index 5e8e00f5c82..20b99138166 100644 --- a/src/assets/wise5/authoringTool/node/edit-node-title/edit-node-title.component.ts +++ b/src/assets/wise5/authoringTool/node/edit-node-title/edit-node-title.component.ts @@ -4,10 +4,17 @@ import { TeacherProjectService } from '../../../services/teacherProjectService'; import { TranslatableInputComponent } from '../../components/translatable-input/translatable-input.component'; @Component({ - imports: [TranslatableInputComponent], - selector: 'edit-node-title', - styleUrl: './edit-node-title.component.scss', - templateUrl: './edit-node-title.component.html' + imports: [TranslatableInputComponent], + selector: 'edit-node-title', + styleUrl: './edit-node-title.component.scss', + template: ` + + ` }) export class EditNodeTitleComponent { protected label: string; 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/node/node-authoring/node-authoring.component.html b/src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html index 995e07303e7..bd5ffc05923 100644 --- a/src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html +++ b/src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html @@ -70,7 +70,7 @@ - +
; @@ -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/common/constraint/strategies/ChoiceChosenConstraintStrategy.spec.ts b/src/assets/wise5/common/constraint/strategies/ChoiceChosenConstraintStrategy.spec.ts index 81feb29b1be..ce28d985b57 100644 --- a/src/assets/wise5/common/constraint/strategies/ChoiceChosenConstraintStrategy.spec.ts +++ b/src/assets/wise5/common/constraint/strategies/ChoiceChosenConstraintStrategy.spec.ts @@ -1,11 +1,10 @@ import { TestBed } from '@angular/core/testing'; import { StudentDataService } from '../../../services/studentDataService'; import { ChoiceChosenConstraintStrategy } from './ChoiceChosenConstraintStrategy'; -import { provideHttpClientTesting } from '@angular/common/http/testing'; -import { StudentTeacherCommonServicesModule } from '../../../../../app/student-teacher-common-services.module'; -import { ComponentServiceLookupServiceModule } from '../../../services/componentServiceLookupServiceModule'; import { ComponentServiceLookupService } from '../../../services/componentServiceLookupService'; -import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; +import { MockProviders } from 'ng-mocks'; +import { provideHttpClient } from '@angular/common/http'; +import { MultipleChoiceService } from '../../../components/multipleChoice/multipleChoiceService'; const choiceId1 = 'choice1'; const choiceId2 = 'choice2'; @@ -25,16 +24,17 @@ const criteria = { choiceIds: choiceId1 } }; - describe('ChoiceChosenConstraintStrategy', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [ComponentServiceLookupServiceModule, - StudentTeacherCommonServicesModule], - providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()] -}); + providers: [ + MockProviders(ComponentServiceLookupService, MultipleChoiceService, StudentDataService), + provideHttpClient() + ] + }); strategy = new ChoiceChosenConstraintStrategy(); componentServiceLookupService = TestBed.inject(ComponentServiceLookupService); + spyOn(componentServiceLookupService, 'getService').and.returnValue(new MultipleChoiceService()); strategy.componentServiceLookupService = componentServiceLookupService; dataService = TestBed.inject(StudentDataService); strategy.dataService = dataService; diff --git a/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.module.ts b/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.module.ts deleted file mode 100644 index eeb7aa417f4..00000000000 --- a/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.module.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { NgModule } from '@angular/core'; -import { AiChatShowWorkComponent } from './ai-chat-show-work.component'; - -@NgModule({ - imports: [AiChatShowWorkComponent], - exports: [AiChatShowWorkComponent] -}) -export class AiChatShowWorkModule {} diff --git a/src/assets/wise5/components/component/component-student.module.ts b/src/assets/wise5/components/component/component-student.module.ts index d9cd2a6d2de..13c2c664dc9 100644 --- a/src/assets/wise5/components/component/component-student.module.ts +++ b/src/assets/wise5/components/component/component-student.module.ts @@ -1,62 +1,47 @@ -import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { HighchartsChartModule } from 'highcharts-angular'; -import { StudentComponentModule } from '../../../../app/student/student.component.module'; -import { PreviewComponentComponent } from '../../authoringTool/components/preview-component/preview-component.component'; import { AnimationStudent } from '../animation/animation-student/animation-student.component'; import { ConceptMapStudent } from '../conceptMap/concept-map-student/concept-map-student.component'; import { DiscussionStudent } from '../discussion/discussion-student/discussion-student.component'; import { HtmlStudentComponent } from '../html/html-student/html-student.component'; import { LabelStudentComponent } from '../label/label-student/label-student.component'; -import { MatchStudentModule } from '../match/match-student/match-student.module'; -import { OpenResponseStudentModule } from '../openResponse/open-response-student/open-response-student.module'; import { ShowGroupWorkStudentModule } from '../showGroupWork/show-group-work-student/show-group-work-student.module'; import { ShowMyWorkStudentModule } from '../showMyWork/show-my-work-student/show-my-work-student.module'; -import { SummaryStudentModule } from '../summary/summary-student/summary-student.module'; import { TableStudentComponent } from '../table/table-student/table-student.component'; -import { ComponentComponent } from './component.component'; -import { HelpIconComponent } from '../../themes/default/themeComponents/helpIcon/help-icon.component'; import { MultipleChoiceStudentComponent } from '../multipleChoice/multiple-choice-student/multiple-choice-student.component'; import { DialogGuidanceStudentComponent } from '../dialogGuidance/dialog-guidance-student/dialog-guidance-student.component'; import { StudentAssetsDialogComponent } from '../../vle/studentAsset/student-assets-dialog/student-assets-dialog.component'; -import { AiChatStudentComponent } from '../aiChat/ai-chat-student/ai-chat-student.component'; import { AudioOscillatorStudent } from '../audioOscillator/audio-oscillator-student/audio-oscillator-student.component'; import { DrawStudent } from '../draw/draw-student/draw-student.component'; import { EmbeddedStudent } from '../embedded/embedded-student/embedded-student.component'; import { GraphStudent } from '../graph/graph-student/graph-student.component'; import { OutsideUrlStudent } from '../outsideURL/outside-url-student/outside-url-student.component'; import { PeerChatStudentComponent } from '../peerChat/peer-chat-student/peer-chat-student.component'; +import { SummaryStudent } from '../summary/summary-student/summary-student.component'; +import { MatchStudent } from '../match/match-student/match-student.component'; +import { OpenResponseStudent } from '../openResponse/open-response-student/open-response-student.component'; @NgModule({ imports: [ - AiChatStudentComponent, AnimationStudent, AudioOscillatorStudent, - CommonModule, - ComponentComponent, ConceptMapStudent, DialogGuidanceStudentComponent, DiscussionStudent, DrawStudent, EmbeddedStudent, GraphStudent, - HelpIconComponent, - HighchartsChartModule, HtmlStudentComponent, LabelStudentComponent, - MatchStudentModule, + MatchStudent, MultipleChoiceStudentComponent, - OpenResponseStudentModule, + OpenResponseStudent, OutsideUrlStudent, PeerChatStudentComponent, - PreviewComponentComponent, - 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, - StudentComponentModule, - SummaryStudentModule, + SummaryStudent, TableStudentComponent - ], - exports: [ComponentComponent, PreviewComponentComponent] + ] }) export class ComponentStudentModule {} diff --git a/src/assets/wise5/components/dialogGuidance/dialog-guidance-show-work/dialog-guidance-show-work.component.ts b/src/assets/wise5/components/dialogGuidance/dialog-guidance-show-work/dialog-guidance-show-work.component.ts index 291973c8077..51b46569a8b 100644 --- a/src/assets/wise5/components/dialogGuidance/dialog-guidance-show-work/dialog-guidance-show-work.component.ts +++ b/src/assets/wise5/components/dialogGuidance/dialog-guidance-show-work/dialog-guidance-show-work.component.ts @@ -11,13 +11,13 @@ import { CRaterService } from '../../../services/cRaterService'; import { UserService } from '../../../../../app/services/user.service'; @Component({ - imports: [DialogResponsesComponent, MatCardModule], - selector: 'dialog-guidance-show-work', - styleUrls: [ - '../dialog-guidance-student/dialog-guidance-student.component.scss', - './dialog-guidance-show-work.component.scss' - ], - template: ` + imports: [DialogResponsesComponent, MatCardModule], + selector: 'dialog-guidance-show-work', + styleUrls: [ + '../dialog-guidance-student/dialog-guidance-student.component.scss', + './dialog-guidance-show-work.component.scss' + ], + template: ` { diff --git a/src/assets/wise5/services/componentServiceLookupServiceModule.ts b/src/assets/wise5/services/componentServiceLookupServiceModule.ts deleted file mode 100644 index 0cd05813ad5..00000000000 --- a/src/assets/wise5/services/componentServiceLookupServiceModule.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { NgModule } from '@angular/core'; -import { AnimationService } from '../components/animation/animationService'; -import { AudioOscillatorService } from '../components/audioOscillator/audioOscillatorService'; -import { ConceptMapService } from '../components/conceptMap/conceptMapService'; -import { DialogGuidanceService } from '../components/dialogGuidance/dialogGuidanceService'; -import { DiscussionService } from '../components/discussion/discussionService'; -import { DrawService } from '../components/draw/drawService'; -import { EmbeddedService } from '../components/embedded/embeddedService'; -import { GraphService } from '../components/graph/graphService'; -import { HTMLService } from '../components/html/htmlService'; -import { LabelService } from '../components/label/labelService'; -import { MatchService } from '../components/match/matchService'; -import { MultipleChoiceService } from '../components/multipleChoice/multipleChoiceService'; -import { OpenResponseCompletionCriteriaService } from '../components/openResponse/openResponseCompletionCriteriaService'; -import { OpenResponseService } from '../components/openResponse/openResponseService'; -import { OutsideURLService } from '../components/outsideURL/outsideURLService'; -import { PeerChatService } from '../components/peerChat/peerChatService'; -import { ShowGroupWorkService } from '../components/showGroupWork/showGroupWorkService'; -import { ShowMyWorkService } from '../components/showMyWork/showMyWorkService'; -import { SummaryService } from '../components/summary/summaryService'; -import { TableService } from '../components/table/tableService'; -import { ComponentServiceLookupService } from './componentServiceLookupService'; -import { ComputerAvatarService } from './computerAvatarService'; -import { ConfigService } from './configService'; -import { StudentAssetService } from './studentAssetService'; -import { AiChatService } from '../components/aiChat/aiChatService'; - -@NgModule({ - declarations: [], - imports: [], - providers: [ - AiChatService, - AnimationService, - AudioOscillatorService, - ComputerAvatarService, - ComponentServiceLookupService, - ConceptMapService, - ConfigService, - DialogGuidanceService, - DiscussionService, - DrawService, - EmbeddedService, - GraphService, - LabelService, - MatchService, - MultipleChoiceService, - OpenResponseCompletionCriteriaService, - OpenResponseService, - OutsideURLService, - PeerChatService, - HTMLService, - ShowGroupWorkService, - ShowMyWorkService, - StudentAssetService, - SummaryService, - TableService - ] -}) -export class ComponentServiceLookupServiceModule {} 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/assets/wise5/themes/default/themeComponents/helpIcon/help-icon.component.ts b/src/assets/wise5/themes/default/themeComponents/helpIcon/help-icon.component.ts index 4b2e4100e50..6754eafdeb2 100644 --- a/src/assets/wise5/themes/default/themeComponents/helpIcon/help-icon.component.ts +++ b/src/assets/wise5/themes/default/themeComponents/helpIcon/help-icon.component.ts @@ -8,17 +8,17 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; @Component({ - imports: [CommonModule, MatButtonModule, MatIconModule], - selector: 'help-icon', - styleUrl: 'help-icon.component.scss', - templateUrl: 'help-icon.component.html' + imports: [CommonModule, MatButtonModule, MatIconModule], + selector: 'help-icon', + styleUrl: 'help-icon.component.scss', + templateUrl: 'help-icon.component.html' }) export class HelpIconComponent { @Input() content: string; @Input() icon: string; @Input() iconClass: string; @Input() label: string; - pulse: boolean = true; + protected pulse: boolean = true; constructor( public dialog: MatDialog, diff --git a/src/assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component.scss b/src/assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component.scss deleted file mode 100644 index 0552a1c0ee5..00000000000 --- a/src/assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.mat-icon { - vertical-align: middle; -} diff --git a/src/assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component.ts b/src/assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component.ts index 31b4f3f17e0..10375047416 100644 --- a/src/assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component.ts +++ b/src/assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component.ts @@ -4,10 +4,10 @@ import { CommonModule } from '@angular/common'; import { MatIconModule } from '@angular/material/icon'; @Component({ - imports: [CommonModule, MatIconModule], - selector: 'node-status-icon', - styleUrl: 'node-status-icon.component.scss', - templateUrl: 'node-status-icon.component.html' + imports: [CommonModule, MatIconModule], + selector: 'node-status-icon', + styles: ['.mat-icon { vertical-align: middle; }'], + templateUrl: 'node-status-icon.component.html' }) export class NodeStatusIconComponent { @Input() nodeId: string; diff --git a/src/assets/wise5/vle/nav-item/nav-item.component.html b/src/assets/wise5/vle/nav-item/nav-item.component.html index 63cd1f76169..b97654eabb1 100644 --- a/src/assets/wise5/vle/nav-item/nav-item.component.html +++ b/src/assets/wise5/vle/nav-item/nav-item.component.html @@ -18,7 +18,7 @@ [nodeId]="nodeId" size="36" [icon]="nodeStatus.icon" - > + /> {{ nodeTitle }} @@ -62,7 +62,7 @@
- + @if (!nodeStatus.isVisitable) { - + {{ nodeTitle }} - + @if (!nodeStatus.isVisitable) {
-} -@if (!canEdit) { +} @else { } diff --git a/src/assets/wise5/vle/node-icon/node-icon.component.ts b/src/assets/wise5/vle/node-icon/node-icon.component.ts index a2c648198f7..c9cd462f575 100644 --- a/src/assets/wise5/vle/node-icon/node-icon.component.ts +++ b/src/assets/wise5/vle/node-icon/node-icon.component.ts @@ -1,5 +1,3 @@ -'use strict'; - import { ProjectService } from '../../services/projectService'; import { Component, Input, SimpleChanges } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; @@ -8,10 +6,10 @@ import { CommonModule } from '@angular/common'; import { MatIconModule } from '@angular/material/icon'; @Component({ - imports: [CommonModule, MatIconModule], - selector: 'node-icon', - styleUrl: 'node-icon.component.scss', - templateUrl: 'node-icon.component.html' + imports: [CommonModule, MatIconModule], + selector: 'node-icon', + styleUrl: 'node-icon.component.scss', + templateUrl: 'node-icon.component.html' }) export class NodeIconComponent { @Input() canEdit: boolean; @@ -23,7 +21,10 @@ export class NodeIconComponent { @Input() size: number; protected sizeClass: string; - constructor(protected dialog: MatDialog, protected projectService: ProjectService) {} + constructor( + protected dialog: MatDialog, + protected projectService: ProjectService + ) {} ngOnChanges(changes: SimpleChanges): void { this.node = this.projectService.getNode(this.nodeId); diff --git a/src/messages.xlf b/src/messages.xlf index b994a2e9001..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 @@ -10107,7 +10107,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/node/edit-node-title/edit-node-title.component.ts - 22 + 29 @@ -10125,7 +10125,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/node/edit-node-title/edit-node-title.component.ts - 22 + 29 @@ -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 @@ -16549,11 +16549,11 @@ Are you sure you want to proceed? src/assets/wise5/components/openResponse/open-response-student/open-response-student.component.ts - 203 + 204 src/assets/wise5/components/openResponse/open-response-student/open-response-student.component.ts - 219 + 220 @@ -17490,7 +17490,7 @@ Are you ready to receive feedback on this answer? src/assets/wise5/components/openResponse/open-response-student/open-response-student.component.ts - 206 + 207 @@ -17975,14 +17975,14 @@ Category Name: Are you sure you want to delete this post? src/assets/wise5/components/discussion/class-response/class-response.component.ts - 129 + 127 Are you sure you want to show this post? src/assets/wise5/components/discussion/class-response/class-response.component.ts - 135 + 133 @@ -20438,7 +20438,7 @@ Current Score: Are you ready to receive feedback on this answer? src/assets/wise5/components/openResponse/open-response-student/open-response-student.component.ts - 210 + 211 @@ -20447,7 +20447,7 @@ Are you ready to receive feedback on this answer? Are you ready to receive feedback on this answer? src/assets/wise5/components/openResponse/open-response-student/open-response-student.component.ts - 222 + 223 @@ -20456,21 +20456,21 @@ Are you ready to receive feedback on this answer? Are you ready to submit this answer? src/assets/wise5/components/openResponse/open-response-student/open-response-student.component.ts - 226 + 227 We are scoring your work... src/assets/wise5/components/openResponse/open-response-student/open-response-student.component.ts - 345 + 346 Please Wait src/assets/wise5/components/openResponse/open-response-student/open-response-student.component.ts - 346 + 347 @@ -20478,7 +20478,7 @@ Are you ready to submit this answer? If this problem continues, let your teacher know and move on to the next activity. Your work will still be saved. src/assets/wise5/components/openResponse/open-response-student/open-response-student.component.ts - 369 + 370 @@ -20499,7 +20499,7 @@ If this problem continues, let your teacher know and move on to the next activit An error occurred while recording: src/assets/wise5/components/openResponse/speech-to-text/speech-to-text.component.ts - 56 + 57 @@ -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