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

Add a callback to inject nodes in the category settings navigation

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-51107-master

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  16/Nov/15