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

Forum summary report multiplies counts by number of enrollments a user has

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9 regressions, 3.9.4, 3.10 regressions
    • Fix Version/s: 3.11, 4.0
    • Component/s: Forum
    • Testing Instructions:
      Hide

      Setup

      1. Log in as admin.
      2. Create a new course
      3. On the enrolment page, click on the cog and select Enrolment methods
      4. Enable Self enrolment (Student) enrol method
      5. Go to course and create a new forum changing Display word count to Yes.

      Testing

      1. In another window, log in as s1
      2. Go to the course and enrol yourself.
      3. As admin, go to the enrolment page and enrol s1 as student again, this time as a manual enrolment.
      4. As s1, go to the forum and add a discussion post, please make note of the number of words and count the number of chars in your sentence.
      5. As admin, go to the forum, click on the cog and select Forum summary report
      6. Make sure the number of discussions posted is 1.
      7. Make sure the Word count and Character count matches the actual counts.
      Show
      Setup Log in as admin. Create a new course On the enrolment page, click on the cog and select Enrolment methods Enable Self enrolment (Student) enrol method Go to course and create a new forum changing Display word count to Yes . Testing In another window, log in as s1 Go to the course and enrol yourself. As admin , go to the enrolment page and enrol s1 as student again, this time as a manual enrolment. As s1 , go to the forum and add a discussion post, please make note of the number of words and count the number of chars in your sentence. As admin, go to the forum, click on the cog and select Forum summary report Make sure the number of discussions posted is 1. Make sure the Word count and Character count matches the actual counts.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE, MOODLE_400_STABLE
    • Pull from Repository:
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-71029-310
    • Pull 3.11 Branch:
      MDL-71029-311
    • Pull Master Branch:
      MDL-71029-master

      Description

      Sometimes our users have more than one enrollment, for example they may have started as self enrolled but later were enrolled officially. As a result, the forum summary report will double the number of posts it says the user has made. One of our users had three enrollments and his posts were tripled in the forum summary report. This problem is especially bad for meta courses because you cannot drop one of the enrollments.

        Attachments

        1. query_original.png
          query_original.png
          1.21 MB
        2. query_with_subquery.png
          query_with_subquery.png
          1.40 MB
        3. subquery.patch
          5 kB
        4. v1.sql
          2 kB
        5. v2.sql
          3 kB

          Activity

            People

            Assignee:
            dongsheng Dongsheng Cai
            Reporter:
            dsoini Diane Soini
            Peer reviewer:
            Simey Lameze
            Participants:
            Component watchers:
            Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Fix Release Date:
              17/May/21

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 6 hours, 20 minutes
                1d 6h 20m