- Notifications
You must be signed in to change notification settings - Fork290
Front-end for the Open edX course experience, implemented using React and Paragon.
License
openedx/frontend-app-learning
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is the Learning MFE (micro-frontend application), which renders alllearner-facing course pages (like the course outline, the progress page,actual course content, etc).
Tutor is currently recommended as a development environment for the LearningMFE. Most likely, it already has this MFE configured; however, you'll need tomake some changes in order to run it in development mode. You can referto therelevant tutor-mfe documentation for details, or follow the quickguide below.
- Clone your new repo:
git clone https://github.com/openedx/frontend-app-learning.git
- Use the version of Node specified in
.nvmrc
.
Using other major versions of nodemay work, but this is unsupported. Forconvenience, this repository includes an.nvmrc
file to help in setting thecorrect node version vianvm.
- Stop the Tutor devstack, if it's running:
tutor dev stop
- Next, we need to tell Tutor that we're going to be running this repo indevelopment mode, and it should be excluded from the
mfe
container thatotherwise runs every MFE. Run this:
tutor mounts add /path/to/frontend-app-learning
- Start Tutor in development mode. This command will start the LMS and Studio,and other required MFEs like
authn
andaccount
, but will not startthe learning MFE, which we're going to run on the host instead of in acontainer managed by Tutor. Run:
tutor dev start lms cms mfe
- Install npm dependencies:
cd frontend-app-learning&& npm ci
- Start the dev server:
npm run dev
Then you can access the app athttp://local.openedx.io:2000/learning/
If you see an "Invalid Host header" error, then you're probably using a different domain name for your devstack such aslocal.edly.io
orlocal.overhang.io
(not the new recommended default,local.openedx.io
). In that case, runthese commands to update your devstack's domain names:
tutor dev stoptutor config save --set LMS_HOST=local.openedx.io --set CMS_HOST=studio.local.openedx.iotutor dev launch -I --skip-buildtutor dev stop learning# We will run this MFE on the host
To develop locally on modules that are installed into this app, you'll need to create amodule.config.js
file (which is git-ignored) that defines where to find your local modules, for instance:
module.exports={/* Modules you want to use from local source code. Adding a module here means that when this app runs its build, it'll resolve the source from peer directories of this app. moduleName: the name you use to import code from the module. dir: The relative path to the module's source code. dist: The sub-directory of the source code where it puts its build artifact. Often "dist", though you may want to use "src" if the module installs React as a peer/dev dependency. */localModules:[{moduleName:'@openedx/paragon/scss',dir:'../paragon',dist:'scss'},{moduleName:'@openedx/paragon',dir:'../paragon',dist:'dist'},{moduleName:'@openedx/frontend-enterprise',dir:'../frontend-enterprise',dist:'src'},{moduleName:'@openedx/frontend-platform',dir:'../frontend-platform',dist:'dist'},],};
Seehttps://github.com/openedx/frontend-build#local-module-configuration-for-webpack for more details.
The Learning MFE is similar to all the other Open edX MFEs. Read the OpenedX Developer Guide's section onMFE applications.
This MFE can be customized usingFrontend Plugin Framework.
The parts of this MFE that can be customized in that manner are documentedhere.
This MFE is configured via environment variables supplied at build time.All micro-frontends have a shared set of required environment variables,as documented in the Open edX Developer Guide underRequired Environment Variables.
The learning micro-frontend also supports the following additional variables:
- CREDIT_HELP_LINK_URL
- A link to resources to help explain what course credit is and how to earn it.
- ENABLE_JUMPNAV
- Enables the new Jump Navigation feature in the course breadcrumbs, defaulted to the string 'true'.Disable to have simple hyperlinks for breadcrumbs. Setting it to any other value but 'true' ('false','I love flags', 'etc' would disable the Jumpnav).This feature flag is slated to be removed as jumpnav becomes default. Follow the progress of this ticket here:https://openedx.atlassian.net/browse/TNL-8678
- SOCIAL_UTM_MILESTONE_CAMPAIGN
This value is passed as the
utm_campaign
parameter for social-sharelinks when celebrating learning milestones in the course. Optional.Example:
milestone
- SUPPORT_URL_CALCULATOR_MATH
A link that explains how to use the in-course calculator. You can use theone in the example below if you don't want to have your own branded version.
- SUPPORT_URL_ID_VERIFICATION
A link that explains how to verify your ID. Shown in contexts where you needto verify yourself to earn a certificate. The example link below is probably tooedx.org-specific to use for your own site.
Example:https://support.edx.org/hc/en-us/articles/206503858-How-do-I-verify-my-identity
- SUPPORT_URL_VERIFIED_CERTIFICATE
A link that explains what a verified certificate is. You can use theone in the example below if you don't want to have your own branded version.Optional.
Example:https://support.edx.org/hc/en-us/articles/206502008-What-is-a-verified-certificate
- TWITTER_HASHTAG
This value is used in the Twitter social-share link when celebrating learningmilestones in the course. Will prefill the suggested post with this hashtag.Optional.
Example:
brandedhashtag
- TWITTER_URL
A link to your Twitter account. The Twitter social-share link won't appearunless this is set. Optional.
Example:https://twitter.com/openedx
If you're having trouble, we havediscussion forumswhere you can connect with others in the community.
Our real-time conversations are on Slack. You can request aSlackinvitation, then join ourcommunity Slack workspace. Because this is afrontend repository, the best place to discuss it would be in the#wg-frontendchannel.
For anything non-trivial, the best path is to open an issue in this repositorywith as many details about the issue you are facing as you can provide.
https://github.com/openedx/frontend-app-learning/issues
For more information about these options, see theGetting Help page.
Contributions are very welcome. Please readHow To Contribute for details.
This project is currently accepting all types of contributions, bug fixes,security fixes, maintenance work, or new features. However, please make sureto discuss your new feature idea with the maintainers beforebeginning development to maximize the chances of your change being accepted.You can start a conversation by creating a new issue on this repo summarizingyour idea.
All community members are expected to follow theOpen edX Code of Conduct.
The code in this repository is licensed under the AGPLv3 unless otherwisenoted.
Please seeLICENSE for details.
Please do not report security issues in public. Please emailsecurity@openedx.org.
About
Front-end for the Open edX course experience, implemented using React and Paragon.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.