forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Installing a new XBlock
Ned Batchelder edited this page Oct 26, 2015
·
2 revisions
Custom XBlocks are not allowed by default, you need to update settings.
Like all platform settings, you can either write inside /edx/app/edx_ansible/server-vars.yml
and update the platform to generate the custom settings files.
EDXAPP_FEATURES:
ALLOW_ALL_ADVANCED_COMPONENTS: true
Or you can manually edit the custom settings, in /edx/app/edxapp/cms.env.json
.
This will override the default value hardcoded in /edx/app/edxapp/edx-platform/cms/envs/common.py
.
Once the file is updated, you need to reboot to reload the settings.
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
To install a XBlock, you must download it, and then run the install script.
# Move to the folder where you want to download the XBlock
cd /edx/app/edxapp
# Download the XBlock
sudo -u edxapp git clone https://github.com/xxx/yourXBlock.git
# If not installed: Install the XBlock
sudo -u edxapp /edx/bin/pip.edxapp install yourXBlock/
# Remove the installation files
sudo rm -r yourXBlock
In some cases, rebooting is necessary to use the XBlock.
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
Go to Settings -> Advanced Settings
and set advanced_modules
to ["xblockname"]
.
Select Advanced -> XBlock Name
in your unit.