Moodle
  1. Moodle
  2. MDL-31160

block_navigation::trim_left always returns '...'

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
    • Rank:
      37602

      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).

        Issue Links

          Activity

          David Penner created issue -
          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 ]
          Sam Hemelryk made changes -
          Fix Version/s STABLE backlog [ 10463 ]
          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
          Sam Hemelryk made changes -
          Petr Škoda made changes -
          Link This issue has a non-specific relationship to MDL-31301 [ MDL-31301 ]
          Eloy Lafuente (stronk7) made changes -
          Currently in integration Yes [ 10041 ]
          Eloy Lafuente (stronk7) made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Integrator stronk7
          Eloy Lafuente (stronk7) made changes -
          Status Integration review in progress [ 10004 ] Waiting for integration review [ 10010 ]
          Eloy Lafuente (stronk7) made changes -
          Currently in integration Yes [ 10041 ]
          Aparup Banerjee made changes -
          Currently in integration Yes [ 10041 ]
          Eloy Lafuente (stronk7) made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          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 ]
          Rossiani Wijaya made changes -
          Tester rwijaya
          Rossiani Wijaya made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Rossiani Wijaya made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          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: