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, March 19, 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

  1. Drop code into /local/adminsettingsconfig
  2. Go to Site administration -> Notifications to install
  3. Add
$plugin->dependencies = ['local_adminsettingsconfig' => 2018031900]

to your plugin's version.php file.

  1. 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);
  1. 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)

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder in the "local" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation.