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

Ability to add an item into any place in the admin tree

    XMLWordPrintable

Details

    • MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • MDL-38497-admintree-beforesibling
    • Hide

      Testing difficulty: trivial

      $ phpunit lib/tests/admintree_test.php

      Make sure the Administration block (also known as the Settings block in stable versions) still works (branches can expand etc) and there is not developer debugging warning related to this change displayed.

      Show
      Testing difficulty: trivial $ phpunit lib/tests/admintree_test.php Make sure the Administration block (also known as the Settings block in stable versions) still works (branches can expand etc) and there is not developer debugging warning related to this change displayed.

    Description

      Currently, the parentable_part_of_admin_tree::add() method appends the new part as the last child of the given destination. Therefore, the order of items in the admin tree is given exclusively by the order of $ADMIN->add() calls. It would be really nice if, for example, plugins had an option to add their nodes anywhere into the tree.

      My particular use case that led me to implement this was that I am working on a new admin tool and I want it appearing just below the Site administration > Plugins > Plugins overview (not as a child but as a sibling). But because the core already put other nodes there (Activities, Blocks, ...), my admin tool has got no way to inject itself there.

      Attachments

        Issue Links

          Activity

            People

              mudrd8mz David Mudrák (@mudrd8mz)
              mudrd8mz David Mudrák (@mudrd8mz)
              Petr Skoda Petr Skoda
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Ankit Agarwal Ankit Agarwal
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/May/13