mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-27171 messages: add default message outputs management interface
This introduces the new page where admin may change the permissions and defaults for particular combination of message processors and providers. Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
This commit is contained in:
parent
e710658d89
commit
1d72e9d441
8 changed files with 326 additions and 23 deletions
|
@ -49,6 +49,7 @@ if ($hassiteconfig) {
|
|||
// message outputs
|
||||
$ADMIN->add('modules', new admin_category('messageoutputs', get_string('messageoutputs', 'message')));
|
||||
$ADMIN->add('messageoutputs', new admin_page_managemessageoutputs());
|
||||
$ADMIN->add('messageoutputs', new admin_page_defaultmessageoutputs());
|
||||
require_once($CFG->dirroot.'/message/lib.php');
|
||||
$processors = get_message_processors();
|
||||
foreach ($processors as $processor) {
|
||||
|
@ -56,8 +57,8 @@ if ($hassiteconfig) {
|
|||
if (!$processor->available) {
|
||||
continue;
|
||||
}
|
||||
$strprocessorname = get_string('pluginname', 'message_'.$processorname);
|
||||
if (file_exists($CFG->dirroot.'/message/output/'.$processor->name.'/settings.php')) {
|
||||
if ($processor->hassettings) {
|
||||
$strprocessorname = get_string('pluginname', 'message_'.$processorname);
|
||||
$settings = new admin_settingpage('messagesetting'.$processorname, $strprocessorname, 'moodle/site:config', !$processor->enabled);
|
||||
include($CFG->dirroot.'/message/output/'.$processor->name.'/settings.php');
|
||||
if ($settings) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue