MOBILE-2359 workshop: Display correct number of dimensions

main
Pau Ferrer Ocaña 2018-07-05 16:30:53 +02:00
parent bfd4e9c936
commit 1515e2b678
5 changed files with 88 additions and 80 deletions

View File

@ -1,4 +1,5 @@
<ion-card *ngFor="let field of assessment.form.fields; let n = index"> <ng-container *ngFor="let field of assessment.form.fields; let n = index">
<ion-card *ngIf="n < assessment.form.dimenssionscount">
<ion-item text-wrap> <ion-item text-wrap>
<h2>{{ field.dimtitle }}</h2> <h2>{{ field.dimtitle }}</h2>
<core-format-text [text]="field.description"></core-format-text> <core-format-text [text]="field.description"></core-format-text>
@ -25,3 +26,4 @@
<p><core-format-text [text]="selectedValues[n].peercomment"></core-format-text></p> <p><core-format-text [text]="selectedValues[n].peercomment"></core-format-text></p>
</ion-item> </ion-item>
</ion-card> </ion-card>
</ng-container>

View File

@ -1,4 +1,5 @@
<ion-card *ngFor="let field of assessment.form.fields; let n = index"> <ng-container *ngFor="let field of assessment.form.fields; let n = index">
<ion-card *ngIf="n < assessment.form.dimenssionscount">
<ion-item text-wrap> <ion-item text-wrap>
<h2>{{ field.dimtitle }}</h2> <h2>{{ field.dimtitle }}</h2>
<core-format-text [text]="field.description"></core-format-text> <core-format-text [text]="field.description"></core-format-text>
@ -13,3 +14,4 @@
<p><core-format-text [text]="selectedValues[n].peercomment"></core-format-text></p> <p><core-format-text [text]="selectedValues[n].peercomment"></core-format-text></p>
</ion-item> </ion-item>
</ion-card> </ion-card>
</ng-container>

View File

@ -1,4 +1,5 @@
<ion-card *ngFor="let field of assessment.form.fields; let n = index"> <ng-container *ngFor="let field of assessment.form.fields; let n = index">
<ion-card *ngIf="n < assessment.form.dimenssionscount">
<ion-item text-wrap> <ion-item text-wrap>
<h2>{{ field.dimtitle }}</h2> <h2>{{ field.dimtitle }}</h2>
<core-format-text [text]="field.description"></core-format-text> <core-format-text [text]="field.description"></core-format-text>
@ -26,3 +27,4 @@
<p><core-format-text [text]="selectedValues[n].peercomment"></core-format-text></p> <p><core-format-text [text]="selectedValues[n].peercomment"></core-format-text></p>
</ion-item> </ion-item>
</ion-card> </ion-card>
</ng-container>

View File

@ -1,4 +1,5 @@
<ion-card *ngFor="let field of assessment.form.fields; let n = index"> <ng-container *ngFor="let field of assessment.form.fields; let n = index">
<ion-card *ngIf="n < assessment.form.dimenssionscount">
<ion-item text-wrap> <ion-item text-wrap>
<h2 [core-mark-required]="edit">{{ field.dimtitle }}</h2> <h2 [core-mark-required]="edit">{{ field.dimtitle }}</h2>
<core-format-text [text]="field.description"></core-format-text> <core-format-text [text]="field.description"></core-format-text>
@ -11,3 +12,4 @@
</ion-item> </ion-item>
</ion-list> </ion-list>
</ion-card> </ion-card>
</ng-container>

View File

@ -17,7 +17,7 @@
<ion-item stacked *ngIf="edit"> <ion-item stacked *ngIf="edit">
<ion-label stacked [core-mark-required]="overallFeedkbackRequired">{{ 'addon.mod_workshop.feedbackauthor' | translate }}</ion-label> <ion-label stacked [core-mark-required]="overallFeedkbackRequired">{{ 'addon.mod_workshop.feedbackauthor' | translate }}</ion-label>
<core-rich-text-editor item-content [control]="feedbackControl" [component]="component" [componentId]="workshop.coursemodule" (contentChanged)="onFeedbackChange($event)"></core-rich-text-editor> <core-rich-text-editor item-content [control]="feedbackControl" [component]="component" [componentId]="workshop.coursemodule" (contentChanged)="onFeedbackChange($event)"></core-rich-text-editor>
<core-input-errors item-content *ngIf="overallFeedkbackRequired && fieldErrors['feedbackauthor']" [errorText]="fieldErrors['feedbackauthor']"></core-input-errors> <core-input-errors item-content *ngIf="overallFeedkbackRequired && fieldErrors && fieldErrors['feedbackauthor']" [errorText]="fieldErrors['feedbackauthor']"></core-input-errors>
</ion-item> </ion-item>
<core-attachments *ngIf="edit && workshop.overallfeedbackfiles" [files]="data.assessment.feedbackattachmentfiles" [maxSize]="workshop.overallfeedbackmaxbytes" <core-attachments *ngIf="edit && workshop.overallfeedbackfiles" [files]="data.assessment.feedbackattachmentfiles" [maxSize]="workshop.overallfeedbackmaxbytes"
[maxSubmissions]="workshop.overallfeedbackfiles" [component]="component" [componentId]="componentId" [allowOffline]="true"></core-attachments> [maxSubmissions]="workshop.overallfeedbackfiles" [component]="component" [componentId]="componentId" [allowOffline]="true"></core-attachments>