From f93c97432f4359aaf15a26c4bf169603683faeab Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Thu, 4 Dec 2025 10:41:02 -0800 Subject: [PATCH] fix(GradeByTeam): Score and max-score does not immediate update in StepItem --- .../studentGrading/step-item/step-item.component.ts | 6 ++++-- .../student-grading/student-grading.component.html | 1 + .../student-grading/student-grading.component.ts | 1 + src/messages.xlf | 12 ++++++------ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts index c46cdb251bd..0830fde76d0 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts @@ -49,7 +49,7 @@ export class StepItemComponent { @Input() maxScore: number; @Input() nodeId: string; @Output() onUpdateExpand: any = new EventEmitter(); - protected score: any; + @Input() score: any; @Input() showScore: boolean; private status: any; protected statusClass: string; @@ -67,12 +67,14 @@ export class StepItemComponent { this.maxScore = typeof changesObj.maxScore.currentValue === 'number' ? changesObj.maxScore.currentValue : 0; } + if (changesObj.score) { + this.score = changesObj.score.currentValue >= 0 ? changesObj.score.currentValue : '-'; + } if (changesObj.stepData) { const stepData = copy(changesObj.stepData.currentValue); this.hasAlert = stepData.hasAlert; this.hasNewAlert = stepData.hasNewAlert; this.status = stepData.completionStatus; - this.score = stepData.score >= 0 ? stepData.score : '-'; this.components = this.projectService.getComponents(this.nodeId); this.componentIdToIsVisible = calculateComponentVisibility( this.projectService.calculateComponentIdToHasWork(this.components), diff --git a/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html b/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html index d9d909b1ae7..575077cb36e 100644 --- a/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html +++ b/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html @@ -106,6 +106,7 @@

[maxScore]="node.maxScore" [showScore]="node.hasWork" [nodeId]="node.id" + [score]="node.score" [stepData]="node" [workgroupId]="workgroupId" (onUpdateExpand)="onUpdateExpand($event)" diff --git a/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts b/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts index 243656bc652..22e1c1edb61 100644 --- a/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts +++ b/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts @@ -227,6 +227,7 @@ export class StudentGradingComponent implements OnInit { node.nodeStatus = this.classroomStatusService.getStudentStatusForWorkgroupId( this.workgroupId )?.nodeStatuses[nodeId]; + this.sortedNodes = Object.values(this.nodesById); } } diff --git a/src/messages.xlf b/src/messages.xlf index 72179c2f295..8565c0f87f2 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -9528,7 +9528,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts - 94 + 96 src/assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component.html @@ -14382,7 +14382,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts - 89 + 91 @@ -14397,7 +14397,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts - 101 + 103 @@ -14412,7 +14412,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts - 106 + 108 @@ -14514,7 +14514,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts - 96 + 98 @@ -14525,7 +14525,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts - 108 + 110