Skip to content

Commit 9e59754

Browse files
fix(GradeByTeam): Score and max-score does not immediate update in StepItem (#2248)
1 parent 89c01f0 commit 9e59754

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class StepItemComponent {
4949
@Input() maxScore: number;
5050
@Input() nodeId: string;
5151
@Output() onUpdateExpand: any = new EventEmitter();
52-
protected score: any;
52+
@Input() score: any;
5353
@Input() showScore: boolean;
5454
private status: any;
5555
protected statusClass: string;
@@ -67,12 +67,14 @@ export class StepItemComponent {
6767
this.maxScore =
6868
typeof changesObj.maxScore.currentValue === 'number' ? changesObj.maxScore.currentValue : 0;
6969
}
70+
if (changesObj.score) {
71+
this.score = changesObj.score.currentValue >= 0 ? changesObj.score.currentValue : '-';
72+
}
7073
if (changesObj.stepData) {
7174
const stepData = copy(changesObj.stepData.currentValue);
7275
this.hasAlert = stepData.hasAlert;
7376
this.hasNewAlert = stepData.hasNewAlert;
7477
this.status = stepData.completionStatus;
75-
this.score = stepData.score >= 0 ? stepData.score : '-';
7678
this.components = this.projectService.getComponents(this.nodeId);
7779
this.componentIdToIsVisible = calculateComponentVisibility(
7880
this.projectService.calculateComponentIdToHasWork(this.components),

src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ <h2 class="content-head__item">
106106
[maxScore]="node.maxScore"
107107
[showScore]="node.hasWork"
108108
[nodeId]="node.id"
109+
[score]="node.score"
109110
[stepData]="node"
110111
[workgroupId]="workgroupId"
111112
(onUpdateExpand)="onUpdateExpand($event)"

src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ export class StudentGradingComponent implements OnInit {
227227
node.nodeStatus = this.classroomStatusService.getStudentStatusForWorkgroupId(
228228
this.workgroupId
229229
)?.nodeStatuses[nodeId];
230+
this.sortedNodes = Object.values(this.nodesById);
230231
}
231232
}
232233

src/messages.xlf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9528,7 +9528,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
95289528
</context-group>
95299529
<context-group purpose="location">
95309530
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts</context>
9531-
<context context-type="linenumber">94</context>
9531+
<context context-type="linenumber">96</context>
95329532
</context-group>
95339533
<context-group purpose="location">
95349534
<context context-type="sourcefile">src/assets/wise5/themes/default/themeComponents/nodeStatusIcon/node-status-icon.component.html</context>
@@ -14382,7 +14382,7 @@ The branches will be removed but the steps will remain in the unit.</source>
1438214382
</context-group>
1438314383
<context-group purpose="location">
1438414384
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts</context>
14385-
<context context-type="linenumber">89</context>
14385+
<context context-type="linenumber">91</context>
1438614386
</context-group>
1438714387
</trans-unit>
1438814388
<trans-unit id="5725893165169390019" datatype="html">
@@ -14397,7 +14397,7 @@ The branches will be removed but the steps will remain in the unit.</source>
1439714397
</context-group>
1439814398
<context-group purpose="location">
1439914399
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts</context>
14400-
<context context-type="linenumber">101</context>
14400+
<context context-type="linenumber">103</context>
1440114401
</context-group>
1440214402
</trans-unit>
1440314403
<trans-unit id="2981239280931729191" datatype="html">
@@ -14412,7 +14412,7 @@ The branches will be removed but the steps will remain in the unit.</source>
1441214412
</context-group>
1441314413
<context-group purpose="location">
1441414414
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts</context>
14415-
<context context-type="linenumber">106</context>
14415+
<context context-type="linenumber">108</context>
1441614416
</context-group>
1441714417
</trans-unit>
1441814418
<trans-unit id="4729134067352333395" datatype="html">
@@ -14514,7 +14514,7 @@ The branches will be removed but the steps will remain in the unit.</source>
1451414514
</context-group>
1451514515
<context-group purpose="location">
1451614516
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts</context>
14517-
<context context-type="linenumber">96</context>
14517+
<context context-type="linenumber">98</context>
1451814518
</context-group>
1451914519
</trans-unit>
1452014520
<trans-unit id="6699405178343319429" datatype="html">
@@ -14525,7 +14525,7 @@ The branches will be removed but the steps will remain in the unit.</source>
1452514525
</context-group>
1452614526
<context-group purpose="location">
1452714527
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts</context>
14528-
<context context-type="linenumber">108</context>
14528+
<context context-type="linenumber">110</context>
1452914529
</context-group>
1453014530
</trans-unit>
1453114531
<trans-unit id="2488512407151757745" datatype="html">

0 commit comments

Comments
 (0)