How to create new variable in moodle

Re: How to create new variable in moodle

de către Renaat Debleu-
Număr de răspunsuri: 0
Fotografia lui Core developers Fotografia lui Particularly helpful Moodlers Fotografia lui Plugin developers

Perhaps implementing a settings.php in your theme or block can be an idea:

$chk = new admin_setting_configtext( 'theme_xxx/chk', 'variable', 'help for variable', 'defaultvalue');
$chk->set_updatedcallback('theme_reset_all_caches');
$settings->add($chk);

The value of this setting can be queried everywhere using $setting = get_config('theme_xxx', 'chk')