-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: ADR introducing mobile offline content support #35011
base: master
Are you sure you want to change the base?
docs: ADR introducing mobile offline content support #35011
Conversation
Thanks for the pull request, @GlugovGrGlib! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.
|
I suggest adding a comprehensive list of content types that will support offline viewing (maybe not all will be implemented at a time). |
@GlugovGrGlib Just for curiosity how this ADR is different from this PR? |
Hello @angonz! I have updated the ADR and now there is a list of blocks that are planned to be supported. I also added a diagram to make it clearer how the content generation process will work. Please check it out. As for videos, video uploading is already implemented in mobile applications. |
Hi @salman2013, the functionality added in the PR you mentioned corresponds to what is described in this ADR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very exciting. Here's a first pass. I'll need to think through the implications over the next few days, so I should have more review comments next week--feel free to bug me if I don't get back to you with those.
* Figma | ||
* Offline mode product pages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Links?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
It was decided to include a fraction of Open edX xBlocks to be supported. | ||
The following list of blocks is currently planned to be added to the support: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad you enumerated these. I agree that it makes sense to start with a subset of XBlocks.
I think it would be good to keep the door open for future XBlocks to be supported. Could you build this in a way that would allow that? For example, can we make sure that it is possible to add support for an external XBlock like xblock-drag-and-drop-v2, without adding knowledge of xblock-drag-and-drop-v2 to edx-platform?
Relatedly, please keep in mind that we are extracting all built-in edx-platform XBlocks into a separate repo. It will take some time, but the CAPA ProblemBlock will eventually be extracted as part of that project. So, when you implement this, it is important that we are not hard-coding more CAPA knowledge into the publishing process-- the CAPA-specific archiving code should stay within the ProblemBlock definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your question!
For offline content generation, we will use an html renderer very similar to the one used in the LMS, so there shouldn't be any significant issues with adding support for new blocks.
As for your question about xblock-drag-and-drop-v2 or other external XBlocks, yes, we won't need to add changes to the edx platform for each of them. I think that some refactoring/improvements will be needed in the future to expand the types of supported blocks, but it definitely shouldn't be for each new block separately.
As for CAPA, yes, the CAPA block will not be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for CAPA, yes, the CAPA block will not be used.
@NiedielnitsevIvan Can you clarify this statement? "CAPA" is just another name for the ProblemBlock, which implements most of the core problem types. To implement offline support for most problems, the app will need to download archives of CAPA problem data and render CAPA html/javascript.
….com:raccoongang/edx-platform into glugovgrglib/mobile_offline_availability_ADR
Mobile API extension | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Extend mobile API endpoint for Course Home, to return information about offline content available for download for supported blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide the exact URL
|
||
|
||
* **Implement of a mechanism for generating and storing on a server or external storage**: The course content should be pre-generated and saved to the storage for later download. | ||
* **Render content**: Generate HTML content of block as it does for LMS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What Python function will call in order to render the HTML?
Does that function require a user_id? If so, how will you handle that?
* **Track course publishing events on CMS side**: Signal in the CMS that makes request to LMS to update course content. | ||
* **Track course publishing events on LMS side**: API endpoint to receive the signal from CMS and update course content. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see that this would work, but I am curious if there is a more elegant approach. I have asked in #architecture
.
* **Sync Mechanism**: Periodically synchronize local data with the server when the device is online. | ||
* **Sync on app side**: On course outline screen, check if the course content is up to date and update it if necessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please say more about:
- How the offline app will respond when a user hits Submit
- What local state the app will store and in what format it will store it
- How the app will synchronize this state with the server
Description
This PR introduces an ADR outlining the approach to enable offline content support in the Open edX mobile application. The ADR documents the proposed solution, including content generation, API extensions, and synchronization mechanisms.
Key Decisions:
Offline Content Generation:
ZIP archives of xBlock content (HTML, assets, and assessments) will be pre-generated during course publishing and stored for mobile download.
Retries failed generation tasks with progressive delays.
Supports both local and S3 storage.
Mobile API:
Extends the Course Home API to include offline content availability (URL, size, last modified timestamp).
JavaScript Bridge:
Enables CAPA problem submissions via JSON messages through native mobile bridges.
Partial support for hints/feedback in problem types.
Supported xBlocks:
Includes common problem types (checkboxes, dropdown, text/numerical input), text/video blocks, and partial support for blocks with hints/feedback.
Consequences:
✅ Pros: Improved accessibility for learners with unreliable connectivity, increased engagement.
⚠️ Cons: Added complexity in content sync/storage, potential app size increase.
Rejected Solutions:
Supporting information
FC-0047