commit
240f425d97
|
@ -103,11 +103,9 @@ export class AddonModDataFieldTextareaHandler extends AddonModDataFieldTextHandl
|
|||
return this.translate.instant('addon.mod_data.errormustsupplyvalue');
|
||||
}
|
||||
|
||||
const found = inputData.some((input) => {
|
||||
return !input.subfield && this.textUtils.htmlIsBlank(input.value);
|
||||
});
|
||||
const value = inputData.find((value) => value.subfield == '');
|
||||
|
||||
if (!found) {
|
||||
if (!value || this.textUtils.htmlIsBlank(value.value)) {
|
||||
return this.translate.instant('addon.mod_data.errormustsupplyvalue');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<core-rating-rate *ngIf="data && entry && ratingInfo && (!data.approval || entry.approved)" [ratingInfo]="ratingInfo" contextLevel="module" [instanceId]="data.coursemodule" [itemId]="entry.id" [itemSetId]="0" [courseId]="courseId" [aggregateMethod]="data.assessed" [scaleId]="data.scale" [userId]="entry.userid" (onLoading)="setLoadingRating($event)" (onUpdate)="ratingUpdated()"></core-rating-rate>
|
||||
<core-rating-aggregate *ngIf="data && entry && ratingInfo" [ratingInfo]="ratingInfo" contextLevel="module" [instanceId]="data.coursemodule" [itemId]="entry.id" [courseId]="courseId" [aggregateMethod]="data.assessed" [scaleId]="data.scale"></core-rating-aggregate>
|
||||
|
||||
<ion-item *ngIf="data && entry && entry.id > 0 && commentsEnabled">
|
||||
<ion-item *ngIf="data && data.comments && entry && entry.id > 0 && commentsEnabled">
|
||||
<core-comments contextLevel="module" [instanceId]="data.coursemodule" component="mod_data" [itemId]="entry.id" area="database_entry" [displaySpinner]="false" (onLoading)="setLoadingComments($event)"></core-comments>
|
||||
</ion-item>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
{{ 'addon.mod_workshop.assessmentstrategynotsupported' | translate:{$a: strategy} }}
|
||||
</div>
|
||||
|
||||
<ion-card *ngIf="assessmentStrategyLoaded && overallFeedkback && (edit || data.assessment.feedbackauthor || data.assessment.feedbackattachmentfiles.length) ">
|
||||
<ion-card *ngIf="assessmentStrategyLoaded && overallFeedkback && (edit || data.assessment.feedbackauthor || data.assessment.feedbackattachmentfiles && data.assessment.feedbackattachmentfiles.length) ">
|
||||
<ion-item text-wrap>
|
||||
<h2>{{ 'addon.mod_workshop.overallfeedback' | translate }}</h2>
|
||||
</ion-item>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<core-local-file *ngIf="attachment.name" [file]="attachment"></core-local-file>
|
||||
</ion-item>
|
||||
<ion-item text-wrap *ngIf="viewDetails && submission.feedbackauthor">
|
||||
<ion-avatar core-user-avatar [user]="evaluateByProfile" item-start [courseId]="courseId" [userId]="evaluateByProfile.id"></ion-avatar>
|
||||
<ion-avatar *ngIf="evaluateByProfile" core-user-avatar [user]="evaluateByProfile" item-start [courseId]="courseId" [userId]="evaluateByProfile.id"></ion-avatar>
|
||||
|
||||
<h2 *ngIf="evaluateByProfile && evaluateByProfile.fullname">{{ 'addon.mod_workshop.feedbackby' | translate : {$a: evaluateByProfile.fullname} }}</h2>
|
||||
<core-format-text [text]="submission.feedbackauthor"></core-format-text>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<ion-navbar core-back-button>
|
||||
<ion-title><core-format-text [text]="title"></core-format-text></ion-title>
|
||||
<ion-buttons end [hidden]="!loaded">
|
||||
<button *ngIf="assessmentId" ion-button clear (click)="saveAssessment()" [attr.aria-label]="'core.save' | translate">
|
||||
<button *ngIf="assessmentId && access.assessingallowed" ion-button clear (click)="saveAssessment()" [attr.aria-label]="'core.save' | translate">
|
||||
{{ 'core.save' | translate }}
|
||||
</button>
|
||||
<button *ngIf="canAddFeedback" ion-button clear (click)="saveEvaluation()" [attr.aria-label]="'core.save' | translate">
|
||||
|
|
|
@ -159,7 +159,7 @@ export class AddonModWorkshopHelperProvider {
|
|||
* @return {Promise<any>} Resolved with the assessment.
|
||||
*/
|
||||
getReviewerAssessmentById(workshopId: number, assessmentId: number, userId: number = 0, siteId?: string): Promise<any> {
|
||||
return this.workshopProvider.getAssessment(workshopId, assessmentId, siteId).catch(() => {
|
||||
return this.workshopProvider.getAssessment(workshopId, assessmentId, siteId).catch((error) => {
|
||||
return this.workshopProvider.getReviewerAssessments(workshopId, userId, undefined, undefined, siteId)
|
||||
.then((assessments) => {
|
||||
for (const x in assessments) {
|
||||
|
@ -168,13 +168,10 @@ export class AddonModWorkshopHelperProvider {
|
|||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
// Not found, return original error.
|
||||
return Promise.reject(error);
|
||||
});
|
||||
}).then((assessment) => {
|
||||
if (!assessment) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.workshopProvider.getAssessmentForm(workshopId, assessmentId, undefined, undefined, undefined, siteId)
|
||||
.then((assessmentForm) => {
|
||||
assessment.form = assessmentForm;
|
||||
|
|
Loading…
Reference in New Issue