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

Extending the Site Administration Menu in local plugin doesn't work anymore in 2.6

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Install codechecker local plugin.
      2. In the codechecker folder, copy attached lib.php
      3. Log into Moodle as a site administrator
      4. Make sure you can observer Foo and a sub menu item called Bar in main Navigation menu and under
      5. If you are on course page then you can observer Foo and a sub menu item called Bar at the end of Course administration
      6. Click on Site Administration to expand the menu. Wait a moment as it loads the menu using AJAX.
      7. Notice that the menu Foo and sub menu Bar both appear in the last under site administration.
      8. Foo and sub menu Bar should only be appended once to Navigation, site admin and course admin
      Show
      Install codechecker local plugin. In the codechecker folder, copy attached lib.php Log into Moodle as a site administrator Make sure you can observer Foo and a sub menu item called Bar in main Navigation menu and under If you are on course page then you can observer Foo and a sub menu item called Bar at the end of Course administration Click on Site Administration to expand the menu. Wait a moment as it loads the menu using AJAX. Notice that the menu Foo and sub menu Bar both appear in the last under site administration. Foo and sub menu Bar should only be appended once to Navigation, site admin and course admin
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      wip-mdl-43224

      Description

      Using documentation found on the following pages, I created a local plugin called foobar to add items to the Navigation and Site Administration menus:

      It worked great in Moodle 2.5.1 and the modifications to the Navigation menu still work fine however the modifications to the Site Administration menu no longer works as of Moodle 2.6. I suspect that this is due to the fact that the Site Administration menu is now loaded dynamically using AJAX.

      Is there still a way to make this work with the new AJAX menus?

      The documentation on the above mentioned pages should be amended to either:

      • deprecate the availability of this API;
      • updated the documentation to include an example of how to make it work as of Moodle 2.6.

      Alternatively, if this is a bug, it should be fixed so that it works as described in the API documentation.

      Sample code is included in the test instructions.

        Attachments

          Activity

            People

            Assignee:
            rajeshtaneja Rajesh Taneja
            Reporter:
            michael-milette Michael Milette
            Peer reviewer:
            Jason Fowler
            Integrator:
            Marina Glancy
            Tester:
            Petr Skoda
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Jan/14