General plugins (Local): Admin Settings Config

local_adminsettingsconfig
Maintained by Picture of Mark Sharp Mark Sharp
This is local plugin that adds a new JSON setting type for your plugins.
9 sites
5 downloads

This is local plugin that adds a new setting type for your plugins. Currently, this plugin just adds a JSON setting type. The plugin ensures that the text inserted into the textarea is valid JSON, and throws an error if it isn't.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

Picture of Mark Sharp
Mark Sharp (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Tue, 20 Mar 2018, 12:00 AM
    Approval issue created: CONTRIB-7224
  • Picture of Andres Ramos
    Fri, 21 Sep 2018, 4:07 AM
    Can you give more documentation about what this plugin does and how it can be used? Perhaps, also adding a few examples of how can you use it and plugins settings get affected.
  • Picture of Mark Sharp
    Fri, 21 Sep 2018, 4:44 PM
    Hi Andres,
    I have a bit of a code snippet on the github page: https://github.com/sharpchi/moodle-adminsettingsconfig

    Basically, when you're creating settings for your plugin, you have various types of settings: text, textarea, select, multiselect, htmleditor, colourpicker etc. The benefits of using some of the more specialised settings type is that they validate the input, so the colourpicker will check that whatever is input is a valid colour code.

    My plugin is really somewhere where we can add settings types that are not in core. At the moment it just has JSON, which extends the textarea, but crucially validates the input as valid JSON format. If others have a setting type they'd like to add to this plugin, I'm happy to receive pull requests.

    The implementation for plugin developers is to make this plugin a dependency for their plugin, then use the config settings that are defined. See the example on github.
    Hope that helps.
Please login to post comments