MOBILE-2431 survey: Fix sync

main
Albert Gasset 2018-06-19 10:55:38 +02:00
parent c506845a38
commit e286e93918
1 changed files with 3 additions and 1 deletions

View File

@ -90,9 +90,11 @@ export class AddonModSurveyOfflineProvider {
getAllData(siteId?: string): Promise<any> { getAllData(siteId?: string): Promise<any> {
return this.sitesProvider.getSite(siteId).then((site) => { return this.sitesProvider.getSite(siteId).then((site) => {
return site.getDb().getAllRecords(AddonModSurveyOfflineProvider.SURVEY_TABLE).then((entries) => { return site.getDb().getAllRecords(AddonModSurveyOfflineProvider.SURVEY_TABLE).then((entries) => {
return entries.map((entry) => { entries.forEach((entry) => {
entry.answers = this.textUtils.parseJSON(entry.answers); entry.answers = this.textUtils.parseJSON(entry.answers);
}); });
return entries;
}); });
}); });
} }