XBlock doesn't appear in advanced section in Open edX platform

Hi everybody,

I have a problem with deploying xblock in open edX platform. I followed instructions in this guide XBlocks and the edX Platform but the xblock doesn’t appear in Add New Component -> Advanced section.

Can anybody help?
Thanks.

Can you link us to your XBlock code? What version of Open edX are you using?

I used “thumbs” codes from xblock-sdk/sample_xblocks folder. I am using last edX version master branch.

Before being accessible, some XBlocks require that you restart the lms and cms services. Have you tried that?

Yes I restarted both services. I even manually updated assets by running:
$ paver update_assets cms && paver update_assets lms
but there is nothing to add to my course!?

Did you add the XBlock name to your course under “Advanced Settings” —> “Advanced Module List” ? It will not show up if you do not add it.

Yes, I did. I added the name mentioned in the setup.py file.

I haven’t played with the XBlock SDK myself. But from what I can read, I am not sure it can run directly in Open edX. It seems more like a tool you can try outside of Open edX to create new XBlock.

See https://edx.readthedocs.io/projects/xblock-tutorial/en/latest/sdk/get_started_sdk.html#clone-the-xblock-software-development-kit

I could be wrong though…

Have you tried installing more simple XBlocks before?

Hi, I still have the mentioned problem and can’t use any external xblock in my edX. I tested some other xblocks from internet. None of them works for me. The xblocks that are accessible in Advanced sections are two default ones: “Annotation” and “Video”. Do you have any idea or a tested and working xblock that I can test in my environment?

I am out of ideas.

Are there any error messages when you install the XBlocks?
Remember that you need to be in the edxapp user virtualenv to install the XBlocks.

Did you restart the LMS and the CMS with the following commands:
sudo /edx/bin/supervisorctl restart cms:
sudo /edx/bin/supervisorctl restart lms:
sudo /edx/bin/supervisorctl restart edxapp_worker:

Sometimes the XBlocks are not fully installed or available if you did not restart the services.

Also, try following the instructions in ths simple XBlock:

Please take note that normally the advances XBlocks that you install will appear in the Advanced section at the bottom of a unit if you add them in the “Advanced Module List”.

Try some of the Advanced XBlocks that are available on the system and see if you can use them on your system:

Thanks for your reply.
I am using docker-compose installation of devstack. I use instructions here: https://edx.readthedocs.io/projects/xblock-tutorial/en/latest/edx_platform/devstack.html

make lms-shell
pip install path/to/xblock
make studio-shell
pip install path/to/xblock
make lms-restart && make studio-restart

I don’t believe you said you were using devstack before. But I could be wrong.

I do not use devstack so I cannot help you. Sorry,

Thanks a lot for your help. I successfully installed ’ Jupyter Google Colab XBlock’ following this instructions: https://github.com/ibleducation/jupyter-edx-colab-cloud-xblock
Surprisingly it says add xblock name in INSTALLED_APPS section of /edx/app/edxapp/edx-platform/lms/envs/common.py file. I hope I can install my xblock as well.

It seems that there was some problems with code of MyXblock. There is no need to add xblock name to /edx/app/edxapp/edx-platform/lms/envs/common.py file. just:

make studio-shell
cd /edx/app/edxapp
source venvs/edxapp/bin/activate
sudo -u edxapp /edx/bin/pip.edxapp install /path/to/xblock
make studio-restart

1 Like