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

Grade iterator is initialised 3 times with no reason

XMLWordPrintable

    • MOODLE_403_STABLE

      On grade user report we initialise iterator 3 times and its the same iterator:

      1. First we do it here while calling get_gradable_users - https://github.com/moodle/moodle/blob/main/grade/report/user/index.php#L120
      2. Then we do it here separately - https://github.com/moodle/moodle/blob/main/grade/report/user/index.php#L139
      3. And the we initialise it for a search here - https://github.com/moodle/moodle/blob/main/grade/classes/external/get_enrolled_users_for_selector.php#L94

      So we run same queries for no reason. We should cache it and reuse instead.

      I think it happens on other reports too

       

            Unassigned Unassigned
            ilyatregubov Ilya Tregubov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.