MOBILE-4470 completion: Fix manual completion not updated

main
Dani Palou 2024-05-23 12:20:00 +02:00
parent 40032e7d5f
commit 1c84715f9a
1 changed files with 2 additions and 0 deletions

View File

@ -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 {