Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3396

hotpot use of get_users_by_capability will cause performance issues.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 1.9.11
    • Module: HotPot
    • None
    • MOODLE_19_STABLE

      get_users_by_capability is a heavy query, and should really only be used once per page load if possible. It looks like the hotpot report.php file could potentially call it 4 times on one page load. - This would likely cause a timeout issue if the hotpot module was added to a site homepage for a site that has a large number of users.

      in fact - this call in function hotpot_print_report()

      $teachers = get_users_by_capability($modulecontext, 'mod/hotpot:viewreport', 'u.id,u.firstname,u.lastname', 'u.lastname');

      doesn't seem to be needed. and should be removed.

            xxxxxxx Gordon Bateson
            danmarsden Dan Marsden
            Dan Marsden Dan Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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