Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,17 @@ export class MatchStudentDefaultComponent extends ComponentStudent {
}

private addIdeasToSourceBucket(responses: any[], rubric: CRaterRubric): void {
getUniqueIdeas(responses, rubric).forEach((idea) => {
const choice = new Choice(idea.name, idea.text);
this.choices.push(choice);
this.getBucketById(this.sourceBucketId).items.push(choice);
});
getUniqueIdeas(responses, rubric)
.filter((idea) => !this.isInSourceBucket(idea.name))
.forEach((idea) => {
const choice = new Choice(idea.name, idea.text);
this.choices.push(choice);
this.getBucketById(this.sourceBucketId).items.push(choice);
});
}

private isInSourceBucket(choiceId: string): boolean {
return this.sourceBucket.items.some((item) => item.id === choiceId);
Comment thread
breity marked this conversation as resolved.
Outdated
}

protected addChoice(): void {
Expand Down
Loading