MOBILE-4069 core: Fix getModuleUpdates if not downloaded
parent
5630f5b054
commit
9a5231d481
|
@ -772,6 +772,7 @@ export class CoreCourseModulePrefetchDelegateService extends CoreDelegate<CoreCo
|
||||||
return { status: CoreConstants.NOT_DOWNLOADABLE };
|
return { status: CoreConstants.NOT_DOWNLOADABLE };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
// Get the stored data to get the status and downloadTime.
|
// Get the stored data to get the status and downloadTime.
|
||||||
const data = await CoreFilepool.getPackageData(siteId, handler.component, module.id);
|
const data = await CoreFilepool.getPackageData(siteId, handler.component, module.id);
|
||||||
|
|
||||||
|
@ -779,6 +780,9 @@ export class CoreCourseModulePrefetchDelegateService extends CoreDelegate<CoreCo
|
||||||
status: data.status || CoreConstants.NOT_DOWNLOADED,
|
status: data.status || CoreConstants.NOT_DOWNLOADED,
|
||||||
downloadTime: data.downloadTime || 0,
|
downloadTime: data.downloadTime || 0,
|
||||||
};
|
};
|
||||||
|
} catch {
|
||||||
|
return { status: CoreConstants.NOT_DOWNLOADED };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue