Moodle

messaging disabled still allows users to send messages

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not a bug
  • Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
  • Fix Version/s: None
  • Component/s: Messages, Usability
  • Labels:
    None
  • Environment:
    ALL
  • Database:
    Any
  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_19_STABLE

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

Activity

Hide
Robert Russo added a comment -

more simply:

if ($CFG->messaging) { $displaylist['messageselect.php'] = get_string('messageselectadd'); }

Show
Robert Russo added a comment - more simply: if ($CFG->messaging) { $displaylist['messageselect.php'] = get_string('messageselectadd'); }
Hide
Robert Russo added a comment -

OR

if (!empty($CFG->messaging)) { $displaylist['messageselect.php'] = get_string('messageselectadd'); }

To ensure that you are able to turn messaging off by unsetting the site policy instead of having to unset the moodle/course:bulkmessaging capability for all (for some schools up to 10 or more) teacher level roles and allows for finer grained control over messaging versus adding notes and extending enrollment which is also controlled by the bulkmessaging capability.

Show
Robert Russo added a comment - OR if (!empty($CFG->messaging)) { $displaylist['messageselect.php'] = get_string('messageselectadd'); } To ensure that you are able to turn messaging off by unsetting the site policy instead of having to unset the moodle/course:bulkmessaging capability for all (for some schools up to 10 or more) teacher level roles and allows for finer grained control over messaging versus adding notes and extending enrollment which is also controlled by the bulkmessaging capability.
Hide
Petr Škoda (skodak) added a comment -

yes, it is intentional, if messaging is disabled emails are sent instead.

Show
Petr Škoda (skodak) added a comment - yes, it is intentional, if messaging is disabled emails are sent instead.
Hide
Robert Russo added a comment -

Unfortunately, if a student is logged in, and messaging is disabled, the email is not sent to them, which is why we got the support request in the first place.

Show
Robert Russo added a comment - Unfortunately, if a student is logged in, and messaging is disabled, the email is not sent to them, which is why we got the support request in the first place.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: