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

Duplicate rows in forum_read from read tracking and forum email subscriptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.6.6, 2.7.3
    • 2.0, 2.6.1, 2.7.2, 2.8
    • Forum
    • MySQL
    • MOODLE_20_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MDL-25057-master
    • Hide
      Before upgrade
      1. Enable debugdisplay and increase your debugging level
      2. Create a new course as teacher
      3. Enrol a student
      4. In the students user preferences, enable forum read tracking
      5. As student, create forum post (verify the student is subscribed by email to the thread as default)
      6. As teacher, write a reply to the post and tick 'reply now'
      7. As a student, reload the new thread (verify you see a new post)
      8. Run cron
      9. As student reload the thread
        • Observe that duplicates were detected (this will be a debug message on the page)
      10. Preferably repeat the above a bit so that there multiple entries
      Upgrade
      1. Update the codebase, and run the upgrade
        • Confirm that the upgrade ran smoothly
      2. Create a new course as teacher
      3. Enrol a student
      4. In the students user preferences, enable forum read tracking
      5. As student, create forum post (verify the student is subscribed by email to the thread as default)
      6. As teacher, write a reply to the post and tick 'reply now'
      7. As a student, reload the new thread (verify you see a new post)
      8. Run cron
      9. As student reload the thread
        • Observe that duplicates were not detected
      Show
      Before upgrade Enable debugdisplay and increase your debugging level Create a new course as teacher Enrol a student In the students user preferences, enable forum read tracking As student, create forum post (verify the student is subscribed by email to the thread as default) As teacher, write a reply to the post and tick 'reply now' As a student, reload the new thread (verify you see a new post) Run cron As student reload the thread Observe that duplicates were detected (this will be a debug message on the page) Preferably repeat the above a bit so that there multiple entries Upgrade Update the codebase, and run the upgrade Confirm that the upgrade ran smoothly Create a new course as teacher Enrol a student In the students user preferences, enable forum read tracking As student, create forum post (verify the student is subscribed by email to the thread as default) As teacher, write a reply to the post and tick 'reply now' As a student, reload the new thread (verify you see a new post) Run cron As student reload the thread Observe that duplicates were not detected

      1. Create a new course as teacher
      2. Enrol a student
      3. In the students user preferences, enable forum read tracking
      4. As student, create forum post (verify the student is subscribed by email to the thread as defai;t)
      5. As teacher, write a reply to the post and tick 'reply now'
      6. As a student, reload the new thread (verify you see a new post)
      7. Run cron
      8. As student reload the thread

      Expected:
      No debugging messages

      Actual:
      Did you remember to make the first column something unique in your call to get_records? Duplicate value '6' found in column 'id'.
      line 791 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()
      line 1898 of /mod/forum/lib.php: call to pgsql_native_moodle_database->get_records_sql()
      line 5520 of /mod/forum/lib.php: call to forum_get_all_discussion_posts()
      line 354 of /mod/forum/discuss.php: call to forum_print_discussion()

            dobedobedoh Andrew Lyons
            andyjdavis Andrew Davis
            Frédéric Massart Frédéric Massart
            Marina Glancy Marina Glancy
            Sam Hemelryk Sam Hemelryk
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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