MOBILE-3213 survey: Invalidate survey after sync

main
Pau Ferrer Ocaña 2019-12-13 16:18:48 +01:00
parent eaeff7e2b7
commit efa962aab3
1 changed files with 5 additions and 3 deletions

View File

@ -202,9 +202,11 @@ export class AddonModSurveySyncProvider extends CoreCourseActivitySyncBaseProvid
}); });
}).then(() => { }).then(() => {
if (courseId) { if (courseId) {
// Data has been sent to server, update survey data. return this.surveyProvider.invalidateSurveyData(courseId, siteId).then(() => {
return this.courseProvider.getModuleBasicInfoByInstance(surveyId, 'survey', siteId).then((module) => { // Data has been sent to server, update survey data.
return this.prefetchAfterUpdate(module, courseId, undefined, siteId); return this.courseProvider.getModuleBasicInfoByInstance(surveyId, 'survey', siteId).then((module) => {
return this.prefetchAfterUpdate(module, courseId, undefined, siteId);
});
}).catch(() => { }).catch(() => {
// Ignore errors. // Ignore errors.
}); });