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

Portfolio instances are loaded when loading the user settings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Performance, Portfolio
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable portfolios, and some portfolios (no need for correct API keys)
      2. Login as a student, and make sure you can see "Configure" and "Transfer logs" under My profile settings > Portfolios
      3. As an admin, disable the portfolio instances (using the dropdown to hide them, not the global portfolio setting)
      4. Log back in as a student, and make sure you don't see the navigation entries mentioned in #2.

      You should not see any errors, warnings during the test

      Show
      Enable portfolios, and some portfolios (no need for correct API keys) Login as a student, and make sure you can see "Configure" and "Transfer logs" under My profile settings > Portfolios As an admin, disable the portfolio instances (using the dropdown to hide them, not the global portfolio setting) Log back in as a student, and make sure you don't see the navigation entries mentioned in #2. You should not see any errors, warnings during the test
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-41082-master
    • Story Points:
      8
    • Sprint:
      BACKEND Sprint 3

      Description

      There is an unnecessary process when populating the settings of the user in the Settings block. To check if there are visible instances, it loads all the portfolio files, and instantiate all the instances.

      This is an unnecessary processing and it is performed on every single page.

      I noticed this when the Evernote portfolio was installed, which caused the memory usage to be freed by about 20MB after the patch. The reason was that the libraries required in the Evernote portfolio lib.php were quite big.

        Attachments

          Activity

            People

            Assignee:
            fred Frédéric Massart
            Reporter:
            fred Frédéric Massart
            Peer reviewer:
            Petr Skoda Petr Skoda
            Integrator:
            Sam Hemelryk Sam Hemelryk
            Tester:
            Rajesh Taneja Rajesh Taneja
            Participants:
            Component watchers:
            Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Nov/13