diff --git a/src/app/components/creator/_dialogs/content-edit/content-edit.component.html b/src/app/components/creator/_dialogs/content-edit/content-edit.component.html index 2db04e9b2a2a3c23f13106d0ae21588583974817..9b0e5c2b6deb9ebfa720435cf07e618d26229d41 100644 --- a/src/app/components/creator/_dialogs/content-edit/content-edit.component.html +++ b/src/app/components/creator/_dialogs/content-edit/content-edit.component.html @@ -7,14 +7,16 @@ </mat-form-field> <mat-table [dataSource]="displayAnswers"> <ng-container matColumnDef="label"> - <mat-header-cell *matHeaderCellDef>{{ 'content.answer' | translate }}</mat-header-cell> + <mat-cell *matCellDef="let answer"> + <h4>{{answer.answerOption.label}}</h4> + </mat-cell> + </ng-container> + <ng-container matColumnDef="checked"> <mat-cell *matCellDef="let answer"> <mat-checkbox color="primary" [(ngModel)]="answer.correct" - [checked]="answer.correct" - name="{{ answer.answerOption.label }}">{{ answer.answerOption.label }}</mat-checkbox> + [checked]="answer.correct"></mat-checkbox> </mat-cell> </ng-container> - <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row> </mat-table> <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> diff --git a/src/app/components/creator/_dialogs/content-edit/content-edit.component.ts b/src/app/components/creator/_dialogs/content-edit/content-edit.component.ts index caab32270f7925b4dd413e18d1ed2d5959eb406a..9901c36e59597c57374052563294551d1ed5f446 100644 --- a/src/app/components/creator/_dialogs/content-edit/content-edit.component.ts +++ b/src/app/components/creator/_dialogs/content-edit/content-edit.component.ts @@ -13,7 +13,7 @@ import { AnswerOption } from '../../../../models/answer-option'; export class ContentEditComponent implements OnInit { content: ContentChoice; displayAnswers: DisplayAnswer[] = []; - displayedColumns = ['label']; + displayedColumns = ['label', 'checked']; constructor(public dialogRef: MatDialogRef<ContentListComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {