Hi. I am new to tutor and I am trying to set the ENABLE_COURSEWARE_SEARCH flag to false.
Things I have tried so far:
Setting the following value in ~/.local/share/tutor/config.yml:
FEATURES:
ENABLE_COURSEWARE_SEARCH: false
Setting the following value in ~/.local/share/tutor/env/apps/openedx/settings/lms/common.py:
FEATURES["ENABLE_COURSEWARE_SEARCH"] = False
For both, I then run tutor config save.
However, the ~/.local/share/tutor/env/apps/openedx/config/lms.env.json file that is generated, still has the following:
You should remember that there are close to 700 settings in edx-platform alone, and that’s not even counting ecommerce, discovery and the other applications. This is the reason why I did not create a tutor setting for every Open edX setting. The good thing with plugins is that it’s easy to enable and disable them. For instance, some settings require that half a dozen other settings should be defined, too. For those cases, you definitely don’t want to have to have to remember the dependencies. Plugins make it easy to bundle dependent settings together.
(Actually, now that you mention it, I realise that it’s possible to write a tutor plugin that would add custom settings to the LMS or the CMS. But I don’t think that would be a good idea.)
Thanks, @regis And what about setting a value that is nested?
For example, as I understand, I should stop making changes to lms.env.json, because it will be re-generated when I run tutor config save.
But I would like to set the 3rd party OAuth2 providers to my app as stated here
Should I add the following lines to .yml file of my plugin?
SOCIAL_AUTH_OAUTH_SECRETS is a setting that exists only in the LMS in production mode, so you should not add it to the common settings. So you should an extra patch in your plugin:
Thank you again, @regis.
I tried to add it as you said, but I still get the error NameError: name 'SOCIAL_AUTH_OAUTH_SECRETS' is not defined
Is this process referred to in any part of the documentation?
Since I am new to the platform I should probably study the documentation more so that I know which settings I can change by which patch area…
For example, I may need to change email settings, etc.
Please note that I changed the openedx-lms-production-settings to openedx-lms-common-settings, since I want the social sign in to work also in development mode.
Well, not really. There are many patch statement in the tutor templates and it’s difficult to document them one by one: https://docs.tutor.overhang.io/plugins/api.html#patches
Basically, you need to figure out which settings need to be modified (from the Open edX docs) and then find the relevant patch to add to your plugin. I don’t know how to improve this process, but I’m open to suggestions.
I see. Well, let’s say that I would like to set the email configuration for my installation.
I should probably set the values at the .yml file of my plugin. I have tried the following:
But that did not work, either, since after running tutor config save, the values are not reflected in lms.snv.json…
How can I know where I should add these values?
I don’t think this is the real solution since config.yml gets regenerated every time you run “tutor local quickstart” thus destroying the change. You need to set things in a plugin somewhere, so that they get auto-added to the config.yml every time. But I agree the syntax for how exactly to do this is unclear and I’m still fighting with it myself.