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, submission.gradingstatus,
); );
// Show submission status if not submitted for grading.
if (submission.statusColor != 'success' || !submission.gradingstatus) {
submission.statusTranslated = Translate.instant( submission.statusTranslated = Translate.instant(
'addon.mod_assign.submissionstatus_' + submission.status, 'addon.mod_assign.submissionstatus_' + submission.status,
); );
} else {
submission.statusTranslated = '';
}
if (notSynced) { if (notSynced) {
submission.gradingStatusTranslationId = 'addon.mod_assign.gradenotsynced'; 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 }} {{ 'addon.mod_assign.defaultteam' | translate }}
</span> </span>
</p> </p>
<ion-badge class="ion-text-center ion-text-wrap" [color]="submission.statusColor" <p *ngIf="submission.statusTranslated">
*ngIf="submission.statusTranslated"> <ion-badge class="ion-text-center ion-text-wrap" [color]="submission.statusColor">
{{ submission.statusTranslated }} {{ submission.statusTranslated }}
</ion-badge> </ion-badge>
<ion-badge class="ion-text-center ion-text-wrap" [color]="submission.gradingColor" </p>
*ngIf="submission.gradingStatusTranslationId"> <p *ngIf="submission.gradingStatusTranslationId">
<ion-badge class="ion-text-center ion-text-wrap" [color]="submission.gradingColor">
{{ submission.gradingStatusTranslationId | translate }} {{ submission.gradingStatusTranslationId | translate }}
</ion-badge> </ion-badge>
</p>
</ion-label> </ion-label>
</ion-item> </ion-item>
</ng-container> </ng-container>