uniqid() may returns the same id for faster machines (seen on iis)
so use html_writer::random_id(), to ensure id is different and
navigation don't break
The renderer and styles require changes to match the new behaviour
introduced by the modifications to tree.js and the JavaScript renderer.
The PHP renderer now closely matches the JavaScript one, and we now use
the aria-hidden attribute to determine the node state.
This change fixes a couple of consistency issues in the navigation block.
At the same time it fixes it the CSS for the navigation block as it had
really degraded over the last years.
Notable points about this change:
* Fixed icon display by wrapping content in a span allowing columns to
be styled.
* Re-wrote the CSS entirely as it could be done much better.
* Fixed inconsistencies between the php and JS for rendering nodes.
Navigation has now been re-ordered in accordance with http://docs.moodle.org/en/Development:Navigation_2.0_structure.
This has led to several changes in the way in which navigation is generated included API changes, most notably using the
navigation_nodes add method now returns the newly added node rather than the key.
At the same time the global_navigation_tree block has been renamed to navigation and settings_navigation_tree to settings.