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

hotpot use of get_users_by_capability will cause performance issues.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.11
    • None
    • Module: HotPot
    • None
    • MOODLE_19_STABLE

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: