Skip to content

Commit 65da126

Browse files
committed
CSCEXAM-000 Fix some angular for-loop tracking issues
1 parent 70d78ba commit 65da126

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

ui/src/app/enrolment/finished/exam-answers-dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ <h3 class="row mt-3">
5050
</div>
5151
}
5252

53-
@for (section of sortedExam()!.examSections; track section) {
53+
@for (section of sortedExam()!.examSections; track section.id) {
5454
<div class="row mt-3">
5555
<h4 class="row">
5656
<div class="col-md-12">

ui/src/app/exam/editor/sections/sections.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<div class="row mx-2">
2525
<div class="col-md-12">
2626
<div cdkDropList [cdkDropListData]="exam().examSections" (cdkDropListDropped)="moveSection($event)">
27-
@for (section of exam().examSections | orderBy: 'sequenceNumber'; track section; let i = $index) {
27+
@for (section of exam().examSections | orderBy: 'sequenceNumber'; track section.id; let i = $index) {
2828
<div class="section-box mb-4" cdkDrag cdkDragLockAxis="y">
2929
<div class="dragdrop-placeholder" *cdkDragPlaceholder></div>
3030
<div class="drag-preview" *cdkDragPreview>#{{ i }} {{ section.name }}</div>

ui/src/app/examination/navigation/examination-toolbar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
</div>
8383
</div>
8484

85-
@for (section of exam().examSections | orderBy: 'sequenceNumber'; track section; let i = $index) {
85+
@for (section of exam().examSections | orderBy: 'sequenceNumber'; track section.id; let i = $index) {
8686
<div
8787
class="row mt-3 ms-2 align-items-center phase-box"
8888
[ngClass]="activeSection()?.sequenceNumber === i ? '' : 'notactive'"

ui/src/app/review/assessment/assessment.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h3>
4141

4242
<!-- Sections -->
4343
@if (exam()?.examSections) {
44-
@for (section of exam()!.examSections | orderBy: 'sequenceNumber'; track section; let index = $index) {
44+
@for (section of exam()!.examSections | orderBy: 'sequenceNumber'; track section.id; let index = $index) {
4545
<xm-r-section
4646
[section]="section"
4747
[participation]="participation()!"

ui/src/app/review/assessment/print/printed-assessment.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ <h4>
139139
</div>
140140
<!-- Sections -->
141141
<div class="row firefox-print-fix">
142-
@for (section of exam()!.examSections | orderBy: 'sequenceNumber'; track section; let index = $index) {
142+
@for (section of exam()!.examSections | orderBy: 'sequenceNumber'; track section.id; let index = $index) {
143143
<div class="mt-2 col-md-12">
144144
<xm-printed-section [section]="section" [index]="index"></xm-printed-section>
145145
</div>

0 commit comments

Comments
 (0)