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

Add a callback to inject nodes in the category settings navigation

    XMLWordPrintable

Details

    • MOODLE_29_STABLE
    • MOODLE_30_STABLE
    • MDL-51107-master
    • Hide
      1. Add something like this to a plugin, in this case mod_chat:

        function chat_extend_navigation_category_settings(navigation_node $node, context $context) {
            $node->add('test', new moodle_url('/test', array('ctx' => $context->id)), navigation_node::TYPE_SETTING, null, null, new pix_icon('i/edit', ''));
        }
        

      2. Confirm that a new link 'Test' is displayed in the administration block for a category.
        • E.g. at course/index.php?categoryid=1

      You might need to purge your caches.

      Show
      Add something like this to a plugin, in this case mod_chat: function chat_extend_navigation_category_settings(navigation_node $node, context $context) { $node->add('test', new moodle_url('/test', array('ctx' => $context->id)), navigation_node::TYPE_SETTING, null, null, new pix_icon('i/edit', '')); } Confirm that a new link 'Test' is displayed in the administration block for a category. E.g. at course/index.php?categoryid=1 You might need to purge your caches.

    Description

      A developer cannot inject news in the administration block in a category context. When doing this, remove the hardcoded addition of the competencies.

      Attachments

        Issue Links

          Activity

            People

              fred Frédéric Massart
              fred Frédéric Massart
              Jun Pataleta Jun Pataleta
              Dan Poltawski Dan Poltawski
              Ryan Wyllie Ryan Wyllie
              Jake Dallimore, Mathew May, Mihail Geshoski
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                16/Nov/15