MOBILE-3320 sync: Fix cannot read 'updated' of undefined
parent
7cc8fa0b9e
commit
c15d5de95d
|
@ -407,8 +407,8 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
|
||||||
*
|
*
|
||||||
* @return Promise resolved when done.
|
* @return Promise resolved when done.
|
||||||
*/
|
*/
|
||||||
protected async sync(): Promise<void> {
|
protected sync(): Promise<AddonModAssignSyncResult> {
|
||||||
await AddonModAssignSync.syncAssign(this.assign!.id);
|
return AddonModAssignSync.syncAssign(this.assign!.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -235,12 +235,12 @@ export class AddonModAssignEditPage implements OnInit, OnDestroy, CanLeave {
|
||||||
* @param inputData The input data.
|
* @param inputData The input data.
|
||||||
* @return Promise resolved with the data to submit.
|
* @return Promise resolved with the data to submit.
|
||||||
*/
|
*/
|
||||||
protected prepareSubmissionData(inputData: CoreFormFields): Promise<AddonModAssignSavePluginData> {
|
protected async prepareSubmissionData(inputData: CoreFormFields): Promise<AddonModAssignSavePluginData> {
|
||||||
// If there's offline data, always save it in offline.
|
// If there's offline data, always save it in offline.
|
||||||
this.saveOffline = this.hasOffline;
|
this.saveOffline = this.hasOffline;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return AddonModAssignHelper.prepareSubmissionPluginData(
|
return await AddonModAssignHelper.prepareSubmissionPluginData(
|
||||||
this.assign!,
|
this.assign!,
|
||||||
this.userSubmission,
|
this.userSubmission,
|
||||||
inputData,
|
inputData,
|
||||||
|
@ -251,7 +251,7 @@ export class AddonModAssignEditPage implements OnInit, OnDestroy, CanLeave {
|
||||||
// Cannot submit in online, prepare for offline usage.
|
// Cannot submit in online, prepare for offline usage.
|
||||||
this.saveOffline = true;
|
this.saveOffline = true;
|
||||||
|
|
||||||
return AddonModAssignHelper.prepareSubmissionPluginData(
|
return await AddonModAssignHelper.prepareSubmissionPluginData(
|
||||||
this.assign!,
|
this.assign!,
|
||||||
this.userSubmission,
|
this.userSubmission,
|
||||||
inputData,
|
inputData,
|
||||||
|
|
|
@ -514,8 +514,8 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp
|
||||||
*
|
*
|
||||||
* @return Promise resolved when done.
|
* @return Promise resolved when done.
|
||||||
*/
|
*/
|
||||||
protected async sync(): Promise<void> {
|
protected sync(): Promise<AddonModDataSyncResult> {
|
||||||
await AddonModDataPrefetchHandler.sync(this.module, this.courseId);
|
return AddonModDataPrefetchHandler.sync(this.module, this.courseId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -233,8 +233,8 @@ export class AddonModSurveyIndexComponent extends CoreCourseModuleMainActivityCo
|
||||||
*
|
*
|
||||||
* @return Promise resolved when done.
|
* @return Promise resolved when done.
|
||||||
*/
|
*/
|
||||||
protected async sync(): Promise<void> {
|
protected sync(): Promise<AddonModSurveySyncResult> {
|
||||||
await AddonModSurveySync.syncSurvey(this.survey!.id, this.currentUserId);
|
return AddonModSurveySync.syncSurvey(this.survey!.id, this.currentUserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue