Disable students sending messages to each other

Disable students sending messages to each other

av solmaz naderi -
Antall svar: 28

Hi 
Would you help me how I can activate the private message only for the student and the teacher.
We want to disable the possibility of students sending messages to each other.
Thanks in advance
Solmaz

Gjennomsnittlig vurdering: -
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Rick Jerz -
Bilde av Particularly helpful Moodlers Bilde av Testers
I have disabled messaging on my Moodle, but I am not sure about all the settings that need to be changed (and it might take me awhile to figure it out, sorry.) Maybe others here on Moodle.org can contribute.

There is one setting to start with: Admin | Advanced Features | messaging system=NO. I am not sure that this is the only needed setting, but it could be a start.
Gjennomsnittlig vurdering:Useful (1)
Som svar til Rick Jerz

Re: Disable students sending messages to each other

av solmaz naderi -
Thanks for your reply dear Mr.Jerz
I hope too others contribute, It's so important for us and I must do this until next week.
I would appreciate any guidance
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Colin Fraser -
Bilde av Documentation writers Bilde av Testers
Hi Solmaz, that is one of the first things I do with a new Moodle, usually switching the messaging system off is sufficient.
Gjennomsnittlig vurdering:Useful (1)
Som svar til Colin Fraser

Re: Disable students sending messages to each other

av solmaz naderi -
Hi Mr. Fraser
You are right, But by this setting messaging system get off for all users. We want to disable messaging just between students. Student be able to send message to  teacher but student not be able to send message to another student. And teacher be able to send message anyone
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Colin Fraser -
Bilde av Documentation writers Bilde av Testers
Ahh that's different, and I am not sure possible in that configuration, well, it never has been. The problem is notifications as well. Sending notifications about uploaded assignments, due assignments, marked assignments and all that is also tricky. You may look at the Messaging Capabilities of Students, see if there is a specific permission for messaging other students, but I don't think there is. Good luck.
Gjennomsnittlig vurdering:Useful (1)
Som svar til Colin Fraser

Re: Disable students sending messages to each other

av solmaz naderi -
No, there is not this setting. But I have started to learning how to create plugin. I want to know, is it possible to add this feature by creating plugin? If I know it will be possible I will do my best and create related plugin.
Any advice would be appreciated
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Colin Fraser -
Bilde av Documentation writers Bilde av Testers
AFAIK, the messenger module itself is a plugin, so you have hit on a possible solution that might be easier than it seems. IANAD, but have some programming experience, so I think I would take the current messenger plugin break it down, and likely add in some code that identifies the recipient of a message. If the sender has a Student Role and the receiver has a Student Role, sending does not occur. You have to be able to work out how to get the Role of both Sender and Receiver, I suspect the Sender will be easy, but the Receiver, that might be tricky. I am not suggesting this is the way to do it, but it is one way. I would likely try it first as this seems, on first look perhaps, to involve the least amount of change to a core plugin. Sorry I can't help, but there are a lot of others here who can.
You might want to start a thread in the Developer's General forum, when you have some idea of the code required to make it all work and need some help. Good luck!

[EDIT] Thinking about it a bit more, you may not have to change the plugin as it is, or much at all. Except for adding in code to find the Roles and to allow or block a message, I don't think much other code will need to change at all. I suggest you keep full documentation of what you do, so when you get it working, you might want to present it for adding to Core so someone else might take it to ensure it continues to work as Moodle upgrades to newer versions. 
Gjennomsnittlig vurdering:Useful (1)
Som svar til Colin Fraser

Re: Disable students sending messages to each other

av solmaz naderi -
How must I thread in the Developer's General forum? I have not done it before.
I totally agree with you about checking role for messaging .
My time is limited, I hope developers help me to do this ahead of time.
Thanks for your prompt response and sorry for my bad english
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Rick Jerz -
Bilde av Particularly helpful Moodlers Bilde av Testers
I am jumping in a little late, but my reaction to some of this is "Why don't you want to allow student to student messaging, yet all other?"

In my Moodle, I disable messaging because I don't want students chit-chatting on my Moodle. As the administrator, I don't want to have access to which student is dating another student, or what they did at the dance on Saturday night. My belief is that students should use their phone's text messaging systems for this kind of chit-chatting. Instructors should use email. Having said this, realize that I run my own small Moodle. And I am not saying that messaging is bad, I just don't use it. It is kind of like what you see here on Moodle.org. Yes, Moodle.org does have messaging, but a lot of us prefer using forum posts, meaning open communication. There is no right or wrong, I am just providing a few more ideas for you.

I do know that this question has been asked before, and it has been pointed out to explore "roles."

Yes, our time (meaning our free advice) is also limited. If you want something fast, as a general comment, you might need to pay a developer. I am just an instructor and not a developer.
Gjennomsnittlig vurdering:Useful (1)
Som svar til Rick Jerz

Re: Disable students sending messages to each other

av solmaz naderi -
I'm like you, I'm surprised by this request! But the school request is for the students and we have to do it without question.
The last part of your sentence is disappointing. Because I am in a country where I can not pay abroad due to some restrictions.
Thanks for your guidance
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Ken Task -
Bilde av Particularly helpful Moodlers
Years ago (version 1.9 if I re-call), I had an school district 'customer' whose admin reported a student was using messages to bully other students. Created a new role (archetype student) called 'bully' and proceeded to remove that roles ability to respond to forums, send messages, etc. They could read things like forums but could not reply nor post to them ... ditto for anything the *ONE* mis-behaving student could do to facilitate bully behavior.

To me, it makes no sense to punish all users for the behavior of just one student.

We (admin and I) decided not to make any big deal about it ... no page for policies with stronger lingo as it already said 'don't' ... etc. ... just change the role of that one student .. reminded teachers to do that in all the 'bully' courses as well.

Reason: student grapevine - word got out in a hurry ... not through moodle but students communicating with fellow students via other apps on their smartphones/social networks.

The only other thing I suggested to admin was finding out what was going on with that students ... enlist counselors/others who could help.

I don't re-call all the changes made to the 'bully role' ... quite a few - appeared to be sufficient enough as we heard nothing more from students.

Anyhoo ... it's worth a shot investigating the creation of another role - archetype of your choosing!

My 2 cents! smiler
'SoS', Ken
Gjennomsnittlig vurdering:Useful (7)
Som svar til Ken Task

Re: Disable students sending messages to each other

av Rick Jerz -
Bilde av Particularly helpful Moodlers Bilde av Testers
Cool solution, Ken.  😎

(I wonder if the "grapevine" communication was via cell phone messaging?)
Gjennomsnittlig vurdering:Useful (1)
Som svar til Ken Task

Re: Disable students sending messages to each other

av Colin Fraser -
Bilde av Documentation writers Bilde av Testers
Excellent approach, Ken, should have thought of it myself at the time. Would save a lot of hassle.
Gjennomsnittlig vurdering:Useful (1)
Som svar til Ken Task

Re: Disable students sending messages to each other

av solmaz naderi -
Dear Mr. Task
Thank you for sharing your experiences with others. I try to use this approach in my work.
Som svar til Ken Task

Re: Disable students sending messages to each other

av Richard van Iwaarden -
Bilde av Particularly helpful Moodlers
Really nice Ken!

We had a lot of debate about this once too. But my point was this: a lot, and I mean a whole lot, is said on the school's playgrounds. Or even outside of it.

The Moodle message system is not anonymous. The Bully is identifiable as Bully. That could be some valuable educational information. What if the Bully is confronted with his bullying behavior. What if you anonimise the information and use it in class as examples of online-bullying.

There were lessons to be learned here.

The same discussions we had when we created mail groups and gave the students the ability to mail to them. We had students age 12-17 that could mail to ANYONE in the organisation. With one Email. That seems the nightmare of every mail server administrator. And a lot of protective teachers as well.

However, in 4 years time, with some exceptions, we had perhaps 10 cases of mail abuse. And we solved these cases by talking to the students that were responsible.

One important lesson seems to be, for both students and teachers, is that if you give trust you will receive trust. And if you are allowed to make mistakes you will learn something.

After all, most of these students will be working at a company within 5 years and no one will tolerate the abuse of mail groups in that organisation. So best to learn that in school.
Som svar til Richard van Iwaarden

Re: Disable students sending messages to each other

av Beatriz Rojo -

Hello Ken, Richard,

I have recently learnt about this font type that eliminates or rewords bullying expressions. Of course, it cannot solve the core problem but I think it's a super innovative and creative way to fight against cyberbullying!

Som svar til Beatriz Rojo

Re: Disable students sending messages to each other

av Richard van Iwaarden -
Bilde av Particularly helpful Moodlers

😀

You won't believe which bad words I could write in Dutch... it only works for English I guess 😁

Som svar til Richard van Iwaarden

Re: Disable students sending messages to each other

av Beatriz Rojo -
Hahaha, the list of possible bad words in Spanish might be quite a bit large as well 😉
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Rick Jerz -
Bilde av Particularly helpful Moodlers Bilde av Testers
No problem, solmaz. It was my way of letting you know that most folks here are volunteering their time, and that we are all busy.  😀  And sometimes questions here on Moodle.org are answered very quickly because folks are from all over the world, in many different timezones.

Also, there might be a developer in your own country. (In no way was I soliciting for business, by the way.)
Gjennomsnittlig vurdering:Useful (1)
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Colin Fraser -
Bilde av Documentation writers Bilde av Testers
We are all learning Solmaz, never apologize for it. You know how to set up a thread in the General Forum, is the same in Developer's Forums. Ask a question there. Make sure though, you have the right question. Find out who is maintainer of the Messaging module, they may help, provide advice and so on but please bear in mind, most of us only volunteer so our time is limited. Between bushfires, work and coronavirus, it's only been the last few weeks where I've been able to spend even a limited time here since the beginning of the year. I'm sure others are in the same position.

@Rick, many students are poorly socialized, unable to distinguish between being clever and being abusive. Every time messaging has been enabled, within hours it is disabled again because someone is using it to harrash, bully or otherwise embarrass someone else. Some students can get quite nasty and for the recipient, there is no blocking such messages in Moodle. And you are right about general socializing too, some of the comments I have seen would really embarrass students if they knew I had seen them, and likely get me labelled as a peeping tom when I just don't want to know. 🙉🙈🙊  😆😆  
Gjennomsnittlig vurdering:Useful (2)
Som svar til Colin Fraser

Re: Disable students sending messages to each other

av solmaz naderi -
I realized where I should register my questions, I will ask them clearly at the first opportunity and I hope they will have time to help me.
Thanks for taking the time for my issue.
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Marcus Green -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers
' We want to disable messaging just between students.'
Having done a little work in this area I suggest that what you want may be described as
"messages cannot be sent to a conversation unless it includes a user with the role teacher on the current course."
This functionality is not currently available in core Moodle or via any plugin.
Gjennomsnittlig vurdering:Useful (1)
Som svar til Marcus Green

Re: Disable students sending messages to each other

av solmaz naderi -
Dear Mr. Green
I've searched already and I know there is no plugin for this request.
I just want to know if this request can be implemented by creating a plugin or not...
If I know the answer is yes, I will try to create this plugin (Of course with the help of others)
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Marcus Green -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers
It is not possible to create a plugin that implements this functionality. I can elaborate on why if you are interested.
Gjennomsnittlig vurdering:Useful (1)
Som svar til solmaz naderi

Re: Disable students sending messages to each other

av Dominique Palumbo -
Bilde av Particularly helpful Moodlers Bilde av Plugin developers
Hi,

If I don't said something stupid a quick and dirty way can be to create a small module to add a capablility like canmessageastudent with a CONTEXT_SYSTEM.
https://docs.moodle.org/dev/NEWMODULE_Adding_capabilities (except if they've a more easy way)

And modify the function
protected static function can_contact_user(int $recipientid, int $senderid) : bool from /message/classes/api.php

By adding something like that at the end of the function

if ($cancontact === true && has_capability('mod/mysmallmodule/canmessageastudent', \context_system::instance(), $senderid)) {
return true;
}

and of course set this capacity to true for teacher and ? and false to student

It'll be far better overwrite/extend the function in the small module but now I've no clear ideas how to do it !

I hope it's help but if it's useless, I hope some Moodle dev will smile at least for my innosense : ) and forgive me for the time spent to read.

Have a good day.

Dominique.
Gjennomsnittlig vurdering:Useful (2)
Som svar til Dominique Palumbo

Re: Disable students sending messages to each other

av Marcus Green -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers
I cannot see any way of doing this without modifying core Moodle which is always a "bad thing" (TM). It would require the messaging subsystem to support plugins/hooks to be able to do it without core mods. Otherwise it would require modifications to /message/classes/api.php
and probably
/message/classes/helper.php
Gjennomsnittlig vurdering:Useful (2)
Som svar til Dominique Palumbo

Re: Disable students sending messages to each other

av solmaz naderi -
Dear Dominique
It is very good that we share our opinions even if it is wrong. This idea seems logical and it will help me in this request or for future requests...
Thank you for the time spent to write..
warm regards