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

Some modname_extend_settings_navigation() waste DB queries while they do not need to

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Performance
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I just noticed some modules call $DB->get_record() inside their

      {modname}

      _extend_settings_navigation() and I think it is not necessary. For example, mod/glossary does not need this as its id can be taken from $PAGE->cm->instance. If this is common case, it saves us at least one query per every module in the course.

        Attachments

          Activity

            People

            • Assignee:
              samhemelryk Sam Hemelryk
              Reporter:
              mudrd8mz David Mudrák (@mudrd8mz)
              Tester:
              Nobody
              Participants:
              Component watchers:
              Matteo Scaramuccia, Jake Dallimore, Jun Pataleta
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10