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

Broken link in messages contact request notification

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Note

      For the 3.6 changes we don't have the messaging widget on the page so instead when you view the message/index.php page it will open the message drawer.

      Test setup

      1. Before applying the patch in this issue, create a site with a course
      2. Create 3 users and enrol them in the course as students
        • Note down the IDs of the 3 users
      3. Create a group in the course
        • Add the 3 users to the group
        • Enable group messaging
      4. Note down the conversation id for the group message
        • You can do this by looking in the DB or loading the group conversation in the messaging interface and looking at the core_message_get_conversation_messages ajax request it sends

      Test viewing a "contact request" notification

      1. Log in as user 1
      2. Open the message drawer and search for user 2
      3. Click on user 2 to open the conversation
      4. Send a message or two to the user to create a conversation
      5. Send user 2 a contact request from the drop down menu up the top right of the conversation
      6. Apply the patch from this issue
      7. Log in as admin and go through the upgrade (master only)
      8. Log in as user 2
      9. Open the notification popover from the nav bar
      10. Click on the "Contact request" notification
      11. CONFIRM the message index page is loaded and shows the contact requests panel

      Test loading an existing private conversation

      1. Log in as user 1
      2. View the conversation with user 2 on the message index page by going to <your_site>/message/index.php?id=<user_2_id>
        • Replace <your_site> with your Moodle site's URL
        • Replace <user_2_id> with the ID of user 2
      3. CONFIRM that the page loads directly into the existing conversation with user 2 (you should see the messages you sent earlier)

      Test creating a new private conversation

      1. Log in as user 2
      2. Start a new conversation on the message index page with user 3 by going to <your_site>/message/index.php?id=<user_3_id>
      3. CONFIRM that the page loads directly into a blank conversation with user 3

      Test loading an existing group conversation

      1. Log in as user 1
      2. View the group conversation on the message index page by going to <your_site>/message/index.php?convid=<group_conversation_id>
      3. CONFIRM that the page loads directly into the group conversation

      (master only) Test default contact request notification settings

      1. Create a new site from the master branch
      2. Log in as admin
      3. View the notification settings (notifications popover in nav bar > settings cog)
      4. Find the "Message contact requests notification" setting
      5. CONFIRM that it's set to "off" for both the online and offline toggles in the web processor

      (master only) Test upgrade

      1. Create a site that doesn't have this patch applied
      2. Log in as admin
      3. Create 2 users
      4. Log in as user 1
      5. View the user's notification settings
        • notification popover in nav drawer > settings cog
      6. Scroll down to the "Message contact requests notification" preference
      7. In the web processor the toggle for "online" and "offline" should both be set to "on"
      8. Click the "online" and "offline" toggles twice each to turn each of them to "off" and then back to "on"
        • This is creating user preferences which we'll check are preserved through the upgrade
      9. Apply the master patch on this issue
      10. Log in as admin and go through the upgrade screens
      11. Log in as user 1
      12. View your notification settings
      13. CONFIRM the "Message contact requests notification" preference is set to "on" for both of the "web" settings (the value you set them to previously)
      14. Log in as user 2
      15. View your notification settings
      16. CONFIRM the "Message contact requests notification" preference is set to "off" for both of the "web" settings (these are the new defaults)
      Show
      Note For the 3.6 changes we don't have the messaging widget on the page so instead when you view the message/index.php page it will open the message drawer. Test setup Before applying the patch in this issue, create a site with a course Create 3 users and enrol them in the course as students Note down the IDs of the 3 users Create a group in the course Add the 3 users to the group Enable group messaging Note down the conversation id for the group message You can do this by looking in the DB or loading the group conversation in the messaging interface and looking at the core_message_get_conversation_messages ajax request it sends Test viewing a "contact request" notification Log in as user 1 Open the message drawer and search for user 2 Click on user 2 to open the conversation Send a message or two to the user to create a conversation Send user 2 a contact request from the drop down menu up the top right of the conversation Apply the patch from this issue Log in as admin and go through the upgrade (master only) Log in as user 2 Open the notification popover from the nav bar Click on the "Contact request" notification CONFIRM the message index page is loaded and shows the contact requests panel Test loading an existing private conversation Log in as user 1 View the conversation with user 2 on the message index page by going to <your_site>/message/index.php?id=<user_2_id> Replace <your_site> with your Moodle site's URL Replace <user_2_id> with the ID of user 2 CONFIRM that the page loads directly into the existing conversation with user 2 (you should see the messages you sent earlier) Test creating a new private conversation Log in as user 2 Start a new conversation on the message index page with user 3 by going to <your_site>/message/index.php?id=<user_3_id> CONFIRM that the page loads directly into a blank conversation with user 3 Test loading an existing group conversation Log in as user 1 View the group conversation on the message index page by going to <your_site>/message/index.php?convid=<group_conversation_id> CONFIRM that the page loads directly into the group conversation (master only) Test default contact request notification settings Create a new site from the master branch Log in as admin View the notification settings (notifications popover in nav bar > settings cog) Find the "Message contact requests notification" setting CONFIRM that it's set to "off" for both the online and offline toggles in the web processor (master only) Test upgrade Create a site that doesn't have this patch applied Log in as admin Create 2 users Log in as user 1 View the user's notification settings notification popover in nav drawer > settings cog Scroll down to the "Message contact requests notification" preference In the web processor the toggle for "online" and "offline" should both be set to "on" Click the "online" and "offline" toggles twice each to turn each of them to "off" and then back to "on" This is creating user preferences which we'll check are preserved through the upgrade Apply the master patch on this issue Log in as admin and go through the upgrade screens Log in as user 1 View your notification settings CONFIRM the "Message contact requests notification" preference is set to "on" for both of the "web" settings (the value you set them to previously) Log in as user 2 View your notification settings CONFIRM the "Message contact requests notification" preference is set to "off" for both of the "web" settings (these are the new defaults)
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull 3.6 Branch:
    • Pull 3.7 Branch:
    • Pull Master Branch:
      MDL-65219-master
    • Story Points:
      3
    • Sprint:
      Sprint 1 - Investimagation, Sprint 2 - Experimental

      Description

      Hi,

      We notice a very small problem in contact request notification

      • User A send a contact request to user B
      • User B click on notifications icon , then on the link "View full notification"
      • At the bottom of the page, the link "Go to" is broken (file not found)

      message/classes/api.php :
      line 2511 : $url = new \moodle_url('/message/pendingcontactrequests.php');

      but file ../message/pendingcontactrequests.php don't exist

      I saw in MDL-63310 :
      "Don't forget to remove the stub page message/pendingcontactrequests.php"

      Thanks a lot

        Attachments

        1. file not found message.png
          10 kB
          Helen Foster
        2. go to broken link.png
          40 kB
          Helen Foster
        3. Screenshot_1.png
          146 kB
          Janelle Barcega
        4. Screenshot_2.png
          41 kB
          Janelle Barcega
        5. View full notification broken links.png
          29 kB
          Helen Foster

          Issue Links

            Activity

              People

              • Votes:
                18 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Sep/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 7 hours
                  1d 7h