A django app plugin for edx-platform
In production, the current practice as of 01/2021 is to add this dependency via Salt.
For local development, you can use one of the following options to add this as a dependency in the edx-platform
repo:
Install directly via pip.
# From the devstack directory, run bash in a running LMS container...
make dev.shell.lms
# In bash, install the package
source /edx/app/edxapp/edxapp_env && pip install rapid-response-xblock==<version>
# Do the same for studio
make dev.shell.studio
# In bash, install the package
source /edx/app/edxapp/edxapp_env && pip install rapid-response-xblock==<version>
To install a version of rapid-response-xblock which is not on pypi, you can clone this repo into the two containers. Install the package by running source /edx/app/edxapp/edxapp_env && python setup.py install
for LMS and Studio.
Add to one of the requirements files (requirements/private.txt
et. al.), then re-provision with make dev.provision.lms
. This is very heavyweight
as it will go through many extra provisioning steps, but it may be the most reliable way.
Use ODL Devstack Tools. odl_devstack_tools was created to alleviate some of the pain that can be experienced while running devstack with extra dependencies and config changes. If you set a few environment variables and create a docker compose file and config patch file, you can run devstack with your rapid response repo mounted and installed, and the necessary config changes (discussed below) applied.
Clone inside LMS/CMS: Both LMS/CMS containers have a shared directory src
which can be used to clone and install this xBlock locally. You can use this method for local development as well.
pip install -e /edx/src/rapid-response-xblock
As mentioned above, odl_devstack_tools can be used to automatically
apply the necessary config changes when you start the containers. If you're not using that tool, you can manually
add/edit the relevant config files while running bash in the LMS container (make dev.shell.lms
):
If you're using any release from Juniper onward, make sure the following property exists with the given value
in /edx/etc/lms.yml
and /edx/etc/studio.yml
:
- ALLOW_ALL_ADVANCED_COMPONENTS: true
If you're using any release before Juniper, make sure the following properties exist with the given values in
/edx/app/edxapp/lms.env.json
and /edx/app/edxapp/cms.env.json
:
{
"ALLOW_ALL_ADVANCED_COMPONENTS": true,
"ADDL_INSTALLED_APPS": ["rapid_response_xblock"]
}
ADDL_INSTALLED_APPS
may include other items. The list just needs to have rapid_response_xblock
among its values.
There is a feature flag to enable toggling the rapid response functionality for a problem through course outline in CMS. Enable ENABLE_RAPID_RESPONSE_AUTHOR_VIEW
in your CMS config either through /edx/app/edxapp/cms.env.json
or private.py
.
- ENABLE_RAPID_RESPONSE_AUTHOR_VIEW: true or false
NOTE:Once this flag is enabled and you toggle the rapid response from course outline, It will auto publish the problem if it was not in draft.
If one doesn't already exist, create a record for the XBlockAsidesConfig
model
(LMS admin URL: /admin/lms_xblock/xblockasidesconfig/
).
If you have enabled ENABLE_RAPID_RESPONSE_AUTHOR_VIEW
you will also need to create a record in the StudioConfig
model
(CMS admin URL: /admin/xblock_config/studioconfig/
).
Studio Documentation XML Documentation
If your rapid-response-xblock
repo is mounted into the devstack container, you can create migrations for any
model changes as follows:
# From the devstack directory, run bash in a running LMS container...
make dev.shell.lms
# In bash, create the migrations via management command...
python manage.py lms makemigrations rapid_response_xblock --settings=devstack_docker
NOTE (4/2021): Rapid response is only configured to work with multiple choice problems.
Follow these steps to enable an individual problem for rapid response:
When you navigate to that problem in LMS, you should now see an option for opening the problem for rapid response.
To test rapid response functionality:
All the results of the Rapid Response problems are also available in form of CSV reports as a separate plugin ol-openedx-rapid-response-reports. (Installation instructions are on the given link).
How/Where to check reports?
After you've installed ol-openedx-rapid-response-reports, visit Rapid Responses
under the Instructor Dashboard
. If you don't see Rapid Responses
tab, please check that the plugins is installed properly.
NOTE: Rapid Response xBlock works independently and doesn't depend on ol-openedx-rapid-response-reports
, there are no additional steps to be performed inside Rapid Response xBlock if you want to use the reports plugin.