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

Recent blog entries block: "Entries about this course" link shows entries about other courses

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.3
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Blocks, Blog
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide
      1. Go to course A in which you are a Teacher, and turn on editing.
      2. Add Blog Menu block to course A
      3. Click Blog Menu > "Add an entry about this course" and add a blog post
      4. Go to course B in which you are also a Teacher, and turn on editing.
      5. Add Blog Menu and Recent Blog Entries blocks to course B
      6. Click Blog Menu > "Add an entry about this course" and add a blog post
      7. Click on Recent Blog Entries > Entries about this Course
      8. Verify that only blog posts associated with course B are listed.

      Test 2:
      Repeat above test for course activity (Write blog for activity and add blog menu and Recent Blog Entries block to activity page and click "View all entries about this

      {Activity}

      ")

      Show
      Go to course A in which you are a Teacher, and turn on editing. Add Blog Menu block to course A Click Blog Menu > "Add an entry about this course" and add a blog post Go to course B in which you are also a Teacher, and turn on editing. Add Blog Menu and Recent Blog Entries blocks to course B Click Blog Menu > "Add an entry about this course" and add a blog post Click on Recent Blog Entries > Entries about this Course Verify that only blog posts associated with course B are listed. Test 2: Repeat above test for course activity (Write blog for activity and add blog menu and Recent Blog Entries block to activity page and click "View all entries about this {Activity} ")
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-mdl-30798

      Description

      The "recent blog entries" block, when listing recent entries, also displays a link to "entries about this course". However, this link actually shows all entries, about all courses.

      Tested in Moodle 2.1.3 (20111205)

      Steps to reproduce
      ==============
      1. Go to course A in which you are a Teacher, and turn on editing.
      2. Add Blog Menu block to course A
      3. Click Blog Menu > "Add an entry about this course" and add a blog post
      4. Go to course B in which you are also a Teacher, and turn on editing.
      5. Add Blog Menu and Recent Blog Entries blocks to course B
      6. Click Blog Menu > "Add an entry about this course" and add a blog post
      7. Click on Recent Blog Entries > Entries about this Course

      Expected result
      ===========
      Only blog entries associated with course B should be displayed.

      Actual result
      ===========
      All blog entries are shown, including those associated with course A. Any blog posts not associated with a course are also shown.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for reporting this.

              Yes, blogs can have odd contexts.

              Show
              salvetore Michael de Raadt added a comment - Thanks for reporting this. Yes, blogs can have odd contexts.
              Hide
              phalacee Jason Fowler added a comment -

              Estimated time to fix: 7 hours

              Show
              phalacee Jason Fowler added a comment - Estimated time to fix: 7 hours
              Hide
              phalacee Jason Fowler added a comment -

              looks good raj, but there is one whitespace change that doesn't seem to be required @ line 107

              Show
              phalacee Jason Fowler added a comment - looks good raj, but there is one whitespace change that doesn't seem to be required @ line 107
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Thanks Jason,

              That was intentional to separate url code, keeping it a bit clean.

              Hope that is not a problem.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Thanks Jason, That was intentional to separate url code, keeping it a bit clean. Hope that is not a problem.
              Hide
              poltawski Dan Poltawski 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

              Show
              poltawski Dan Poltawski 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
              Hide
              poltawski Dan Poltawski added a comment -

              Hi Raj,

              I don't think your solution to this is the way to go. Rather than passing incorrect parameters to the $url in the first place and then removing them, we should build up the url params correctly to start with.

              It looks like 3 params could be in the url from $filter:

              • course - you are removing it and renaming
              • module - you are removing it and renmaing it
              • since - isn't even an accepted parameter in the destination url

              So passing in the $filter array is completely pointless and just creates some difficult to understand code.

              Show
              poltawski Dan Poltawski added a comment - Hi Raj, I don't think your solution to this is the way to go. Rather than passing incorrect parameters to the $url in the first place and then removing them, we should build up the url params correctly to start with. It looks like 3 params could be in the url from $filter: course - you are removing it and renaming module - you are removing it and renmaing it since - isn't even an accepted parameter in the destination url So passing in the $filter array is completely pointless and just creates some difficult to understand code.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Thanks for spotting that Dan,

              As discussed, I have updated all branches.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Thanks for spotting that Dan, As discussed, I have updated all branches.
              Hide
              poltawski Dan Poltawski added a comment -

              Thanks Raj - i've integrated this now.

              Show
              poltawski Dan Poltawski added a comment - Thanks Raj - i've integrated this now.
              Hide
              abgreeve Adrian Greeve added a comment -

              Tested in 2.2, 2.3 and master.
              No problems encountered.
              I created blog comments in courses and activities. No overlap occurs.
              Test passed

              Show
              abgreeve Adrian Greeve added a comment - Tested in 2.2, 2.3 and master. No problems encountered. I created blog comments in courses and activities. No overlap occurs. Test passed
              Hide
              poltawski Dan Poltawski added a comment -

              *Notice*: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26

              Congratulations

              {tracker.user.name}

              !

              You've made into Moodle

              {tracker.fixversion-1}

              +

              I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world.

              cheers!

              {tracker.friendlyintegrator}
              Show
              poltawski Dan Poltawski added a comment - * Notice *: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26 Congratulations {tracker.user.name} ! You've made into Moodle {tracker.fixversion-1} + I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world. cheers! {tracker.friendlyintegrator}

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12