Details
Description
Even though messaging is disabled, teachers can still send a message to their selected users in the participants block.
Change this:
$displaylist['messageselect.php'] = get_string('messageselectadd');
To this:
if ((has_capability('moodle/course:bulkmessaging', $context) && $context->id != $frontpagectx->id) and $CFG->messaging) {
$displaylist['messageselect.php'] = get_string('messageselectadd');
}
To require that they have the capability AND messaging is enabled sitewide.
Issue Links
| This issue has a non-specific relationship to: | ||||
| MDL-16824 | Message: Orphaned unread messages when user deleted |
|
|
|
more simply:
if ($CFG->messaging) { $displaylist['messageselect.php'] = get_string('messageselectadd'); }