Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65132

Messaging: Allow teachers to delete messages for all users within their conversations

XMLWordPrintable

    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • MDL-65132-master
    • Hide

      Setup

      1. Log in as an admin
      2. Set the setting 'messagingallusers' to 'Yes'.
      3. Create three new users: t1, s2 and s3.
      4. Create a new course and enrol the new users:
        1. t1 as a teacher
        2. s2 and s3 as student
      5. Create a group with these three users and turn on the setting 'Group messaging' and named GroupTest.
      6. Create some messages:
        1. Log in as "t1" and send a message to GroupTest with this content: "Text group 1".
        2. Log in as "s2" and send a message to GroupTest with this content: "Text group 2".
        3. Log in as "s3" and send a message to GroupTest with this content: "Text group 3".
        4. Log in as "t1" and send a message to "s2" with this content: "Text private t1 to s2".
        5. Log in as "s2" and send a message to "t1" with this content: "Text private s2 to t1"
        6. Log in as "admin" and send a message to "s2" with this content: "Text private Admin to s2".
        7. Log in as "s2" and send a message to "Admin" with this content: "Text private s2 to Admin".

      Tests

      Tests Delete message for all in Group Conversation

      1. Log in as "t1".
      2. Open the messaging drawer.
      3. View the GroupTest conversation.
      4. Check you can see three messages. ["Text group 1", "Text group 2", "Text group 3"].
      5. Select the message "Text group 1" to delete.
      6. Click on delete icon.
      7. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages? This will not delete them for other conversation participants." but you can not see a checkbox with the text "Delete for me and everyone".
      8. Press the cancel button.
      9. Log in as "admin".
      10. Go to Site administration > Users > Permissions > Define roles 
      11. Edit the role "Teacher".
      12. Search the capability "moodle/site:deleteanymessage" and check to Allow and Save changes.
      13. Log in as "t1".
      14. Go to messaging to GroupTest conversation.
      15. Select the message "Text group 1" to delete.
      16. Click on delete icon.
      17. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages?" and can see a checkbox with the text "Delete for me and everyone".
      18. Select the checkbox and press the delete button.
      19. EXPECTED RESULT: Check you can not see the "Text group 1" in GroupTest conversation.
      20. Log in as "s2".
      21. Open the messaging drawer.
      22. View the GroupTest conversation.
      23. EXPECTED RESULT: Check you can not see the "Text group 1" in GroupTest conversation.
      24. Log in as "s3".
      25. Opening the messaging drawer.
      26. View the GroupTest conversation.
      27. EXPECTED RESULT: Check you can not see the "Text group 1" in GroupTest conversation.
      28. Select the message "Text group 2" to delete.
      29. Click on delete icon.
      30. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages? This will not delete them for other conversation participants." but you can not see a checkbox with the text "Delete for me and everyone".
      31. Press the delete button.
      32. EXPECTED RESULT: Check you can not see the "Text group 2" in GroupTest conversation.
      33. Log in as "s2".
      34. Go to messaging to GroupTest conversation.
      35. EXPECTED RESULT: Check you can see the "Text group 2" in GroupTest conversation.
      36. Log in as "t1".
      37. Go to messaging to GroupTest conversation.
      38. EXPECTED RESULT: Check you can see the "Text group 2" in GroupTest conversation.

      Tests Delete message for all in existing Private Conversation

      1. Log in as "t1".
      2. Go to messaging to Private conversation with "s2".
      3. EXPECTED RESULT: Check you can see the "Text private t1 to s2" in the conversation.
      4. Select the message "Text private t1 to s2" to delete.
      5. Click on delete icon.
      6. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages? This will not delete them for other conversation participants." but you can not see a checkbox with the text "Delete for everyone".
      7. Press the delete button.
      8. EXPECTED RESULT: Check you can not see the "Text private t1 to s2" in the conversation.
      9. Log in as "admin".
      10. Go to messaging to Private conversation with "s2".
      11. EXPECTED RESULT: Check you can see the "Text private Admin to s2" in the conversation.
      12. Select the message "Text private Admin to s2" to delete.
      13. Click on delete icon.
      14. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages?" and can see a checkbox with the text "Delete for me and everyone".
      15. Select the checkbox and press the delete button.
      16. EXPECTED RESULT: Check you can not see the "Text private Admin to s2" in the conversation.
      17. Log in as "s2".
      18. Go to messaging to Private conversation with "Admin".
      19. EXPECTED RESULT: Check you can not see the "Text private Admin to s2" in the conversation.
      20. EXPECTED RESULT: Check you see "Text private s2 to Admin" in the conversation.

      Tests Delete message for all in a new Private Conversation

      1. Log in as "Admin".
      2. Go to messaging.
      3. Search user "s3".
      4. Select user "s3" on the "Non-contacts" results.
      5. Send a message to user "s3" with this text: "Text private Admin to s3".
      6. Select the message.
      7. Click on delete icon.
      8. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages?" and can see a checkbox with the text "Delete for me and everyone".
      9. Select the checkbox and press the delete button.
      10. EXPECTED RESULT: Check you can not see the "Text private Admin to s3" in the conversation.
      11. Log in as "s3"
      12. Go to messaging to Private conversation with "Admin".
      13. EXPECTED RESULT: Check you see an empty conversation.

      Tests Not delete message for all in Group Conversation when you can do it

      1. Log in as "admin".
      2. Go to Site administration > Users > Permissions > Define roles 
      3. Edit the role "Teacher".
      4. Search the capability "moodle/site:deleteanymessage" and check to Allow if it isn't and Save changes.
      5. Log out and log in as "t1"
      6. Open the messaging drawer.
      7. View the GroupTest conversation.
      8. Send a message to GroupTest with this content: "New test to delete for all users or not".
      9. Select the message "New test to delete for all users or not" to delete.
      10. Click on delete icon.
      11. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages?" and can see a checkbox with the text "Delete for me and everyone".
      12. No select the checkbox and press the delete button.
      13. EXPECTED RESULT: Check you can not see the "New test to delete for all users or not" in GroupTest conversation.
      14. Log in as "s2".
      15. Open the messaging drawer.
      16. View the GroupTest conversation.
      17. EXPECTED RESULT: Check you can see the "New test to delete for all users or not" in GroupTest conversation.
      18. Log in as "s3".
      19. Open the messaging drawer.
      20. View the GroupTest conversation.
      21. EXPECTED RESULT: Check you can see the "New test to delete for all users or not" in GroupTest conversation.

      Tests delete message in Self-Conversation

      1. Log in as "admin".
      2. Open the messaging drawer.
      3. Send a message to self-conversation (usually self-conversation is displayed in the Starred section) with this content: "Text self 1"
      4. Send a second message to self-conversation with this content: "Text self 2"
      5. Select the message Text self 1" to delete.
      6. Click on delete icon.
      7. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected personal messages?" and can not see a checkbox with the text "Delete for me and everyone".
      8. Press the delete button.
      9. EXPECTED RESULT: Check you can not see the "Text self 1" in self-conversation.
      Show
      Setup Log in as an admin Set the setting 'messagingallusers' to 'Yes'. Create three new users: t1, s2 and s3. Create a new course and enrol the new users: t1 as a teacher s2 and s3 as student Create a group with these three users and turn on the setting 'Group messaging' and named GroupTest. Create some messages: Log in as "t1" and send a message to GroupTest with this content: "Text group 1". Log in as "s2" and send a message to GroupTest with this content: "Text group 2". Log in as "s3" and send a message to GroupTest with this content: "Text group 3". Log in as "t1" and send a message to "s2" with this content: "Text private t1 to s2". Log in as "s2" and send a message to "t1" with this content: "Text private s2 to t1" Log in as "admin" and send a message to "s2" with this content: "Text private Admin to s2". Log in as "s2" and send a message to "Admin" with this content: "Text private s2 to Admin". Tests Tests Delete message for all in Group Conversation Log in as "t1". Open the messaging drawer. View the GroupTest conversation. Check you can see three messages. ["Text group 1", "Text group 2", "Text group 3"] . Select the message "Text group 1" to delete. Click on delete icon. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages? This will not delete them for other conversation participants." but you can not see a checkbox with the text "Delete for me and everyone". Press the cancel button. Log in as "admin". Go to  Site administration > Users > Permissions > Define roles   Edit the role "Teacher". Search the capability "moodle/site:deleteanymessage" and check to Allow and Save changes. Log in as "t1". Go to messaging to GroupTest conversation. Select the message "Text group 1" to delete. Click on delete icon. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages?" and  can see a checkbox with the text "Delete for me and everyone". Select the checkbox and press the delete button. EXPECTED RESULT:  Check you can  not see the "Text group 1" in GroupTest conversation. Log in as "s2". Open the messaging drawer. View the GroupTest conversation. EXPECTED RESULT:  Check you can  not see the "Text group 1" in GroupTest conversation. Log in as "s3". Opening the messaging drawer. View the GroupTest conversation. EXPECTED RESULT:  Check you can  not see the "Text group 1" in GroupTest conversation. Select the message "Text group 2" to delete. Click on delete icon. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages? This will not delete them for other conversation participants." but you can not see a checkbox with the text "Delete for me and everyone". Press the delete button. EXPECTED RESULT:  Check you can not see the "Text group 2" in GroupTest conversation. Log in as "s2". Go to messaging to GroupTest conversation. EXPECTED RESULT:  Check you can see the "Text group 2" in GroupTest conversation. Log in as "t1". Go to messaging to GroupTest conversation. EXPECTED RESULT:  Check you can see the "Text group 2" in GroupTest conversation. Tests Delete message for all in existing Private Conversation Log in as "t1". Go to messaging to Private conversation with "s2". EXPECTED RESULT:  Check you can see the "Text private t1 to s2" in the conversation. Select the message "Text private t1 to s2" to delete. Click on delete icon. EXPECTED RESULT:  You can see the warning "Are you sure you would like to delete the selected messages? This will not delete them for other conversation participants." but you can not see a checkbox with the text "Delete for everyone". Press the delete button. EXPECTED RESULT:  Check you can  not see the "Text private t1 to s2" in the conversation. Log in as "admin". Go to messaging to Private conversation with "s2". EXPECTED RESULT:  Check you can see the "Text private Admin to s2" in the conversation. Select the message "Text private Admin to s2" to delete. Click on delete icon. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages?" and  can see a checkbox with the text "Delete for me and everyone". Select the checkbox and press the delete button. EXPECTED RESULT:  Check you can not see the "Text private Admin to s2" in the conversation. Log in as "s2". Go to messaging to Private conversation with "Admin". EXPECTED RESULT:  Check you can not see the "Text private Admin to s2" in the conversation. EXPECTED RESULT:  Check you see "Text private s2 to Admin" in the conversation. Tests Delete message for all in a new Private Conversation Log in as "Admin". Go to messaging. Search user "s3". Select user "s3" on the "Non-contacts" results. Send a message to user "s3" with this text: "Text private Admin to s3". Select the message. Click on delete icon. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages?" and  can see a checkbox with the text "Delete for me and everyone". Select the checkbox and press the delete button. EXPECTED RESULT:  Check you can not see the "Text private Admin to s3" in the conversation. Log in as "s3" Go to messaging to Private conversation with "Admin". EXPECTED RESULT:  Check you see an empty conversation. Tests Not delete message for all in Group Conversation when you can do it Log in as "admin". Go to  Site administration > Users > Permissions > Define roles   Edit the role "Teacher". Search the capability "moodle/site:deleteanymessage" and check to Allow if it isn't and Save changes. Log out and log in as "t1" Open the messaging drawer. View the GroupTest conversation. Send a message to GroupTest with this content: "New test to delete for all users or not". Select the message "New test to delete for all users or not" to delete. Click on delete icon. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected messages?" and  can see a checkbox with the text "Delete for me and everyone". No select the checkbox and press the delete button. EXPECTED RESULT:  Check you can  not see the "New test to delete for all users or not" in GroupTest conversation. Log in as "s2". Open the messaging drawer. View the GroupTest conversation. EXPECTED RESULT:  Check you can see the "New test to delete for all users or not" in GroupTest conversation. Log in as "s3". Open the messaging drawer. View the GroupTest conversation. EXPECTED RESULT:  Check you can see the "New test to delete for all users or not" in GroupTest conversation. Tests delete message in Self-Conversation Log in as "admin". Open the messaging drawer. Send a message to self-conversation (usually self-conversation is displayed in the Starred section) with this content: "Text self 1" Send a second message to self-conversation with this content: "Text self 2" Select the message Text self 1" to delete. Click on delete icon. EXPECTED RESULT: You can see the warning "Are you sure you would like to delete the selected personal messages?" and  can not see a checkbox with the text "Delete for me and everyone". Press the delete button. EXPECTED RESULT:  Check you can  not see the "Text self 1" in self-conversation.

      Teachers should be given a capability which allows them to delete a message for all users, regardless of who posted the message. This might be used to remove inappropriate content from group chats, for example. This should not give teachers the right to view conversations/messages which they are not a part of.

      Some notes around a possible solution:

      • Deletion controls might be a third option (alongside "Delete" and "Cancel") in the confirmation box presented to a teacher when deleting a message.
      • Web services need expansion to support 'delete for all' notion.
      • Currently, we don't have a means to rescind a message already fetched and loaded into the UI. We need to consider how this might be achieved, however, that should be a separate issue, as it will likely be more involved than simply getting the message deletion working.

        1. C Group Message Delete option for teachers 1.png
          C Group Message Delete option for teachers 1.png
          196 kB
        2. C Group Message Delete option for teachers 2.png
          C Group Message Delete option for teachers 2.png
          196 kB
        3. C Group Message Delete option for teachers 3.png
          C Group Message Delete option for teachers 3.png
          194 kB
        4. Screenshot_1.png
          Screenshot_1.png
          121 kB
        5. Screenshot_2.png
          Screenshot_2.png
          52 kB
        6. Screenshot_3.PNG
          Screenshot_3.PNG
          31 kB
        7. Screenshot_4.PNG
          Screenshot_4.PNG
          67 kB
        8. Screenshot_5.PNG
          Screenshot_5.PNG
          30 kB

            cescobedo Carlos Escobedo
            jaked Jake Dallimore
            Mark Nelson Mark Nelson
            Andrew Lyons Andrew Lyons
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 5 hours, 30 minutes
                4d 5h 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.