From 1c84715f9a068fda700126287af879476ae06579 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 23 May 2024 12:20:00 +0200 Subject: [PATCH] MOBILE-4470 completion: Fix manual completion not updated --- src/core/features/course/services/course-helper.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/features/course/services/course-helper.ts b/src/core/features/course/services/course-helper.ts index 814db49c1..0636e5048 100644 --- a/src/core/features/course/services/course-helper.ts +++ b/src/core/features/course/services/course-helper.ts @@ -1967,6 +1967,7 @@ export class CoreCourseHelperProvider { completion.state = completion.state === CoreCourseModuleCompletionStatus.COMPLETION_COMPLETE ? CoreCourseModuleCompletionStatus.COMPLETION_INCOMPLETE : CoreCourseModuleCompletionStatus.COMPLETION_COMPLETE; + completion.isoverallcomplete = completion.state === CoreCourseModuleCompletionStatus.COMPLETION_COMPLETE; try { const response = await CoreCourse.markCompletedManually( @@ -1985,6 +1986,7 @@ export class CoreCourseHelperProvider { completion.state = completion.state === CoreCourseModuleCompletionStatus.COMPLETION_COMPLETE ? CoreCourseModuleCompletionStatus.COMPLETION_INCOMPLETE : CoreCourseModuleCompletionStatus.COMPLETION_COMPLETE; + completion.isoverallcomplete = !completion.isoverallcomplete; CoreDomUtils.showErrorModalDefault(error, 'core.errorchangecompletion', true); } finally {