From b8d14fc48c6b6ab7bdfb4cae608737f88d04958f Mon Sep 17 00:00:00 2001 From: Albert Gasset Date: Wed, 23 Oct 2024 12:39:40 +0200 Subject: [PATCH] MOBILE-4616 assign: Fix late submission time calculation --- src/addons/mod/assign/components/submission/submission.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addons/mod/assign/components/submission/submission.ts b/src/addons/mod/assign/components/submission/submission.ts index 1341860e8..fd68f8c1b 100644 --- a/src/addons/mod/assign/components/submission/submission.ts +++ b/src/addons/mod/assign/components/submission/submission.ts @@ -242,7 +242,7 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy, Can if (this.userSubmission && this.userSubmission.status === AddonModAssignSubmissionStatusValues.SUBMITTED) { // Submitted, display the relevant early/late message. const lateCalculation = this.userSubmission.timemodified - - (timeLimitEnabledBeforeDueDate ? this.userSubmission.timecreated : 0); + (timeLimitEnabledBeforeDueDate ? this.userSubmission.timestarted ?? 0 : 0); const lateThreshold = timeLimitEnabledBeforeDueDate ? this.assign.timelimit || 0 : duedate; const earlyString = timeLimitEnabledBeforeDueDate ? 'submittedundertime' : 'submittedearly'; const lateString = timeLimitEnabledBeforeDueDate ? 'submittedovertime' : 'submittedlate';