Moodle
  1. Moodle
  2. MDL-35385

New messages pop-ups are covered by the chat window

    Details

    • Testing Instructions:
      Hide

      You need to either wait at least two minutes between checks for a popup or edit lib/moodlelib.php around line 10485 and comment out "$USER->message_lastpopup = time();" Moodle will not display popups more frequently than every 2 minutes unless you prevent the updating of the last popup setting.

      1. Open a terminal
      2. cd mod/chat
      3. php chatd.php --start
      1. Open a browser and log in as admin.
      2. Go to admin tree -> Plugins -> Activity modules -> Chat
      3. Set chat_method to "Chat server daemon". Keep this tab open.
      4. Go to admin user's messaging preferences and set personal messages to display a popup when both offline and online.
      1. In another browser log in as a different user and send admin a message.
      1. As admin go to a course and add a chat instance.
      2. Go to the chat instance and click "Click here to enter the chat now"
      3. Make sure you don't see any popups within the chat window.

      Close the chat room, alter chat_method and reenter the chat room.
      There are three modes in total, chat server daemon, ajax and normal. Check you dont see any popups within the chat window in any mode.

      Show
      You need to either wait at least two minutes between checks for a popup or edit lib/moodlelib.php around line 10485 and comment out "$USER->message_lastpopup = time();" Moodle will not display popups more frequently than every 2 minutes unless you prevent the updating of the last popup setting. Open a terminal cd mod/chat php chatd.php --start Open a browser and log in as admin. Go to admin tree -> Plugins -> Activity modules -> Chat Set chat_method to "Chat server daemon". Keep this tab open. Go to admin user's messaging preferences and set personal messages to display a popup when both offline and online. In another browser log in as a different user and send admin a message. As admin go to a course and add a chat instance. Go to the chat instance and click "Click here to enter the chat now" Make sure you don't see any popups within the chat window. Close the chat room, alter chat_method and reenter the chat room. There are three modes in total, chat server daemon, ajax and normal. Check you dont see any popups within the chat window in any mode.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull 2.4 Branch:
      MDL-35385_chat_24
    • Pull Master Branch:
      MDL-35385_chat
    • Rank:
      44061

      Description

      Replication steps:-

      1. Open a terminal
      2. cd mod/chat
      3. php chatd.php --start
      4. You SHOULD NOT see a "Command line scripts must define CLI_SCRIPT before requiring config.php" error
      5. Open a browser and login as an admin user
      6. Go to admin tree -> Plugins -> Activity modules -> Chat
      7. Set chat_method to "Chat server daemon"
      8. Enable msg popups from msg settings
      9. Send a few msgs to user A from user B
      10. Go to a course and add a chat module instance
      11. Go to the chat instance and click "Click here to enter the chat now"
      12. Log in as user B, make sure you can see popups on right corner
      13. Do not read or ignore messages, and login to a chat session
      14. Chat window on right has half truncated msg popup as shown in screen

        Issue Links

          Activity

          Hide
          David Monllaó added a comment -

          The chat input frame (chat daemon method) is using a embedded layout, I suspect all the pages using the embedded layout experiences the same problem

          Show
          David Monllaó added a comment - The chat input frame (chat daemon method) is using a embedded layout, I suspect all the pages using the embedded layout experiences the same problem
          Hide
          Michael de Raadt added a comment -

          I wonder if we can introduce a mechanism for a page to suggest it should be exempted from new message pop-ups. Perhaps there already is one.

          Show
          Michael de Raadt added a comment - I wonder if we can introduce a mechanism for a page to suggest it should be exempted from new message pop-ups. Perhaps there already is one.
          Hide
          Andrew Davis added a comment -

          Maybe Im misunderstanding this bug report. There is indeed a mechanism for pages to say they don't want messaging popups displayed.

          See MDL-32665. Maybe we're just not doing that in one of the chat frames.

          Show
          Andrew Davis added a comment - Maybe Im misunderstanding this bug report. There is indeed a mechanism for pages to say they don't want messaging popups displayed. See MDL-32665 . Maybe we're just not doing that in one of the chat frames.
          Hide
          Andrew Davis added a comment -

          Putting this fix up for peer review.

          Show
          Andrew Davis added a comment - Putting this fix up for peer review.
          Hide
          Mark Nelson added a comment -

          Hi Andrew, patch looks good.

          I went through the testing instructions to get a better understanding of what was happening in this issue and can see your patch works as expected. Submitting to integration.

          Show
          Mark Nelson added a comment - Hi Andrew, patch looks good. I went through the testing instructions to get a better understanding of what was happening in this issue and can see your patch works as expected. Submitting to integration.
          Hide
          Mark Nelson added a comment -

          Hi Andrew, just a quick question before this gets integrated. Shouldn't this be backported to 2.3 as well? Ideally you should have a diff URL specified for 2.3, 2.4 and master. If you were waiting for peer review before doing this then ignore me.

          Show
          Mark Nelson added a comment - Hi Andrew, just a quick question before this gets integrated. Shouldn't this be backported to 2.3 as well? Ideally you should have a diff URL specified for 2.3, 2.4 and master. If you were waiting for peer review before doing this then ignore me.
          Hide
          Damyon Wiese added a comment -

          Reopening on request from Mark.

          Show
          Damyon Wiese added a comment - Reopening on request from Mark.
          Hide
          Andrew Davis added a comment -

          Hi. I don't typically create the various branches until after peer review. I've created them now. Putting this up for integration.

          Show
          Andrew Davis added a comment - Hi. I don't typically create the various branches until after peer review. I've created them now. Putting this up for integration.
          Hide
          Dan Poltawski added a comment -

          Integrated to master, 24 and 23. Thanks Andrew.

          Show
          Dan Poltawski added a comment - Integrated to master, 24 and 23. Thanks Andrew.
          Hide
          Rajesh Taneja added a comment -

          Thanks for fixing this Andrew,

          No message popup appear on chat window.

          Show
          Rajesh Taneja added a comment - Thanks for fixing this Andrew, No message popup appear on chat window.
          Hide
          Dan Poltawski added a comment -

          Thanks! You're changes are now spread to the world through this git and our source control repositories.

          No time to rest though, we've got days to make 2.5 the best yet!

          ciao

          Show
          Dan Poltawski added a comment - Thanks! You're changes are now spread to the world through this git and our source control repositories. No time to rest though, we've got days to make 2.5 the best yet! ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: