Moodle plugins directory: Admin Settings Config: Versions: Version for Moodle 2.7 onwards | Moodle.org
Admin Settings Config
General plugins (Local) ::: local_adminsettingsconfig
Maintained by Mark Sharp
This is local plugin that adds a new JSON setting type for your plugins.
Admin Settings Config Version for Moodle 2.7 onwards
Moodle 3.4
Released: Monday, 19 March 2018, 11:57 PM
moodle-local_adminsettingsconfig
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.
If you're interested in adding some more setting types just do a pull request on the git repo.
This plugin has no UI of its own, it's primarily aimed at developers who will add this plugin as a dependency in their own plugins.
Installing
- Drop code into /local/adminsettingsconfig
- Go to Site administration -> Notifications to install
- Add
$plugin->dependencies = ['local_adminsettingsconfig' => 2018031900]
to your plugin's version.php file.
- Include a setting in your plugin's settings.php file.
$setting = new \local_adminsettingsconfig\admin_setting_configjson($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
- No need to use require_once or include_once.
Version information
- Version build number
- 2018031900
- Version release name
- Version for Moodle 2.7 onwards
- Maturity
- Beta
- MD5 Sum
- 627f03e5e0ebc4bec09ce7a8a53ed000
- Supported software
- Moodle 3.4
- Latest release for Moodle 3.4
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
Default installation instructions for plugins of the type General plugins (Local)
- Make sure you have all the required versions.
- Download and unpack the module.
- Place the folder in the "local" subdirectory.
- Visit http://yoursite.com/admin to finish the installation.