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

Unnecessary DB call when rendering message drawer

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.6
    • 3.6.3
    • Messages
    • MOODLE_36_STABLE
    • MOODLE_36_STABLE
    • MDL-64566_master
    • Hide
      Prerequisite.
      1. A site with three users.
      2. The setting 'Allow site-wide messaging' enabled.
      Test 1
      1. Log in as user A and send user C a few messages.
      2. Log in as user B and send user C a message.
      3. Log in as user C.
      4. Open the message drawer.
      5. Confirm you see the unread count next to Private (2).
      6. Click on the drop-down.
      7. Confirm you see the correct number of unread messages per conversation.
      Show
      Prerequisite. A site with three users. The setting 'Allow site-wide messaging' enabled. Test 1 Log in as user A and send user C a few messages. Log in as user B and send user C a message. Log in as user C. Open the message drawer. Confirm you see the unread count next to Private (2). Click on the drop-down. Confirm you see the correct number of unread messages per conversation.

    Description

      We can improve performance by simply removing $unreadcounts = \core_message\api::get_unread_conversation_counts($USER->id);

      Attachments

        Activity

          People

            markn Mark Nelson
            markn Mark Nelson
            Ryan Wyllie Ryan Wyllie
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Janelle Barcega Janelle Barcega
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Mar/19

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m