From 59e1a4fcf549adfa425ab17b09594c947a1e454d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Fri, 7 Jan 2022 16:49:04 +0100
Subject: [PATCH] MOBILE-3787 assign: Always show submission status
---
.../mod/assign/classes/submissions-source.ts | 11 +++--------
.../mod/assign/components/index/index.ts | 2 +-
.../pages/submission-list/submission-list.html | 18 ++++++++++--------
3 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/src/addons/mod/assign/classes/submissions-source.ts b/src/addons/mod/assign/classes/submissions-source.ts
index a1c36e70c..4faec578d 100644
--- a/src/addons/mod/assign/classes/submissions-source.ts
+++ b/src/addons/mod/assign/classes/submissions-source.ts
@@ -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';
diff --git a/src/addons/mod/assign/components/index/index.ts b/src/addons/mod/assign/components/index/index.ts
index 84e64cb19..72b161007 100644
--- a/src/addons/mod/assign/components/index/index.ts
+++ b/src/addons/mod/assign/components/index/index.ts
@@ -302,7 +302,7 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
}
}
- this.needsGradingAvailable = (submissionStatus.gradingsummary?.submissionsneedgradingcount || 0) > 0;
+ this.needsGradingAvailable = this.summary.submissionsneedgradingcount > 0;
}
/**
diff --git a/src/addons/mod/assign/pages/submission-list/submission-list.html b/src/addons/mod/assign/pages/submission-list/submission-list.html
index 0a6635371..40ad93441 100644
--- a/src/addons/mod/assign/pages/submission-list/submission-list.html
+++ b/src/addons/mod/assign/pages/submission-list/submission-list.html
@@ -63,14 +63,16 @@
{{ 'addon.mod_assign.defaultteam' | translate }}
-
- {{ submission.statusTranslated }}
-
-
- {{ submission.gradingStatusTranslationId | translate }}
-
+
+
+ {{ submission.statusTranslated }}
+
+
+
+
+ {{ submission.gradingStatusTranslationId | translate }}
+
+