diff --git a/src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html b/src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
index 38d30e7d3ef..fca2c325363 100644
--- a/src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
+++ b/src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
@@ -13,7 +13,13 @@
>
@if (!isChoiceReuseMatch) {
-
+
person{{ choice.getCount() }}
}
@@ -42,7 +48,13 @@
>inventory_2
-
+
person{{ bucketDataPoint.getCount() }}
diff --git a/src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.ts b/src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.ts
index 6f361a40d89..63f713eb58c 100644
--- a/src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.ts
+++ b/src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.ts
@@ -5,12 +5,14 @@ import { BucketData, ChoiceData, MatchSummaryData } from '../summary-data/MatchS
import { MatchSummaryDataPoint } from '../summary-data/MatchSummaryDataPoint';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatIconModule } from '@angular/material/icon';
+import { MatTooltipModule } from '@angular/material/tooltip';
import { TeacherSummaryDisplayComponent } from '../teacher-summary-display.component';
+import { ConfigService } from '../../../services/configService';
export type SummaryViewMode = 'choice' | 'bucket';
@Component({
- imports: [CommonModule, MatButtonToggleModule, MatIconModule],
+ imports: [CommonModule, MatButtonToggleModule, MatIconModule, MatTooltipModule],
selector: 'match-summary-display',
styleUrls: [
'./match-summary-display.component.scss',
@@ -25,6 +27,7 @@ export class MatchSummaryDisplayComponent extends TeacherSummaryDisplayComponent
protected isChoiceReuseMatch: boolean;
private matchSummaryData: MatchSummaryData;
viewMode: SummaryViewMode = 'bucket';
+ protected workgroupNamesTooltips = new Map();
ngOnInit(): void {
this.setIsChoiceReuseMatch();
@@ -41,11 +44,13 @@ export class MatchSummaryDisplayComponent extends TeacherSummaryDisplayComponent
this.getLatestWork().subscribe((componentStates) => {
this.bucketData = [];
this.choiceData = [];
+ this.workgroupNamesTooltips = new Map();
this.matchSummaryData = new MatchSummaryData(
this.projectService.injectAssetPaths(componentStates)
);
this.setChoiceData();
this.setBucketData();
+ this.setWorkgroupNamesTooltips();
});
}
@@ -81,6 +86,19 @@ export class MatchSummaryDisplayComponent extends TeacherSummaryDisplayComponent
return b.getCount() - a.getCount();
}
+ private setWorkgroupNamesTooltips(): void {
+ const allDataPoints = this.matchSummaryData.getChoicesData().flatMap((c) => c.choiceDataPoints);
+ for (const dp of allDataPoints) {
+ this.workgroupNamesTooltips.set(
+ dp,
+ dp
+ .getWorkgroupIds()
+ .map((id) => this.configService.getDisplayUsernamesByWorkgroupId(id))
+ .join('\n')
+ );
+ }
+ }
+
protected renderDisplay(): void {
super.renderDisplay();
this.generateSummary();
diff --git a/src/assets/wise5/directives/teacher-summary-display/summary-data/MatchSummaryData.ts b/src/assets/wise5/directives/teacher-summary-display/summary-data/MatchSummaryData.ts
index be1050073cc..2595657f761 100644
--- a/src/assets/wise5/directives/teacher-summary-display/summary-data/MatchSummaryData.ts
+++ b/src/assets/wise5/directives/teacher-summary-display/summary-data/MatchSummaryData.ts
@@ -47,7 +47,11 @@ export class MatchSummaryData extends SummaryData {
bucketStudentData.items.forEach((choice) => this.registerChoice(choice.value));
} else {
bucketStudentData.items.forEach((choice) => {
- this.extractBucketDataPerChoice(choice.value, bucketStudentData.value);
+ this.extractBucketDataPerChoice(
+ choice.value,
+ bucketStudentData.value,
+ componentState.workgroupId
+ );
});
}
});
@@ -60,12 +64,18 @@ export class MatchSummaryData extends SummaryData {
}
}
- private extractBucketDataPerChoice(choiceValue: string, bucketValue: string): void {
+ private extractBucketDataPerChoice(
+ choiceValue: string,
+ bucketValue: string,
+ workgroupId: number
+ ): void {
const dataPoint = this.findSummaryDataPoint(choiceValue, bucketValue);
if (dataPoint) {
dataPoint.incrementCount(1);
+ dataPoint.addWorkgroupId(workgroupId);
} else {
const newDataPoint = new MatchSummaryDataPoint(bucketValue, 1, choiceValue);
+ newDataPoint.addWorkgroupId(workgroupId);
this.summaryDataPoints.push(newDataPoint);
this.addDataPointToChoiceData(choiceValue, newDataPoint);
}
diff --git a/src/assets/wise5/directives/teacher-summary-display/summary-data/MatchSummaryDataPoint.ts b/src/assets/wise5/directives/teacher-summary-display/summary-data/MatchSummaryDataPoint.ts
index 4f2b5591963..fda4d710f63 100644
--- a/src/assets/wise5/directives/teacher-summary-display/summary-data/MatchSummaryDataPoint.ts
+++ b/src/assets/wise5/directives/teacher-summary-display/summary-data/MatchSummaryDataPoint.ts
@@ -5,6 +5,7 @@ import { SummaryDataPoint } from '../../summary-display/summary-data/SummaryData
*/
export class MatchSummaryDataPoint extends SummaryDataPoint {
private choiceValue: string;
+ private workgroupIds: number[] = [];
constructor(id: number | string, count?: number, choiceValue?: string) {
super(id, count);
@@ -18,4 +19,14 @@ export class MatchSummaryDataPoint extends SummaryDataPoint {
getBucketValue(): string {
return this.getId() as string;
}
+
+ addWorkgroupId(workgroupId: number): void {
+ if (!this.workgroupIds.includes(workgroupId)) {
+ this.workgroupIds.push(workgroupId);
+ }
+ }
+
+ getWorkgroupIds(): number[] {
+ return this.workgroupIds;
+ }
}
diff --git a/src/messages.xlf b/src/messages.xlf
index 45cf3d967ae..553fc97e8a3 100644
--- a/src/messages.xlf
+++ b/src/messages.xlf
@@ -16275,11 +16275,11 @@ Are you sure you want to proceed?
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 33,34
+ 39,40
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 85,88
+ 97,100
@@ -23320,67 +23320,67 @@ If this problem continues, let your teacher know and move on to the next activit
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 41,44
+ 47,50
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 81,83
+ 93,95
Not moved by any students
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 56,62
+ 68,74
Choice Frequency
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 63,65
+ 75,77
Number of times each item crop_16_9 was moved into the different buckets inventory_2.
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 67,70
+ 79,82
Organize by:
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 71,73
+ 83,85
Organize by
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 76,79
+ 88,91
Organize by bucket
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 79,80
+ 91,92
Organize by choice
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 83,84
+ 95,96
Your students' choices will show up here when they complete the activity.
src/assets/wise5/directives/teacher-summary-display/match-summary-display/match-summary-display.component.html
- 115,119
+ 127,131