diff --git a/src/addon/mod/survey/providers/sync.ts b/src/addon/mod/survey/providers/sync.ts index 0733baf8d..2f43c7f28 100644 --- a/src/addon/mod/survey/providers/sync.ts +++ b/src/addon/mod/survey/providers/sync.ts @@ -202,9 +202,11 @@ export class AddonModSurveySyncProvider extends CoreCourseActivitySyncBaseProvid }); }).then(() => { if (courseId) { - // Data has been sent to server, update survey data. - return this.courseProvider.getModuleBasicInfoByInstance(surveyId, 'survey', siteId).then((module) => { - return this.prefetchAfterUpdate(module, courseId, undefined, siteId); + return this.surveyProvider.invalidateSurveyData(courseId, siteId).then(() => { + // Data has been sent to server, update survey data. + return this.courseProvider.getModuleBasicInfoByInstance(surveyId, 'survey', siteId).then((module) => { + return this.prefetchAfterUpdate(module, courseId, undefined, siteId); + }); }).catch(() => { // Ignore errors. });