Moodle
  1. Moodle
  2. MDL-24577

Mark all posts in this discussion read doesn't work completely correct

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.0.5, 2.1.2, 2.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Forum
    • Labels:
      None
    • Environment:
      moodle.org
    • Testing Instructions:
      Hide

      As User A

      • Ensure that Forum tracking is enabled for a forum
      • Create a post in the forum
      • Reply to that post a couple of times

      As User B

      • My Profile Settings -> Edit Profile
      • Ensure Forum Tracking is enabled
      • Visit the forum User A posted in
      • Confirm that the number of unread posts matches the number of posts you made as User A
      • Tick the 'Mark all posts in this discussion read' tickbox icon

      Fixed Result

      Text changes to say that 0 posts are unread

      Original Result

      One post is left unread

      Show
      As User A Ensure that Forum tracking is enabled for a forum Create a post in the forum Reply to that post a couple of times As User B My Profile Settings -> Edit Profile Ensure Forum Tracking is enabled Visit the forum User A posted in Confirm that the number of unread posts matches the number of posts you made as User A Tick the 'Mark all posts in this discussion read' tickbox icon Fixed Result Text changes to say that 0 posts are unread Original Result One post is left unread
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-24577-master-1
    • Rank:
      456

      Description

      Hi,

      when I mark a complete forum as read (Mark all posts in this discussion read.) at least one post will still be marked as unread.

      Greetings
      D.M.

        Issue Links

          Activity

          Hide
          Glenys Hanson added a comment -

          Hi there,

          It's minor but it is irritating. There's no way to remove the last one or two still marked as read except to open the discussion.

          Cheers,
          Glenys

          Show
          Glenys Hanson added a comment - Hi there, It's minor but it is irritating. There's no way to remove the last one or two still marked as read except to open the discussion. Cheers, Glenys
          Hide
          Martin Dougiamas added a comment - - edited

          Hey Dongsheng can you look at this?

          I think there is some sort of off-by-one error in forum_tp_mark_posts_read()

          Same error happens even when marking a single discussion as read, from forum/view.php

          Show
          Martin Dougiamas added a comment - - edited Hey Dongsheng can you look at this? I think there is some sort of off-by-one error in forum_tp_mark_posts_read() Same error happens even when marking a single discussion as read, from forum/view.php
          Hide
          Tony Levi added a comment -

          It seems a bad ordering of the query parameters caused this. Fix:
          https://github.com/tlevi/moodle/tree/mdl24577

          Show
          Tony Levi added a comment - It seems a bad ordering of the query parameters caused this. Fix: https://github.com/tlevi/moodle/tree/mdl24577
          Hide
          Tony Levi added a comment -

          This might be affecting 2.1 too, this patch should be applied before it bitrots too much.

          Show
          Tony Levi added a comment - This might be affecting 2.1 too, this patch should be applied before it bitrots too much.
          Hide
          Tony Levi added a comment -

          Hi Dongsheng,

          Can we investigate applying this patch?

          Show
          Tony Levi added a comment - Hi Dongsheng, Can we investigate applying this patch?
          Hide
          Andrew Nicols added a comment -

          Updating this patch for latest release and removing unnecessary whitespace addition at end of file

          Show
          Andrew Nicols added a comment - Updating this patch for latest release and removing unnecessary whitespace addition at end of file
          Hide
          Andrew Nicols added a comment -

          Cherry-picked from Tony's original branch to this weeks master and 21_stable releases

          Show
          Andrew Nicols added a comment - Cherry-picked from Tony's original branch to this weeks master and 21_stable releases
          Hide
          Dan Poltawski added a comment -

          Reviewed and agreed this is bad ordering of params.

          This should be cherry-picked to 20_STABLE too

          Show
          Dan Poltawski added a comment - Reviewed and agreed this is bad ordering of params. This should be cherry-picked to 20_STABLE too
          Hide
          Andrew Nicols added a comment -

          Verified that the bug exists in MOODLE_20_STABLE.
          Commit cherry-picks cleanly across MOODLE_20_STABLE, MOODLE_21_STABLE, and master.

          Show
          Andrew Nicols added a comment - Verified that the bug exists in MOODLE_20_STABLE. Commit cherry-picks cleanly across MOODLE_20_STABLE, MOODLE_21_STABLE, and master.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          PS: Note this is the last message of this type that you will receive along the whole November month, because we are running continuous integration this weeks while QA tests for release of Moodle 2.2 (Dec 1st) are being performed.

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao PS: Note this is the last message of this type that you will receive along the whole November month, because we are running continuous integration this weeks while QA tests for release of Moodle 2.2 (Dec 1st) are being performed.
          Hide
          Andrew Nicols added a comment -

          Still cherry-picks cleanly on latest MOODLE_20_STABLE, MOODLE_21_STABLE, and master.

          Show
          Andrew Nicols added a comment - Still cherry-picks cleanly on latest MOODLE_20_STABLE, MOODLE_21_STABLE, and master.
          Hide
          Sam Hemelryk added a comment -

          Thanks guys this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks guys this has been integrated now
          Hide
          Jason Fowler added a comment -

          Test passed in 2.2dev

          Show
          Jason Fowler added a comment - Test passed in 2.2dev
          Hide
          Eloy Lafuente (stronk7) added a comment -

          U P S T R E A M I Z E D !

          Thanks! Closing...

          Show
          Eloy Lafuente (stronk7) added a comment - U P S T R E A M I Z E D ! Thanks! Closing...

            People

            • Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: