mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
merged fix for MDL-10112 bulk messaging fails silently when messaging not enabled
This commit is contained in:
parent
783fbd2234
commit
8205423030
@ -594,7 +594,7 @@
|
||||
echo '<input type="button" onclick="checknone()" value="'.get_string('deselectall').'" /> ';
|
||||
$displaylist = array();
|
||||
// fix for MDL-8885, only show this if user has capability
|
||||
if (has_capability('moodle/site:readallmessages', $context)) {
|
||||
if (has_capability('moodle/site:readallmessages', $context) && !empty($CFG->messaging)) {
|
||||
$displaylist['messageselect.php'] = get_string('messageselectadd');
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,11 @@
|
||||
|
||||
require_login();
|
||||
require_capability('moodle/site:readallmessages', get_context_instance(CONTEXT_COURSE, $id));
|
||||
|
||||
// fix for MDL-10112
|
||||
if (empty($CFG->messaging)) {
|
||||
error("Messaging is disabled on this site");
|
||||
}
|
||||
|
||||
if (empty($SESSION->emailto)) {
|
||||
$SESSION->emailto = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user