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 -
              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 ]
              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 -
              skodak Petr Skoda made changes -
              Link This issue has a non-specific relationship to MDL-31301 [ MDL-31301 ]
              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
              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 ]
              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 ]
              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 ]
              rwijaya Rossiani Wijaya made changes -
              Status Testing in progress [ 10011 ] Tested [ 10006 ]
              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