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

Avoid extra db queries when building course cache

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a course with one instance of each of these activities: choice, database, feedback, forum, glossary, lesson, quiz, scorm, survey and enable automatic completion for all of them either individually or using awesome new bulk edit completion form
      2. Purge all caches and view course page again - there should be no errors and all activities names should be displayed correctly
      Show
      Create a course with one instance of each of these activities: choice, database, feedback, forum, glossary, lesson, quiz, scorm, survey and enable automatic completion for all of them either individually or using awesome new bulk edit completion form Purge all caches and view course page again - there should be no errors and all activities names should be displayed correctly
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull Master Branch:
      wip-MDL-58666-master

      Description

      I noticed that in callbacks introduced in MDL-58190 we do not add name to the cached object, this results in extra db query in this line:
      https://github.com/moodle/moodle/blob/master/course/lib.php#L511

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marina Marina Glancy
                Reporter:
                marina Marina Glancy
                Peer reviewer:
                Juan Leyva
                Integrator:
                David Monllaó
                Tester:
                Marcus Green
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Matteo Scaramuccia, Jake Dallimore, Jun Pataleta
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/17