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

get_context_info_array() calls get_record for courses instead of get_course

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.6.6, 3.7.2
    • Fix Version/s: None
    • Component/s: Performance
    • Labels:

      Description

      Often when calling get_coursemodule_from_id() we are already dealing with the current course - information which we already hold. However we always go and call $DB->get_record.

      On some pages, like forum, this can lead to at least 5, if not more, DB reads.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 35 minutes
                  35m