How to use learning MFE on tutor

I see that learning MFE isn’t available by default in the latest release (V 12.0.2). But is there a way to use that MFE? I see that is using it… and maybe there is a way to use that on tutor too?

1 Like

Hi @sumanchapai! You could try to enable the learning MFE by extending the existing MFE plugin, following these instructions: GitHub - overhangio/tutor-mfe

Note that I’ll be working on getting the learning MFE working on the master branches of Open edX in the coming weeks. I’m pretty sure that the learning MFE will not work out of the box in the Lilac release, though…

1 Like

Hello @regis , thank you for your reply.

I am recently looking into adding a learning MFE in the site by just using a yml plugin. But it seems like I would have to set the redirects and set ENABLE_LOGIN_MICROFRONTEND like it’s done in the tutor-mfe for profile mfe

But I see that this is done in hooks, and I am unsure if this can be added in the yml file too. If else would I have to make a plugin using something like the cookiecutter?

I also wanted to ask, and I think it’s a good time and place, where are the git repos stored that we clone when installing mfes or other things? So that when if I write a plugin using cookiecutter, I can delete the previously cloned repo and only use the new copy or reuse this…

Thank you for your response.

This is correct. Hooks require templates, which are not supported by the YAML plugins API, so you will have to create a python plugin using the cookiecutter.

Now that I think of it, it does not make much sense to load hooks from templates. They should be declared as raw strings, pretty much like the patches from a plugin are loaded from disk… I created an issue: Plugin hooks are not supported by the yaml plugin API · Issue #499 · overhangio/tutor · GitHub

The MFEs are cloned in the mfe container, in /openedx/app. But these folders are not accessible at runtime because we use multiple Docker layers in our mfe image: tutor-mfe/Dockerfile at master · overhangio/tutor-mfe · GitHub