...
Expand | ||
---|---|---|
| ||
Content pre downloadingThis part is about how user will receive a content for a specific course on their device to be able to work while offline. This requires to download:
SolutionCreate an endpoint that generates For JSON based data it is going to be cached for future offline use. No extra work on the backend. For XBlocks a compressed file with all data for the course. Data is compressed and structured by the main course componentsstatic files is generated presumably only on course Implementation assumptions
Pre downloaded XBlocksXBlocks are assumed to be a single HTML file for now. But there are different types and different complexities. This means one xblock can load something else which makes things complicated. The idea is to separate XBlocks into offline-friendly and non-offline-friendly and incrementally work with each type.
|
Expand | ||
---|---|---|
| ||
Offline-to-online syncThis part involves batch data transfer when a user goes online after being offline. It requires to take care of:
SolutionCreate:
XBlock submissions assumptions
Events assumptions
|
Expand | ||
---|---|---|
| ||
Course XBlocks updatesThis part is partially touched in the section above when state changes are mentioned. There are different scenarios when the XBlock stored on the mobile device for offline mode is required to be updated.
SolutionImplement an endpoint to download a part of the course (presumably course section/subsection) to replace outdated parts in the mobile store. It should consider efficiency, because downloading the whole course again is not appropriateEndpoint for XBlock can be extended with query parameters to be able to download default state of the XBlock and state with a feedback. If user would want to reset his feedback in the offline mode there will be 2 XBlocks states already stored. Potentially it would be good to know which XBlocks are outdated before sending batch data to the server. By this potential conflicts can be avoided. Validating all XBlocks can require to have a separate endpoint with last updates dates. Mobile application can compare each XBlock update date and react in different ways like show some information for user or skip submissions for outdated XBlock. |
...