How to add new menu in administration nevigation bar?

How to add new menu in administration nevigation bar?

Sovan Bhattacharjee - මගින්
Number of replies: 3

Hyy guys I am begineer in moodle plz any body can help me how to add a plugin link as a menu under My profile setting -> activity report in left administration navigation bar. Is it possible? if possible plz plz plz help me...

Thank you! / 

Attachment Screenshot from 2015-05-21 141354.png
ශ්‍රේණිගත කිරීම්වල සාමාන්යය: -
In reply to Sovan Bhattacharjee

Re: How to add new menu in administration nevigation bar?

Sovan Bhattacharjee - මගින්
any body plz help about that which I describe above. plz plz plz hlp me...
ශ්‍රේණිගත කිරීම්වල සාමාන්යය: -
In reply to Sovan Bhattacharjee

Re: How to add new menu in administration nevigation bar?

Franco Pantoja - මගින්
Particularly helpful Moodlers ගේ පින්තුරය

HI Sovan

as David tells us, you could use this function, located in report/youreport/lib.php

/**
 * This function extends the course navigation with the report items
 *
 * @param navigation_node $navigation The navigation node to extend
 * @param stdClass $course The course to object for the report
 * @param stdClass $context The context of the course
 */
function report_myreport_extend_navigation_course($navigation, $course, $context) {
    if (has_capability('report/myreport:view', $context)) {
        $url = new moodle_url('/report/myreport/index.php', array('id'=>$course->id));
        $navigation->add(get_string('pluginname', 'report_myreport'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', ''));
    }
}

I hope It can be helpful


Regards!

ශ්‍රේණිගත කිරීම්වල සාමාන්යය: -