how to add a tag to the navigation tabs displayed in moodle profile page

Tags: php moodle
By : gihan

I want to add a new tab to the navigation of profile page. I hope to do this by using moodle block or module. Please give me a clue to do this.

By : gihan


You have to hack the code in /user/tabs.php (Moodle 1.9).

Just add a new element to the $toprow array:

$toprow[] = new tabobject('extra', 'http://a_link', 'Extra');

Where I'm specifying an id, a link and a label for the new tab. Obviously, you have to add the code to manage the content of the tab (possibly using $filterselect). In the above file, this is done for all other tabs, so just use that as a template.

For the parameters of the tabobject constructor, refer to /htdocs/lib/weblib.php.

The truth is in the code.

This video can help you solving your question :)
By: admin