Merge pull request #4225 from albertgasset/MOBILE-4616-assign

MOBILE-4616 assign: Fix late submission time calculation
main
Pau Ferrer Ocaña 2024-10-23 14:57:22 +02:00 committed by GitHub
commit 748559c073
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy, Can
if (this.userSubmission && this.userSubmission.status === AddonModAssignSubmissionStatusValues.SUBMITTED) { if (this.userSubmission && this.userSubmission.status === AddonModAssignSubmissionStatusValues.SUBMITTED) {
// Submitted, display the relevant early/late message. // Submitted, display the relevant early/late message.
const lateCalculation = this.userSubmission.timemodified - 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 lateThreshold = timeLimitEnabledBeforeDueDate ? this.assign.timelimit || 0 : duedate;
const earlyString = timeLimitEnabledBeforeDueDate ? 'submittedundertime' : 'submittedearly'; const earlyString = timeLimitEnabledBeforeDueDate ? 'submittedundertime' : 'submittedearly';
const lateString = timeLimitEnabledBeforeDueDate ? 'submittedovertime' : 'submittedlate'; const lateString = timeLimitEnabledBeforeDueDate ? 'submittedovertime' : 'submittedlate';