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

          Hide
          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
          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
          Hide
          Sam Hemelryk added a comment -

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

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Thanks David, patch was spot on. I've put this up for integration now. Cheers Sam
          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

          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
          Hide
          Petr Škoda 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
          Petr Škoda 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...
          Hide
          Eloy Lafuente (stronk7) added a comment -

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

          Show
          Eloy Lafuente (stronk7) added a comment - Halting this some hours after MDL-31301 lands. Will be integrated immediately after it.
          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

          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
          Hide
          Eloy Lafuente (stronk7) added a comment -

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

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

          Integrated, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          Rossiani Wijaya added a comment -

          This is working great.

          Test passed.

          Show
          Rossiani Wijaya added a comment - This is working great. Test passed.
          Hide
          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
          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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: