6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2025-01-11 17:38:46 +00:00

resolve confusion in docs/comments

This commit is contained in:
Crist Ye 2021-09-30 10:27:40 +08:00 committed by Régis Behmo
parent 791c0161df
commit c670059523
2 changed files with 4 additions and 4 deletions

View File

@ -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::

View File

@ -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 '{{