For development, you need to have a running OpenEDX instance configured to serve this MFE in such a way that CORS is not an issue.
This project includes a set of scripts to automate the configuration of a minimal dev environment using tutor with minimal customizations.
In order for the dev scripts to work correctly, you need to have the following software installed:
- Docker Desktop
- pyenv
- pipenv
By default, a test user with the following credentials is created:
staff@example.com You will be asked to input a password during the initial setup
Run the following command to setup your environment, THIS SHOULD ONLY BE RUN ONCE:
IMPORTANT: make sure to answer "n" to the first Interactive platform configuration question (Are you configuring a production platform? Type 'n' if you are just testing Tutor on your local computer [y/N]).
make setup
This will setup the venv, install tutor, launch openedx, and customize the OpenEDX Caddyfile to add a route to our react dev server. Finally it will run npm install.
If for some reason you OpenEDX containers are stopped (your computer restarted, etc.), you should restart it with:
IMPORTANT: make sure to answer "n" to the first Interactive platform configuration question (Are you configuring a production platform? Type 'n' if you are just testing Tutor on your local computer [y/N]).
make start-tutor
Start the webpack-dev-server so you can work on the React code:
npm start
Go to http://apps.local.overhang.io/authn/login?next=%2F
Go to http://apps.local.overhang.io/wgulearning
Tutor is installed inside a venv created with pipenv. To run tutor, you need to enter the venv by running:
# Inside this project's root folder
pipenv shell
After doing that, you can run tutor commands inside that shell as normal.
Q: Which version of tutor/OpenEDX are we targeting?
A: 15.3.8 (Olive), it is defined in Pipfile
When viewing an LMS course page on the MFE in the local environment, the console will output the warning: Failed prop type: The prop id is marked as required in ForwardRef(DropdownToggle), but its value is undefined.
This warning is caused by the Paragon library's DropdownToggle component requiring an "id" prop. this component is used in frontend-app-learning within the SequenceNavigationDropdown component. This issue cannot be currently addressed without creating all of the related components within this repo and updating the code all the way to the DropdownToggle component.