Moodle
  1. Moodle
  2. MDL-31432

Messaging page pops up messaging notice when you go to view that message

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Messages
    • Labels:
    • Testing Instructions:
      Hide

      For this test you will need 2 users and 2 browsers (firefox and chrome for example)

      1. log in as a user (message recipient) and check that your messaging preferences are "popup" for personal messages while both online and offline.
      1. go to any messaging screen. Viewing a conversation, doing a message search etc.
      1. In your second browser log in as a 2nd user. Send the first user a message.
      1. As the first user refresh the messaging screen. No popup should appear.
      1. Still as the message recipient go to another page, /my for example. A popup should now appear in the bottom right of the screen.

      Note that message popups will not be shown if a popup was shown in the past 2 minutes. If you get a message popup unrelated to this test or similar then go and get a cup of tea and start over

      Show
      For this test you will need 2 users and 2 browsers (firefox and chrome for example) log in as a user (message recipient) and check that your messaging preferences are "popup" for personal messages while both online and offline. go to any messaging screen. Viewing a conversation, doing a message search etc. In your second browser log in as a 2nd user. Send the first user a message. As the first user refresh the messaging screen. No popup should appear. Still as the message recipient go to another page, /my for example. A popup should now appear in the bottom right of the screen. Note that message popups will not be shown if a popup was shown in the past 2 minutes. If you get a message popup unrelated to this test or similar then go and get a cup of tea and start over
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-31432_messaging_popup
    • Rank:
      37957

      Description

      When a message is sent to me through Moodle I receive an email (while offline) containing a link to take me to the message, so I can respond. When I click the link I am taken to the messaging page, but I am also presented with a pop-up message telling me about the message I am currently viewing. Apart from being annoying it is also confusing as there are two options on the pop-up: Go to messaging (I'm already there) or ignore. This pop-up message should not appear.

        Issue Links

          Activity

          Hide
          Andrew Davis added a comment -

          Ive added a potential fix. This just prevents any messaging popups while the user is within the messaging system. The popups are actually generated by lib/moodlelib.php ie not the messaging system itself so I decided against more targeted popup prevention as that would require rummaging around in the message system to compare message IDs. Plus I think it makes sense to simply prevent them. The messaging pages display a count of new messages you've received so further prompting probably isnt necessary.

          Show
          Andrew Davis added a comment - Ive added a potential fix. This just prevents any messaging popups while the user is within the messaging system. The popups are actually generated by lib/moodlelib.php ie not the messaging system itself so I decided against more targeted popup prevention as that would require rummaging around in the message system to compare message IDs. Plus I think it makes sense to simply prevent them. The messaging pages display a count of new messages you've received so further prompting probably isnt necessary.
          Hide
          Dan Poltawski added a comment -

          I think that this is probably the simplest solution to the problem. Although it is worth noting that other popup notifications could be received other than notification of messages (e.g. grades).

          I would probably put a comment explaining why you are disabling the notifications as it may not be clear to others.

          Show
          Dan Poltawski added a comment - I think that this is probably the simplest solution to the problem. Although it is worth noting that other popup notifications could be received other than notification of messages (e.g. grades). I would probably put a comment explaining why you are disabling the notifications as it may not be clear to others.
          Hide
          Andrew Davis added a comment - - edited

          Im not sure what popup notifications you mean. The get/set_popup_notification_allowed() pair only govern message popups although notifications of assignment submissions, assignment grading etc are all "messages".

          I've added a comment explaining why we're turning off popups on the messaging screen.

          Show
          Andrew Davis added a comment - - edited Im not sure what popup notifications you mean. The get/set_popup_notification_allowed() pair only govern message popups although notifications of assignment submissions, assignment grading etc are all "messages". I've added a comment explaining why we're turning off popups on the messaging screen.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Sam Hemelryk added a comment -

          Hi Andrew,
          What branches does this need to end up on?

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi Andrew, What branches does this need to end up on? Cheers Sam
          Hide
          Andrew Davis added a comment -

          Oops. It should go into master, 2.2 and 2.1. creating branches now.

          Show
          Andrew Davis added a comment - Oops. It should go into master, 2.2 and 2.1. creating branches now.
          Hide
          Andrew Davis added a comment -

          Adding branches

          Show
          Andrew Davis added a comment - Adding branches
          Hide
          Sam Hemelryk added a comment -

          Thanks Andrew this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks Andrew this has been integrated now
          Hide
          Ankit Agarwal added a comment -

          This works as expected!
          Passing!
          Thanks

          Show
          Ankit Agarwal added a comment - This works as expected! Passing! Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Some changes to Moodle should be milestones in the project by themselves.

          This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks!

          Closing as fixed, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Some changes to Moodle should be milestones in the project by themselves. This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks! Closing as fixed, ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: