Skip to content

Commit

Permalink
fix(client): When Student subtest report uses
Browse files Browse the repository at this point in the history
custom score, the value is the actual percentage value

Refs #3415
Refs #3416
  • Loading branch information
Evans Dianga committed Jul 25, 2024
1 parent 27331d7 commit 98f049b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/app/class/_services/dashboard.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export class DashboardService {
totalIncorrect: totalIncorrect,
maxValueAnswer: maxValueAnswer,
totalCorrect: totalCorrect,
scorePercentageCorrect: scorePercentageCorrect,
scorePercentageCorrect: customScore ? customScore : scorePercentageCorrect,
duration: duration,
customScore: customScore
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ <h2>{{subtestReport.label}}</h2>
<td>
<span *ngFor="let res of generateArray(item.value)">
<ng-container *ngIf="res.value">
<ng-container *ngIf="res.value.percentage">
<ng-container *ngIf="res.value.percentage && !res.value.customScore">
({{tNumber(res.value.rawScore)}}/{{tNumber(res.value.totalGridAnswers)}}) {{tNumber(res.value.percentage)}}
</ng-container>
<ng-container *ngIf="res.value.customScore">
{{(tNumber(res.value.customScore))|number : '1.2-2'}}%
</ng-container>
<ng-container *ngIf="!res.value.percentage">
({{tNumber(res.value.rawScore)}}/{{tNumber(res.value.totalGridAnswers)}})
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ export class StudentSubtestReportComponent implements OnInit, AfterViewChecked {
rawScore: result.score,
totalGridAnswers: result.maxValueAnswer,
percentage: percentage,
totalCorrect: totalCorrect
totalCorrect: totalCorrect,
customScore: result.customScore
};
resultObject[category] = scores;
const currentTotal = this.totals[category];
Expand Down

0 comments on commit 98f049b

Please sign in to comment.