02-14-2018, 06:07 PM
Hi!
I wonder if it is possible to tweak the message system for group threads/messages.
I already modified the messages.php and wrote a function which allows me to send messages to user groups. That wasn't too difficult. But the downside is (btw the same as if the admin sends a mass message), that the same message to every group member appears in my message-box. If someone replys he just replys to the one who wrote the message.
My purpose: Teachers should be able to send messages to classes. Therefore I've got a database named "klassen" (classes) which contains every class. The user administration (a separate permission level) manually creates the students accounts which are not only inserted in the "users" table but also in a table called "u_schueler" (u_students). This table contains the user_id (id from the users table), username, the fname/lname and the class the student visits.
At the moment it is enough for teachers to send messages to classes (I don't need messages between teachers or students). So I disabled the reply function for the students (with the super useful hasPerm function). But with 30 students per classes the message box for teachers gets rapidly unorganized.
Here is the code which works for me: https://hastebin.com/ocotesiyeq.bash
I know that it's not the best programming style but I started coding in the last two weeks. Some days ago I didn't even knew what MYSQL is. My main goal is that it works - the beauty comes with the experience
So all in all my main goal is achieved: Teachers can send group messages to a classes. My next goal is to reduce the ~30 messages in his message box, every time he does that. Does somebody have any idea which steps are needed? I'm not asking for a complete guide or code - all I need is some input/ideas where to start or which structure needs to be modified.
Have a nice day
I wonder if it is possible to tweak the message system for group threads/messages.
I already modified the messages.php and wrote a function which allows me to send messages to user groups. That wasn't too difficult. But the downside is (btw the same as if the admin sends a mass message), that the same message to every group member appears in my message-box. If someone replys he just replys to the one who wrote the message.
My purpose: Teachers should be able to send messages to classes. Therefore I've got a database named "klassen" (classes) which contains every class. The user administration (a separate permission level) manually creates the students accounts which are not only inserted in the "users" table but also in a table called "u_schueler" (u_students). This table contains the user_id (id from the users table), username, the fname/lname and the class the student visits.
At the moment it is enough for teachers to send messages to classes (I don't need messages between teachers or students). So I disabled the reply function for the students (with the super useful hasPerm function). But with 30 students per classes the message box for teachers gets rapidly unorganized.
Here is the code which works for me: https://hastebin.com/ocotesiyeq.bash
I know that it's not the best programming style but I started coding in the last two weeks. Some days ago I didn't even knew what MYSQL is. My main goal is that it works - the beauty comes with the experience
So all in all my main goal is achieved: Teachers can send group messages to a classes. My next goal is to reduce the ~30 messages in his message box, every time he does that. Does somebody have any idea which steps are needed? I'm not asking for a complete guide or code - all I need is some input/ideas where to start or which structure needs to be modified.
Have a nice day