diff --git a/src/app/teacher/grading-common.module.ts b/src/app/teacher/grading-common.module.ts
index d0ec032315a..0437ce757a2 100644
--- a/src/app/teacher/grading-common.module.ts
+++ b/src/app/teacher/grading-common.module.ts
@@ -18,6 +18,7 @@ import { NavItemProgressComponent } from '../classroom-monitor/nav-item-progress
@NgModule({
imports: [
ComponentGradingModule,
+ EditComponentScoreComponent,
IntersectionObserverModule,
StatusIconComponent,
StudentTeacherCommonModule,
@@ -27,7 +28,6 @@ import { NavItemProgressComponent } from '../classroom-monitor/nav-item-progress
declarations: [
EditComponentAnnotationsComponent,
EditComponentCommentComponent,
- EditComponentScoreComponent,
GradingEditComponentMaxScoreComponent,
NavItemProgressComponent,
WorkgroupComponentGradingComponent,
diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html
index 15b8883aa30..5b7d0616cfc 100644
--- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html
+++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html
@@ -14,7 +14,7 @@
[periodId]="periodId"
[runId]="runId"
[toWorkgroupId]="toWorkgroupId"
- >
+ />
/
+ />
/
+ />
/
{
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [EditComponentScoreComponent],
- schemas: [NO_ERRORS_SCHEMA],
- imports: [MatDialogModule, StudentTeacherCommonServicesModule],
- providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
-});
+ imports: [
+ BrowserAnimationsModule,
+ EditComponentScoreComponent,
+ StudentTeacherCommonServicesModule
+ ],
+ providers: [provideHttpClient(withInterceptorsFromDi())]
+ });
annotationService = TestBed.inject(AnnotationService);
notificationService = TestBed.inject(NotificationService);
fixture = TestBed.createComponent(EditComponentScoreComponent);
diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.ts
index d7c00c5ac3a..391c651ec38 100644
--- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.ts
+++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.ts
@@ -3,9 +3,16 @@ import { Subject, Subscription } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import { AnnotationService } from '../../../services/annotationService';
import { NotificationService } from '../../../services/notificationService';
+import { CommonModule } from '@angular/common';
+import { MatFormFieldModule } from '@angular/material/form-field';
+import { FlexLayoutModule } from '@angular/flex-layout';
+import { MatInputModule } from '@angular/material/input';
+import { FormsModule } from '@angular/forms';
@Component({
+ imports: [CommonModule, FlexLayoutModule, FormsModule, MatFormFieldModule, MatInputModule],
selector: 'edit-component-score',
+ standalone: true,
templateUrl: 'edit-component-score.component.html'
})
export class EditComponentScoreComponent {
@@ -13,24 +20,23 @@ export class EditComponentScoreComponent {
@Input() componentStateId: string;
@Input() disabled: boolean;
@Input() fromWorkgroupId: number;
+ protected isAutoScore: boolean;
@Input() latestAnnotationScore: any;
@Input() nodeId: string;
@Input() periodId: string;
@Input() runId: string;
- @Input() toWorkgroupId: number;
- @ViewChild('scoreInput') scoreInputElement: ElementRef;
-
- isAutoScore: boolean;
score: number;
- scoreChanged: Subject = new Subject();
- subscriptions: Subscription = new Subscription();
+ protected scoreChanged: Subject = new Subject();
+ @ViewChild('scoreInput') scoreInputElement: ElementRef;
+ private subscriptions: Subscription = new Subscription();
+ @Input() toWorkgroupId: number;
constructor(
private annotationService: AnnotationService,
private notificationService: NotificationService
) {}
- ngOnInit() {
+ ngOnInit(): void {
this.isAutoScore = this.latestAnnotationScore?.type === 'autoScore';
this.score = this.latestAnnotationScore?.data.value ?? 0;
this.subscriptions.add(
@@ -41,7 +47,7 @@ export class EditComponentScoreComponent {
);
}
- ngOnDestroy() {
+ ngOnDestroy(): void {
this.subscriptions.unsubscribe();
}
@@ -66,7 +72,7 @@ export class EditComponentScoreComponent {
});
}
- focusScoreInput() {
+ protected focusScoreInput(): void {
this.scoreInputElement.nativeElement.focus();
}
}
diff --git a/src/messages.xlf b/src/messages.xlf
index ab45a4fbcb3..28675d142fd 100644
--- a/src/messages.xlf
+++ b/src/messages.xlf
@@ -5806,7 +5806,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.
src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html
- 5
+ 7
@@ -13339,28 +13339,28 @@ The branches will be removed but the steps will remain in the unit.
src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html
- 4
+ 5
src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html
- 8
+ 13
src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html
- 9
+ 15
src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.ts
- 65
+ 71