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

Moodle URL comparison doesn't consider anchors

    XMLWordPrintable

Details

    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • 48304-29
    • Easy
      1. Run unit tests, they cover this.
      2. Download the test.php file and browse to it both with this patch applied and without. Check that with the patch applied only the first node is found active.

    Description

      Whlie working on a simple solution for MDL-26226 I found a minor bug with the moodle_url::compare function.
      It doesn't consider anchor's when comparing URL's.
      As such if you add several nodes with the same URL but differing anchors to the navigation they are all found to be active.

      Attachments

        Issue Links

          Activity

            People

              samhemelryk Sam Hemelryk
              samhemelryk Sam Hemelryk
              Simey Lameze Simey Lameze
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Mark Nelson Mark Nelson
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/Jan/15