Enable XBlocks for a course

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

To install a new XBlock, follow the steps below:

  • Log in to your server console.

  • Download the module.

  • Load the Open edX virtual environment. Depending on your installation type, execute the following commands:

    • Approach A (Bitnami installations using system packages):

        $ source /opt/bitnami/edx/app/edxapp/venvs/edxapp/bin/activate
    • Approach B (Self-contained Bitnami installations):

        $ source /opt/bitnami/apps/edx/venvs/edxapp/bin/activate
  • Install the XBlock using pip:

      $ pip install /path/to/downloaded/xblock/

    NOTE: The installation steps could differ depending on the XBlock. Check the provider documentation to get more information.

  • Restart the Apache server to load the changes.

Next, enable the XBlock for the course, as follows:

  • Navigate to the course in Studio.

  • Click the “Settings -> Advanced settings” menu.

  • Specify the XBlock to use in the “Advanced Module List” area using a comma-separated list. Note that you can find the name of the module in the provider documentation.

    XBlock configuration

You should now be able to use the extension. To check this, create a new unit and select the “Advanced” button:

XBlock usage

You should see the modules previously specified:

XBlock usage

Last modification November 10, 2021