Skip to content

Commit 57b99a4

Browse files
fix(Teacher Tools): Fix broken images (#2291)
Fixes broken images in activity prompts and match buckets and choices.
1 parent d463d8b commit 57b99a4

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class NodeGradingComponent implements OnInit, OnDestroy, OnChanges {
102102
.filter((component) => this.projectService.componentHasWork(component))
103103
.map((component, index) => {
104104
component['displayIndex'] = index + 1;
105-
return component;
105+
return this.projectService.injectAssetPaths(component);
106106
});
107107
this.visibleComponents = [this.components[0]];
108108
this.numRubrics = this.node.getNumRubrics();

src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ng-template #bucketTemplate let-bucket="bucket" let-first="first">
22
<div class="bucket" [ngClass]="{ 'selected-bg-bg': first, 'notice-bg-bg': !first }">
33
<h3 class="mat-body-2">
4-
{{ bucket.value }}
4+
<span [innerHTML]="bucket.value"></span>
55
@if (first) {
66
(<span i18n>Source Bucket</span>)
77
}

src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ describe('MatchSummaryDisplayComponent', () => {
3737
spyOn(TestBed.inject(SummaryService), 'getLatestClassmateStudentWork').and.returnValue(
3838
of(getComponentStates())
3939
);
40+
spyOn(TestBed.inject(ProjectService), 'injectAssetPaths').and.callFake((componentStates) => {
41+
return componentStates;
42+
});
4043
fixture = TestBed.createComponent(MatchSummaryDisplayComponent);
4144
component = fixture.componentInstance;
4245
component.nodeId = 'nId';

src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ export class MatchSummaryDisplayComponent extends TeacherSummaryDisplayComponent
3838
this.getLatestWork().subscribe((componentStates) => {
3939
this.bucketData = [];
4040
this.bucketValues.clear();
41-
this.matchSummaryData = new MatchSummaryData(componentStates);
41+
this.matchSummaryData = new MatchSummaryData(
42+
this.projectService.injectAssetPaths(componentStates)
43+
);
4244
this.setBucketValues();
4345
this.setBucketData();
4446
this.setBucketShowMore();

0 commit comments

Comments
 (0)