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

Forum posts are counted twice in Statistics

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.5
    • Fix Version/s: None
    • Component/s: Forum
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      Viewing stats for a user (Home > Courses > [course] > Reports > Statistics) shows double the number of forum posts as they have actually made, as shown in:

      • the student outline report (Home > Courses > [course] > Participants > teststudent1 test > Reports > Outline report), and
      • the course logs (Home > Courses > [course] > Reports > Logs)

      This seems to be because posts are logged as two events:

      1. "Some content has been posted.
      2. "{Discussion,Post} created"

      The statistics pages present the two events as if they were separate posts.

       

      I guess a fix for this would be in lib/statslib.php, filtering out one of those two event types when compiling the stats to the stats_user_{daily,weekly,monthly} tables.

       

      Attached screenshots illustrate stats page with 2x posts compared to logs and student outline.

        Attachments

        1. logs.png
          logs.png
          107 kB
        2. outline.png
          outline.png
          9 kB
        3. stats.png
          stats.png
          19 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            balchd Dave Balch
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: