Details

    • Rank:
      37505

      Description

      The method forum_get_subscribed_forums() found in mod/forum/lib.php doesn't make use of the passed course, so it gets information on all forums on the site instead of just ones for the course. This has proven to be a very large performance hit on sites with a lot of forums.

      1. Moodle1.patch
        0.7 kB
        Mark Nielsen
      2. Moodle2.patch
        0.8 kB
        Mark Nielsen

        Issue Links

          Activity

          Hide
          Mark Nielsen added a comment -

          Attaching patches for Moodle 1.9 (Moodle1.patch) and Moodle 2.1 (Moodle2.patch)

          Show
          Mark Nielsen added a comment - Attaching patches for Moodle 1.9 (Moodle1.patch) and Moodle 2.1 (Moodle2.patch)
          Hide
          Mark Nielsen added a comment -

          Also note that forum_get_subscribed_forums() is only used on index.php, so regression testing should be minimal.

          Show
          Mark Nielsen added a comment - Also note that forum_get_subscribed_forums() is only used on index.php, so regression testing should be minimal.
          Hide
          Michael de Raadt added a comment -

          Thanks for spotting that and supplying a solution.

          Show
          Michael de Raadt added a comment - Thanks for spotting that and supplying a solution.
          Hide
          Petr Škoda added a comment -

          to integrators: please cherry pick to supported 2.x branches too

          Thanks for the report and patch!

          Show
          Petr Škoda added a comment - to integrators: please cherry pick to supported 2.x branches too Thanks for the report and patch!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated (21, 22 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (21, 22 & master), thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Passing this. I've tested it as admin/teacher/pupil against forced, prevented and normal subscription forums. All buttons and statuses seem to have sense.

          PS: I've noticed 2 minor (unrelated) problems while testing, will be searching/creating them later.

          Show
          Eloy Lafuente (stronk7) added a comment - Passing this. I've tested it as admin/teacher/pupil against forced, prevented and normal subscription forums. All buttons and statuses seem to have sense. PS: I've noticed 2 minor (unrelated) problems while testing, will be searching/creating them later.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many.

          Nah, joking, many thanks! Closing this a fixed, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many. Nah, joking, many thanks! Closing this a fixed, ciao

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: