Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Themes
    • Labels:

      Description

      I am starting this bug report with a switched off language menu!

      When I add a custom menu then I will get a language menu (but it should be off).
      The language menu is placed in the custom menu on the last (most right) place.

      When I add some main menu entries then the language menu moves to the right. It's always on the last place.
      Adding some submenus starting with - then the language menu moves left
      This happens when I have 7 menu entries and 3 submenu entries, for example.

      Please look at my screenshots.

        Gliffy Diagrams

          Attachments

          1. custom-menu0.png
            custom-menu0.png
            28 kB
          2. custom-menu1.png
            custom-menu1.png
            35 kB
          3. custom-menu2.png
            custom-menu2.png
            35 kB
          4. custom-menu3.png
            custom-menu3.png
            37 kB
          5. custom-menu4.png
            custom-menu4.png
            37 kB
          6. custom-menu5.png
            custom-menu5.png
            37 kB

            Activity

            Hide
            lazydaisy Mary Evans added a comment -

            Thank you for reporting this issue. I found the same thing too. Also, I don't know if you have also noticed, but you cannot open the Language menu when the screen is in Tablet or Mobile size screen.

            I'll try and fix this now.

            Show
            lazydaisy Mary Evans added a comment - Thank you for reporting this issue. I found the same thing too. Also, I don't know if you have also noticed, but you cannot open the Language menu when the screen is in Tablet or Mobile size screen. I'll try and fix this now.
            Hide
            bawjaws David Scotson added a comment - - edited

            The language menu has been given a sort order of 10. I assume the intention was for it to a be a number big enough to always sort last, but didn't take account of the sub-menu's also being counted in that total. So you'll see this issue whenever you have more than 9 (sub-)items in the menu.

            Line 98 of renderers/core.php

            https://github.com/bmbrands/theme_bootstrap/blob/moodle_25/renderers/core.php#L98

            Just making that number much bigger should work, maybe there's a more elegant solution too.

            Show
            bawjaws David Scotson added a comment - - edited The language menu has been given a sort order of 10. I assume the intention was for it to a be a number big enough to always sort last, but didn't take account of the sub-menu's also being counted in that total. So you'll see this issue whenever you have more than 9 (sub-)items in the menu. Line 98 of renderers/core.php https://github.com/bmbrands/theme_bootstrap/blob/moodle_25/renderers/core.php#L98 Just making that number much bigger should work, maybe there's a more elegant solution too.
            Hide
            bawjaws David Scotson added a comment -

            Hacky fix of setting the sort order to 999 is in bmbrands github.

            Show
            bawjaws David Scotson added a comment - Hacky fix of setting the sort order to 999 is in bmbrands github.
            Hide
            lazydaisy Mary Evans added a comment -

            We generally set the menu order to 10000 as suggested by Sam Hemelryk in the Custom Menu tutorial. Alternatively, making the sort order -1 puts it as the beginning of the Menu list. So whichever floats your boat works!

            Show
            lazydaisy Mary Evans added a comment - We generally set the menu order to 10000 as suggested by Sam Hemelryk in the Custom Menu tutorial. Alternatively, making the sort order -1 puts it as the beginning of the Menu list. So whichever floats your boat works!
            Hide
            lazydaisy Mary Evans added a comment -

            I'll fix it in bootstrap/renderers/core.php

            Show
            lazydaisy Mary Evans added a comment - I'll fix it in bootstrap/renderers/core.php
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks, i've integrated this now - tis a bit hacky but it already was

            Show
            poltawski Dan Poltawski added a comment - Thanks, i've integrated this now - tis a bit hacky but it already was
            Hide
            poltawski Dan Poltawski added a comment -

            Tested and passed during integration review.

            Show
            poltawski Dan Poltawski added a comment - Tested and passed during integration review.
            Hide
            poltawski Dan Poltawski added a comment -

            Blooming Marvelous! It's time for a knees up - your changes are upstream!

            Thanks for making Moodle better!

            Toodle pip

            Show
            poltawski Dan Poltawski added a comment - Blooming Marvelous! It's time for a knees up - your changes are upstream! Thanks for making Moodle better! Toodle pip

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/13