"Editingteacher" can not delete message

"Editingteacher" can not delete message

by Ricardo Caiado -
Number of replies: 2
Picture of Particularly helpful Moodlers
Hi,

This is my situation:

Moodle 3.8.3+

(1) Accessing as "Teacher" (role).
(2) Sent a message to one of the Participants (student role)
(3) Try to delete that message
(4) Message can not be deleted (permission denied)

Any ideas?

Ricardo

Attachment Permission_denied.png
Attachment Permission_set.png
Average of ratings: -
In reply to Ricardo Caiado

Re: "Editingteacher" can not delete message

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Ricardo,

The reason why the teacher can't delete the message is because the user has the role of teacher in the course context, whereas the capability to delete any messages on the site needs to allowed for a role assigned in the system context.

Thus, to enable a teacher to delete messages you need to:

  1. Create a custom role with the capability moodle/site:deleteanymessage allowed
  2. Assign the user this role as a system role (via Site admin / Users / Permissions / Assign system roles).

Note that it is fine for a user to have the role of teacher in a course and also a system role.

Average of ratings: Useful (3)