<ng-container *ngFor="let field of assessment.form.fields; let n = index">
    <ion-card *ngIf="n < assessment.form.dimenssionscount">
        <ion-item text-wrap>
            <h2>{{ field.dimtitle }}</h2>
            <core-format-text [text]="field.description"></core-format-text>
        </ion-item>
        <ion-item *ngIf="edit && field.grades">
            <ion-label [core-mark-required]="true" stacked>{{ 'addon.mod_workshop_assessment_accumulative.dimensiongradefor' | translate : {'$a': field.dimtitle } }}</ion-label>
            <ion-select [(ngModel)]="selectedValues[n].grade" interface="action-sheet">
                <ion-option *ngFor="let grade of field.grades" [value]="grade.value">{{grade.label}}</ion-option>
            </ion-select>
            <core-input-errors item-content *ngIf="fieldErrors['grade_' + n]" [errorText]="fieldErrors['grade_' + n]"></core-input-errors>
        </ion-item>
        <ion-item *ngIf="!edit && field.grades" text-wrap>
            <h2>{{ 'addon.mod_workshop_assessment_accumulative.dimensiongradefor' | translate : {'$a': field.dimtitle } }}</h2>
            <ng-container *ngFor="let grade of field.grades">
                <p *ngIf="grade.value === selectedValues[n].grade">{{grade.label}}</p>
            </ng-container>
        </ion-item>
        <ion-item *ngIf="edit">
            <ion-label stacked>{{ 'addon.mod_workshop_assessment_accumulative.dimensioncommentfor' | translate : {'$a': field.dimtitle } }}</ion-label>
            <ion-textarea aria-multiline="true" [(ngModel)]="selectedValues[n].peercomment" core-auto-rows></ion-textarea>
        </ion-item>
        <ion-item *ngIf="!edit" text-wrap>
            <h2>{{ 'addon.mod_workshop_assessment_accumulative.dimensioncommentfor' | translate : {'$a': field.dimtitle } }}</h2>
            <p><core-format-text [text]="selectedValues[n].peercomment"></core-format-text></p>
        </ion-item>
    </ion-card>
</ng-container>
