MOBILE-3787 assign: Always show submission status

main
Pau Ferrer Ocaña 2022-01-07 16:49:04 +01:00
parent 9b93a0450c
commit 59e1a4fcf5
3 changed files with 14 additions and 17 deletions

View File

@ -211,14 +211,9 @@ export class AddonModAssignSubmissionsSource extends CoreRoutedItemsManagerSourc
submission.gradingstatus,
);
// Show submission status if not submitted for grading.
if (submission.statusColor != 'success' || !submission.gradingstatus) {
submission.statusTranslated = Translate.instant(
'addon.mod_assign.submissionstatus_' + submission.status,
);
} else {
submission.statusTranslated = '';
}
submission.statusTranslated = Translate.instant(
'addon.mod_assign.submissionstatus_' + submission.status,
);
if (notSynced) {
submission.gradingStatusTranslationId = 'addon.mod_assign.gradenotsynced';

View File

@ -302,7 +302,7 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
}
}
this.needsGradingAvailable = (submissionStatus.gradingsummary?.submissionsneedgradingcount || 0) > 0;
this.needsGradingAvailable = this.summary.submissionsneedgradingcount > 0;
}
/**

View File

@ -63,14 +63,16 @@
{{ 'addon.mod_assign.defaultteam' | translate }}
</span>
</p>
<ion-badge class="ion-text-center ion-text-wrap" [color]="submission.statusColor"
*ngIf="submission.statusTranslated">
{{ submission.statusTranslated }}
</ion-badge>
<ion-badge class="ion-text-center ion-text-wrap" [color]="submission.gradingColor"
*ngIf="submission.gradingStatusTranslationId">
{{ submission.gradingStatusTranslationId | translate }}
</ion-badge>
<p *ngIf="submission.statusTranslated">
<ion-badge class="ion-text-center ion-text-wrap" [color]="submission.statusColor">
{{ submission.statusTranslated }}
</ion-badge>
</p>
<p *ngIf="submission.gradingStatusTranslationId">
<ion-badge class="ion-text-center ion-text-wrap" [color]="submission.gradingColor">
{{ submission.gradingStatusTranslationId | translate }}
</ion-badge>
</p>
</ion-label>
</ion-item>
</ng-container>