Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-11938 make_categories_list is expensive in the case of large category trees
  3. MDL-27691

Call to print_category_edit() in course/index.php causes many SQL-Queries and should use get_child_categories()

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.9.12
    • 1.9
    • Performance
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Hide

      Just call course/index.php

      Show
      Just call course/index.php

    Description

      I found, that in the file course/index.php we have the function "print_category_edit()", which prints the categories recursively, when you do Site Administration->Courses->Add/Edit courses.

      Shouldn't we change the Line:

      if ($categories = get_categories($category->id)) { // Print all the children recursively

      to

      if ($categories = get_child_categories($category->id)) { // Print all the children recursively

      ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            wagner139 Andreas Wagner
            Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3/Mar/08