How can you add additional feature in Open edX tutor

I would like to add an additional feature to my open edx tutor. But I don’t know where to begin. I lack the knowledge in python django, therefore I’m having difficulties implementing the new feature that I am about to implement.

For example: In the native installation, you could run django-admin startproject mysite and build your feature from there. But does it work the same way in tutor? I was confused when the documentation indicated that in tutor, it is recommended to use plugins. Well the tutor documentation is way to broad for me in order to start my feature. To be exact, I don’t even understand how to create your own plugin as the documentation have stated. Or worse, I don’t even know if I really should use a plugin. Should I? I don’t know where to begin.

A starting point would be helpful including some documentations and links.

I know of two ways features can be developed.

  1. The Tutor v1 plugins

You can think of the Tutor plugins are completely separate apps that will connect to Tutor and Open edX platform via hooks. For example, an app that collects analytics data Figures or an app that is an alternative to LMS Richie.

The official documentation for creating a Tutor plugin is here: Creating a Tutor plugin — Tutor documentation

The official template: GitHub - overhangio/cookiecutter-tutor-plugin: Cookiecutter for tutor plugins

You can take a look at the official plugins for a starting point: Overhang.IO | Tutor Plugins

  1. xBlocks

I am not familiar with xBlock development, but it is easy to add custom xBlocks to Tutor: Open edX development — Tutor documentation

Open Stack tutorial: XBlock Development - OpenCraft Technical Documentation

xBlock template: GitHub - openedx/edx-cookiecutters: Open edx public cookiecutters.

There is also the third way of custom forks, however, it requires more development time. You can check my tutorial on starting with custom forks: FAQ: Running an edx-platform Fork with Tutor

Thank you for this response. At least now, things are clear on my end that I’m on the right track because of your reply. It also convinced me that the plugin method is different from the XBlock approach. I’d rather perform the xBlocks approach since I’m having a hard time understanding the plugins. However, since I already knew these particular methods as it is well indicated in the documentation, is there a way (or a guide, should I say) to specifically begin my features?

As I’ve referred to my post, I lack the knowledge regarding this. So I don’t know how to follow the documentation. It is indicated in the documentation that I should just git clone the files, but which files? I have html files on my repository. is that what it was talking about? If not, then which files? I saw some samples with a repository that has admin.py files, manage.py files, etc… is that it? How can I create those? I think that’s the starting point that I am referring to.

It would be a huge help if there could be provided like that. Please bear with my lack of knowledge. And again, a starting point such would be more than enough.

You may also ask,"What type of feature are you even trying to build?"

I would like to add another webpage for a particular organization into my Open EdX instance. This organization is where learners can apply as scholars. I have a repository of that type of feature that I am indicating and it previously work on a native installed open edX. But here in tutor, I think it is quite different.

I am not sure if it is what you need, but take a look at MFEs if you want a webpage.

You can take a look at the Tutor MFE plugin for a starting point: GitHub - overhangio/tutor-mfe

Hi @Engr_James_Lusuegro,

Depending on your needs, there are different types of customization, such as course features or the user interface.

Customizing the Open edX user interface, such as by adding new static pages, is accomplished using theming. Micro Frontends (MFE) also create custom UIs, but they seem to be a different beast because they are a separate service entirely (they have their own Docker images).

To follow up on @uetuluk, most features added to Open edX are Django apps, with the most common type being XBlocks. However, there are other types if you know how to specify the entry_point in the setup.py file.

  • Django apps, regardless of the type, are installed the same way in Tutor by placing the reference or code in the requirements folder and then rebuilding the Open edX Docker images.

Here are two examples of Django apps and their entry points (I’m not familiar with other types, but you can find them by reading the codebase).

  • XBlocks - Add customizable content types to a course. The course developer can select these from the Advanced Component when editing a unit. For example, adding H5P content: h5pxlbock

      entry_points={
          'xblock.v1': [
              'h5pxblock = h5pxblock:H5PPlayerXBlock',
          ]
    
  • Course Tabs - Adds a new tab to a course. The tab is available when the course is opened, even by an anonymous user. For example, including real-time chat clients: rocketchat-tab

      entry_points={
          "lms.djangoapp": [
              "rocketchat_tab = rocketchat_tab.apps:RocketChatConfig",
          ],
          "openedx.course_tab": [
              "rocketchat_tab = rocketchat_tab.plugins:RocketChatTab",
          ]
      },
    

If the feature you want works in the native Open edX installation, then I would suggest looking at the entry points to see if it installs as a Django app. If so, the installation should be straightforward by placing the code in the requirements folder. If not, perhaps you can convert it to a Django app.

1 Like

Thank you for this! At least now I am sure of how I can continue my work from here. Is there a starting point for me to learn how to create my own django apps?

Glad to help! My starting points are usually existing Open edX projects because someone else has already solved the hardest problem of loading the app in the platform. You can call me a lazy programmer. :slight_smile: Once I understand how the project works and integrates, I can then use that as a base for something new.

Here are two resources I found to help you get started creating a Django app, or at least to understand how they function.

Thank you for this! Will consider this as a starting point. I appreciate your help!

1 Like