Open Response Assessments (ORA), are a problem type / XBlock used in the edX Platform. They allow an instructor to create a prompt that students respond to with text, files, or both, and are used for more open-ended assignments like essays or project submissions.
Note - anytime I say "from inside the lms", that means you've run make lms-shell from the devstack directory and are on a command prompt inside the lms container.
When editing ORA directly, the easiest way to test changes is to install an “editable” copy of ORA into your devstack. To do this:
Clone the edx-ora2 repo into ../src/ directory (relative to your devstack repo location). This will mount the directory in a way that is accessible to the lms container.
Install an editable copy of your local ORA by either:
Running make install-local-ora from the edx-ora2 repo. OR
From inside the lms, uninstall ora2 and reinstall your local copy by running pip uninstall ora2 -y; pip install -e /edx/src/edx-ora2/
Set up a development virtual environment, note that this MUST be named edx-ora2 for related scripting to work.
Ensure that your virtual environment is named edx-ora2. Using a different name will cause errors when trying to generate translations.
Now, in the devstack directory on your host, run:
make lms-restart lms-logs
That's it, you're good to go! See Makefile for all the available commands, most are fairly self-explanatory
In order to simulate a given tox environment (django18, django111, quality, js), run tox -e <env> for the env in question (after re-activating your edx-ora2 virtual environment).
Usually, you can just run the underlying make commands for quicker tests, as requirements aren't re-installed.
If you keep your containers running, you can return to your configured env very quickly - just cd /edx/src/edx-ora2; source edx-ora2/bin/activate from inside the lms and you're good to go. As of right this second, you need to repeat all these steps after restarting your container (because solving that problem is still in progress).
ORA code also depends on edx-submissions. As a result, anytime a new version of edx-submissions is released, ORA code must be updated as follows.
make lms-shell # get into docker container
cd /edx/src/edx-ora2 # goto into ora2 folder
source edx-ora2/bin/activate # activate ora2 virtual environment
pip install -U edx-submissions # installs latest version of submissions from pypi
pip install -e /edx/src/edx-submissions # istalls local version of submissions
Available make commands
make quality - run the JSHint quality tests
make sass - recompiles sass, can be done while edx-platform is running, then refresh the browser to see the changes
make test - run all the tests
make test-acceptance - run the acceptance tests
make test-a11y - run the accessibility tests
make test-python - run the Python tests
make test-sandbox - run all the sandbox tests (currently acceptance and a11y)