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

Avoid extra db queries when building course cache

    XMLWordPrintable

Details

    • MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • wip-MDL-58666-master
    • 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

    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

              marina Marina Glancy
              marina Marina Glancy
              Juan Leyva Juan Leyva
              David Monllaó David Monllaó
              Marcus Green Marcus Green
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/May/17