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

Improve performance when reading context table in reports

    XMLWordPrintable

Details

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide

      Badges

      1. Navigate to General > Badges > Add a new badge in site administration
      2. Fill in form and press Create Badge
      3. Create a new course
      4. Press More > Badges from secondary navigation
      5. Press Add a new badge
      6. Fill in form and press Create Badge
      7. Press Reports from user menu
      8. Create new report using Badges report source (using default setup)
      9. In report editor, add the Badge details > Image column
      10. Confirm correct image is loaded for each badge

      Cohorts

      1. Navigate to Users > Accounts > Cohorts in site administration
      2. Press Add new cohort
        • Context: System
        • Ensure Description field contains an image (press Insert or edit image in the editor)
      3. Press Add new cohort
        • Context: Category 1
        • Ensure Description field contains an image (press Insert or edit image in the editor)
      4. Press Reports from user menu
      5. Create new report using Cohorts report source (using default setup)
      6. Confirm Category column is correct for each cohort
      7. Confirm Description column is correct for each cohort (correct image is loaded for each)

      Courses

      1. Navigate to Courses > Manage courses and categories in site administration
      2. Edit Category 1
        • Ensure Description field contains an image (press Insert or edit image in the editor)
      3. Press Create new category
        • Ensure Description field contains an image (press Insert or edit image in the editor)
      4. Create a new course in the second category
      5. Press Reports from user menu
      6. Create new report using Courses report source (using default setup)
      7. In report editor, add the Course category > Description column
      8. Confirm Description column is correct for each category (correct image is loaded for each)
      Show
      Badges Navigate to General > Badges > Add a new badge in site administration Fill in form and press Create Badge Create a new course Press More > Badges from secondary navigation Press Add a new badge Fill in form and press Create Badge Press Reports from user menu Create new report using Badges report source (using default setup) In report editor, add the Badge details > Image column Confirm correct image is loaded for each badge Cohorts Navigate to Users > Accounts > Cohorts in site administration Press Add new cohort Context: System Ensure Description field contains an image (press Insert or edit image in the editor) Press Add new cohort Context: Category 1 Ensure Description field contains an image (press Insert or edit image in the editor) Press Reports from user menu Create new report using Cohorts report source (using default setup) Confirm Category column is correct for each cohort Confirm Description column is correct for each cohort (correct image is loaded for each) Courses Navigate to Courses > Manage courses and categories in site administration Edit Category 1 Ensure Description field contains an image (press Insert or edit image in the editor) Press Create new category Ensure Description field contains an image (press Insert or edit image in the editor) Create a new course in the second category Press Reports from user menu Create new report using Courses report source (using default setup) In report editor, add the Course category > Description column Confirm Description column is correct for each category (correct image is loaded for each)

    Description

      For report columns that need a context instance in their callback method to format the column data, we should preload the context data ensuring additional database reads are not made when executing the column callbacks (not good for performance)

      The \context_helper class contains methods for selecting/preloading context data

      Attachments

        1. MDL-75119_badges_course.png
          MDL-75119_badges_course.png
          62 kB
        2. MDL-75119_badges_system.png
          MDL-75119_badges_system.png
          59 kB
        3. MDL-75119_badges.png
          MDL-75119_badges.png
          73 kB
        4. MDL-75119_cohorts_category1.png
          MDL-75119_cohorts_category1.png
          179 kB
        5. MDL-75119_cohorts_system.png
          MDL-75119_cohorts_system.png
          145 kB
        6. MDL-75119_cohorts.png
          MDL-75119_cohorts.png
          261 kB
        7. MDL-75119_courses_category1.png
          MDL-75119_courses_category1.png
          112 kB
        8. MDL-75119_courses_category2.png
          MDL-75119_courses_category2.png
          113 kB
        9. MDL-75119_courses.png
          MDL-75119_courses.png
          196 kB

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              Carlos Castillo Carlos Castillo
              Victor Déniz Falcón Victor Déniz Falcón
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 hours, 20 minutes
                  6h 20m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.