diff --git a/docs/plugins/api.rst b/docs/plugins/api.rst index 5714adf..f6fc1e9 100644 --- a/docs/plugins/api.rst +++ b/docs/plugins/api.rst @@ -12,9 +12,9 @@ The ``config`` attribute is used to modify existing and add new configuration pa * ``config["add"]`` are key/values that should be added to the user-specific ``config.yml`` configuration. Add there passwords, secret keys and other values that do not have a default value. * ``config["defaults"]`` are default key/values for this plugin. These values will not be added to the ``config.yml`` user file unless users override them manually with ``tutor config save --set ...``. -* ``config["set"]`` are existing key/values that should be modified. Be very careful what you add there! Plugins may define conflicting values for some parameters. +* ``config["set"]`` are existing key/values that should be modified. Be very careful what you add there! Different plugins may define conflicting values for some parameters. - "set" and "default" key names will be automatically prefixed with the plugin name, in upper case. + "add" and "defaults" key names will be automatically prefixed with the plugin name, in upper case. Example:: diff --git a/tutor/plugins.py b/tutor/plugins.py index b97733d..0be884a 100644 --- a/tutor/plugins.py +++ b/tutor/plugins.py @@ -19,9 +19,9 @@ class BasePlugin: Tutor plugins are defined by a name and an object that implements one or more of the following properties: - `config` (dict str->dict(str->str)): contains "add", "set", "default" keys. Entries + `config` (dict str->dict(str->str)): contains "add", "defaults", "set" keys. Entries in these dicts will be added or override the global configuration. Keys in "add" and - "set" will be prefixed by the plugin name in uppercase. + "defaults" will be prefixed by the plugin name in uppercase. `patches` (dict str->str): entries in this dict will be used to patch the rendered Tutor templates. For instance, to add "somecontent" to a template that includes '{{