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

Users Online Block not showing number of users online correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.7
    • 1.9.4, 1.9.5
    • Blocks
    • None
    • Linux
    • Any
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Easy

      blocks/online_users/block_online_users.php - line:119

      This SQL query would always return 1 (number of instances the first userid in the returned SQL)

      $usercount = count_records_sql("SELECT COUNT(u.id), u.id $from $where GROUP BY u.id");

      The patch counts the distinct userids to correctly return the real userc ount. :-

      $usercount = count_records_sql("SELECT COUNT(DISTINCT(u.id)) $from $where");

            andyjdavis Andrew Davis
            tlock Tim Lock
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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