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

    • MOODLE_26_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • wip-mdl-43224
    • 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

      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.

        1. lib.php
          1 kB
          Rajesh Taneja

            rajeshtaneja Rajesh Taneja
            michael-milette Michael Milette
            Jason Fowler Jason Fowler
            Marina Glancy Marina Glancy
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.