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

Performance improvement in course listings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 2.6
    • Component/s: Course
    • Labels:
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      wip-MDL-42020-master
    • Testing Instructions:
      Hide

      Test 1.

      1. Create some categories and courses in them, some courses must be hidden
      2. Add categories list to the frontpage (and no other course listings)
      3. Open frontpage (as student), make sure that number of courses in each category is correct - it should not include hidden courses
      4. Purge caches and look at number of courses again
      5. Search courses and make sure that the number of found courses is correct

      Test 2.

      1. Set up frontpage to display list of all courses
      2. Make sure your courses have teachers enrolled in it and they are shown as course contacts
      3. Make sure the course contacts are displayed correctly after purging the caches and after the refresh
      Show
      Test 1. Create some categories and courses in them, some courses must be hidden Add categories list to the frontpage (and no other course listings) Open frontpage (as student), make sure that number of courses in each category is correct - it should not include hidden courses Purge caches and look at number of courses again Search courses and make sure that the number of found courses is correct Test 2. Set up frontpage to display list of all courses Make sure your courses have teachers enrolled in it and they are shown as course contacts Make sure the course contacts are displayed correctly after purging the caches and after the refresh

      Description

      While working on MDL-41942 I've noticed that some code in retrieving list of courses can be faster.

      Examples:

      1. If frontpage shows only categories tree, we call get_courses_count() without calling to get_courses() and this function alone is not efficient.

      2. If the course list is already cached the course contacts are retrieved one-by-one.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              Sam Hemelryk Sam Hemelryk
              Integrator:
              Dan Poltawski Dan Poltawski
              Tester:
              Jérôme Mouneyrac Jérôme Mouneyrac
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

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