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

block_navigation::trim_left always returns '...'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Navigation
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as admin
      2. Add a file resource with a really long name to a course.
      3. Edit the navigation blocks settings a set it to trim left.
      4. Browse the course and make sure you get a ...fileresource in the navigation.
      Show
      Log in as admin Add a file resource with a really long name to a course. Edit the navigation blocks settings a set it to trim left. Browse the course and make sure you get a ...fileresource in the navigation.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-MDL-31160-m23

      Description

      The trim_left method of block_navigation in blocks/navigation/block_navigation.php always returns the string "..." as it's implementation fails to pass the length parameter to textlib::substr. This makes the length parameter of textlib::substr always be null so textlib::substr always returns an empty string.

      A patch is included (based off version 2011120500.01).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              pennedav David Penner created issue -
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks for the report and creation on a patch. I'll have a look at the patch later today and if all is good put it up for integration into the next weekly release.
              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks for the report and creation on a patch. I'll have a look at the patch later today and if all is good put it up for integration into the next weekly release. Cheers Sam
              samhemelryk Sam Hemelryk made changes -
              Field Original Value New Value
              Priority Minor [ 4 ] Major [ 3 ]
              Labels patch triaged
              Assignee moodle.com [ moodle.com ] Sam Hemelryk [ samhemelryk ]
              Difficulty Easy [ 10023 ]
              Component/s Blocks [ 10076 ]
              samhemelryk Sam Hemelryk made changes -
              Fix Version/s STABLE backlog [ 10463 ]
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks David, patch was spot on. I've put this up for integration now.

              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks David, patch was spot on. I've put this up for integration now. Cheers Sam
              samhemelryk Sam Hemelryk made changes -
              Status Open [ 1 ] Waiting for integration review [ 10010 ]
              Pull Master Diff URL https://github.com/samhemelryk/moodle/compare/master...wip-MDL-31160-m23
              Pull Master Branch wip-MDL-31160-m23
              Fix Version/s 2.1.5 [ 11553 ]
              Fix Version/s 2.2.2 [ 11552 ]
              Testing Instructions # Log in as admin
              # Add a file resource with a really long name to a course.
              # Edit the navigation blocks settings a set it to trim left.
              # Browse the course and make sure you get a ...fileresource in the navigation.
              Pull 2.1 Branch wip-MDL-31160-m21
              Pull 2.2 Diff URL https://github.com/samhemelryk/moodle/compare/MOODLE_22_STABLE...wip-MDL-31160-m22
              Pull 2.1 Diff URL https://github.com/samhemelryk/moodle/compare/MOODLE_21_STABLE...wip-MDL-31160-m21
              Pull 2.2 Branch wip-MDL-31160-m22
              samhemelryk Sam Hemelryk made changes -
              Hide
              stronk7 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

              Show
              stronk7 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
              skodak Petr Skoda made changes -
              Link This issue has a non-specific relationship to MDL-31301 [ MDL-31301 ]
              Hide
              skodak Petr Skoda added a comment -

              to integrators: this is going to collide a bit with my changes in MDL-31301, but it should be easy to resolve...

              Show
              skodak Petr Skoda added a comment - to integrators: this is going to collide a bit with my changes in MDL-31301 , but it should be easy to resolve...
              stronk7 Eloy Lafuente (stronk7) made changes -
              Currently in integration Yes [ 10041 ]
              stronk7 Eloy Lafuente (stronk7) made changes -
              Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
              Integrator stronk7
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Halting this some hours after MDL-31301 lands. Will be integrated immediately after it.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Halting this some hours after MDL-31301 lands. Will be integrated immediately after it.
              stronk7 Eloy Lafuente (stronk7) made changes -
              Status Integration review in progress [ 10004 ] Waiting for integration review [ 10010 ]
              stronk7 Eloy Lafuente (stronk7) made changes -
              Currently in integration Yes [ 10041 ]
              Hide
              stronk7 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

              Show
              stronk7 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
              nebgor Aparup Banerjee made changes -
              Currently in integration Yes [ 10041 ]
              stronk7 Eloy Lafuente (stronk7) made changes -
              Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              As far as MDL-31301 has been reopened, I'm integrating this now.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - As far as MDL-31301 has been reopened, I'm integrating this now.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Integrated, thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
              stronk7 Eloy Lafuente (stronk7) made changes -
              Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
              Affects Version/s 2.1.4 [ 11452 ]
              Affects Version/s 2.3 [ 10657 ]
              Fix Version/s STABLE backlog [ 10463 ]
              rwijaya Rossiani Wijaya made changes -
              Tester rwijaya
              rwijaya Rossiani Wijaya made changes -
              Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
              Hide
              rwijaya Rossiani Wijaya added a comment -

              This is working great.

              Test passed.

              Show
              rwijaya Rossiani Wijaya added a comment - This is working great. Test passed.
              rwijaya Rossiani Wijaya made changes -
              Status Testing in progress [ 10011 ] Tested [ 10006 ]
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Many thanks for your collaboration, this code has been integrated upstream and it's available in all the repositories.

              Closing, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Many thanks for your collaboration, this code has been integrated upstream and it's available in all the repositories. Closing, ciao
              stronk7 Eloy Lafuente (stronk7) made changes -
              Status Tested [ 10006 ] Closed [ 6 ]
              Resolution Fixed [ 1 ]
              Currently in integration Yes [ 10041 ]
              Integration date 02/Feb/12

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Mar/12