2f2137fca4
This includes: * most email settings go from general admin setings to email plugin settings * digestmailtime goes to mod/forum/settings.php * supportname, supportemail and supportpage go to Support contact page * all jabber settings go from general admin setings to jabber plugin settings AMOS BEGIN MOV [jabberhost,admin],[jabberhost,message_jabber] MOV [configjabberhost,admin],[configjabberhost,message_jabber] MOV [jabberserver,admin],[jabberserver,message_jabber] MOV [configjabberserver,admin],[configjabberserver,message_jabber] MOV [jabberusername,admin],[jabberusername,message_jabber] MOV [configjabberusername,admin],[configjabberusername,message_jabber] MOV [jabberpassword,admin],[jabberpassword,message_jabber] MOV [configjabberpassword,admin],[configjabberpassword,message_jabber] MOV [jabberport,admin],[jabberport,message_jabber] MOV [configjabberport,admin],[configjabberport,message_jabber] MOV [digestmailtime,admin],[digestmailtime,forum] MOV [configdigestmailtime,admin],[configdigestmailtime,forum] MOV [allowusermailcharset,admin],[allowusermailcharset,message_email] MOV [configallowusermailcharset,admin],[configallowusermailcharset,message_email] MOV [mailnewline,admin],[mailnewline,message_email] MOV [configmailnewline,admin],[configmailnewline,message_email] MOV [noreplyaddress,admin],[noreplyaddress,message_email] MOV [confignoreplyaddress,admin],[confignoreplyaddress,message_email] MOV [sitemailcharset,admin],[sitemailcharset,message_email] MOV [configsitemailcharset,admin],[configsitemailcharset,message_email] MOV [smtphosts,admin],[smtphosts,message_email] MOV [configsmtphosts,admin],[configsmtphosts,message_email] MOV [smtpmaxbulk,admin],[smtpmaxbulk,message_email] MOV [configsmtpmaxbulk,admin],[configsmtpmaxbulk,message_email] MOV [smtpuser,admin],[smtpuser,message_email] MOV [configsmtpuser,admin],[configsmtpuser,message_email] MOV [smtppass,admin],[smtppass,message_email] AMOS END Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
70 lines
2.5 KiB
PHP
70 lines
2.5 KiB
PHP
<?php
|
|
// This file is part of Moodle - http://moodle.org/
|
|
//
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
/**
|
|
* Message outputs configuration page
|
|
*
|
|
* @package message
|
|
* @copyright 2011 Lancaster University Network Services Limited
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
*/
|
|
require_once(dirname(dirname(__FILE__)) . '/config.php');
|
|
require_once(dirname(dirname(__FILE__)) . '/message/lib.php');
|
|
require_once($CFG->libdir.'/adminlib.php');
|
|
|
|
// This is an admin page
|
|
admin_externalpage_setup('managemessageoutputs');
|
|
|
|
// Require site configuration capability
|
|
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
|
|
|
|
// Get the submitted params
|
|
$disable = optional_param('disable', 0, PARAM_INT);
|
|
$enable = optional_param('enable', 0, PARAM_INT);
|
|
|
|
if (!empty($disable) && confirm_sesskey()) {
|
|
if (!$processor = $DB->get_record('message_processors', array('id'=>$disable))) {
|
|
print_error('outputdoesnotexist', 'message');
|
|
}
|
|
$DB->set_field('message_processors', 'enabled', '0', array('id'=>$processor->id)); // Disable output
|
|
}
|
|
|
|
if (!empty($enable) && confirm_sesskey() ) {
|
|
if (!$processor = $DB->get_record('message_processors', array('id'=>$enable))) {
|
|
print_error('outputdoesnotexist', 'message');
|
|
}
|
|
$DB->set_field('message_processors', 'enabled', '1', array('id'=>$processor->id)); // Enable output
|
|
}
|
|
|
|
if ($disable || $enable) {
|
|
$url = new moodle_url('message.php');
|
|
redirect($url);
|
|
}
|
|
// Page settings
|
|
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
|
|
|
|
// Grab the renderer
|
|
$renderer = $PAGE->get_renderer('core', 'message');
|
|
|
|
// Display the manage message outputs interface
|
|
$processors = get_message_processors();
|
|
$messageoutputs = $renderer->manage_messageoutputs($processors);
|
|
|
|
// Display the page
|
|
echo $OUTPUT->header();
|
|
echo $OUTPUT->heading(get_string('managemessageoutputs', 'message'));
|
|
echo $messageoutputs;
|
|
echo $OUTPUT->footer(); |