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

Create an ajax widget for sending a user a message.

    XMLWordPrintable

Details

    • MOODLE_29_STABLE
    • MOODLE_29_STABLE
    • MDL-48933-master
    • Hide

      Pre-requisites

      1. Enable messaging
      2. Make sure the permission moodle/site:sendmessage is given to the authenticated user role
      3. Have your JS console open all the time

      Test

      1. Go to someone's profile and click on the link Send a message
      2. Make sure a dialog opens
      3. Make sure the link "View conversation" points to the page containing the conversation with that user
      4. Make sure you can send a message (confirm that it arrived on the recipient's account)
      5. Repeat from user/profile.php (or user/view.php if you are on profile.php)
      6. Repeat from the block Online users (click the message icon)

      Test 2

      1. Back on the profile, open the dialog
        • Do not close the dialog, or reload the page unless specified
      2. Now, open a new tab and logout
      3. Try to send a message and make sure an error is displayed
      4. In the other tab login as guest
      5. Try to send a message and make sure an error is displayed
      6. In the other tab log back in and refresh the page
      7. Using another session remove the permission 'moodle/site:sendmessage' to that user
      8. Try to send a message and make sure an error is displayed
      9. In the other tab, disable messaging
      10. Try to send a message and make sure an error is displayed
      11. Now rename the file message/ajax.php to message/ajax.php.bak
      12. Try to send a message and make sure an error is displayed

      Test 3

      1. Use the message dialog to send nasty messages (containing HTML, images, scripts, etc...)
      2. Confirm that everything is escaped/safe when viewed from both users in the conversation
      Show
      Pre-requisites Enable messaging Make sure the permission moodle/site:sendmessage is given to the authenticated user role Have your JS console open all the time Test Go to someone's profile and click on the link Send a message Make sure a dialog opens Make sure the link "View conversation" points to the page containing the conversation with that user Make sure you can send a message (confirm that it arrived on the recipient's account) Repeat from user/profile.php (or user/view.php if you are on profile.php) Repeat from the block Online users (click the message icon) Test 2 Back on the profile, open the dialog Do not close the dialog, or reload the page unless specified Now, open a new tab and logout Try to send a message and make sure an error is displayed In the other tab login as guest Try to send a message and make sure an error is displayed In the other tab log back in and refresh the page Using another session remove the permission 'moodle/site:sendmessage' to that user Try to send a message and make sure an error is displayed In the other tab, disable messaging Try to send a message and make sure an error is displayed Now rename the file message/ajax.php to message/ajax.php.bak Try to send a message and make sure an error is displayed Test 3 Use the message dialog to send nasty messages (containing HTML, images, scripts, etc...) Confirm that everything is escaped/safe when viewed from both users in the conversation
    • Team '; drop tables Sprint 2
    • Large

    Description

      Instead of taking you to a different page in a different context, we should be able to send and receive messages without leaving the current page.

      Attachments

        Issue Links

          Activity

            People

              fred Frédéric Massart
              abgreeve Adrian Greeve
              Damyon Wiese Damyon Wiese
              Dan Poltawski Dan Poltawski
              John Okely John Okely
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona), Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/May/15