I need to add a new menu item to the top of the site administration menu:
I'm able to add a new menu item from /local/myplugin/settings.php with:
$ADMIN->add('foo', new admin_externalpage('bar', get_string('bar'), "$CFG->wwwroot/local/myplugin/bar.php"));
It however seems like I'm not able to define the weight of the item, but it always goes to the bottom of the list.
Is there any way to add items more freely to the admin navigation?