. /** * Plugin settings for the local_adonis plugin. * * @package local_adonis * @copyright 2022, Kumi Systems e.U. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ // Ensure the configurations for this site are set if ($hassiteconfig) { // Create the new settings page // - in a local plugin this is not defined as standard, so normal $settings->methods will throw an error as // $settings will be null $settings = new admin_settingpage('local_adonis', 'Adonis Connection'); // Create $ADMIN->add('localplugins', $settings); // Add a setting field to the settings for this page $settings->add(new admin_setting_configtext( // This is the reference you will use to your configuration 'local_adonis/api_url', // This is the friendly title for the config, which will be displayed 'Adonis Base URL', // This is helper text for this config field 'Base URL (scheme://IP_or_domain) of Adonis', // This is the default value 'https://adonis', // This is the type of Parameter this config is PARAM_TEXT )); $settings->add(new admin_setting_configtext( // This is the reference you will use to your configuration 'local_adonis/username', // This is the friendly title for the config, which will be displayed 'Adonis Username', // This is helper text for this config field 'Username to use for Adonis authentication', // This is the default value 'adonis', // This is the type of Parameter this config is PARAM_TEXT )); $settings->add(new admin_setting_configpasswordunmask( // This is the reference you will use to your configuration 'local_adonis/password', // This is the friendly title for the config, which will be displayed 'Adonis Password', // This is helper text for this config field 'Password to use for Adonis authentication', // This is the default value 'secret', // This is the type of Parameter this config is PARAM_TEXT )); $settings->add(new admin_setting_configtext( // This is the reference you will use to your configuration 'local_adonis/requirements_view', // This is the friendly title for the config, which will be displayed 'Requirements Vide', // This is helper text for this config field 'ID of the view containing crew requirements', // This is the default value 'ABC123', // This is the type of Parameter this config is PARAM_TEXT )); }