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

Custom menu breaks when nested deeper than 2 levels

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: General, Navigation
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Custom menu breaks when nested deeper than 2 levels.

      Test menu structure to show the issue

      FIRST

      • menu1.1
        SECOND
      • menu2.1
      • menu2.2
        • menu2.2.1
          • menu2.2.1.1
            THIRD
      • menu3.1

      In line 2346 in the function "convert_text_to_menu_nodes($text)" "$depth = $lastdepth - 1;" depth step back is hard coded to 1 step. That does not work when nesting is more than 2 steps and you need to go back to root.

        Attachments

          Activity

            People

            Assignee:
            samhemelryk Sam Hemelryk
            Reporter:
            urshunkler Urs Hunkler
            Tester:
            Nobody
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              25/Dec/10