-
Notifications
You must be signed in to change notification settings - Fork 82
Bugfix: set active navigation node when smartmenus are enabled, resoves #620, #384 and #694. #706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Something I am not completely happy with concerning the tests which is way I select the smartmenu top level menu items: There seems to be no way to set the data-key for the smartmenus. Maybe one should be auto-generated by the title/text. Or is there a smarter more robust solution concerning the tests? |
|
The behat tests now fail for the newest MOODLE_404_STABLE, but I think the issue is not related with this PR. |
5696e9a to
b9fa4ca
Compare
|
Hi @Menrath , many thanks for working on this PR for this set of issues. Unfortunately, I have to say that these issues are already addressed by #648 which adopts an upstream change from Moodle core (https://tracker.moodle.org/browse/MDL-77732) which was affected by the same highlighting issues (in the Moodle core custom menu). #648 will be merged soon and the issues are solved as a first step. This means that your PR is not needed anymore in its full extend, I am really sorry for the time which you have spent. However you raised two additional items:
I cannot reproduce that finding with the patch from #648.
Your PR does not only fix the bug, but also adds Behat tests to cover the fix. I really appreciate that. Many thanks in advance, |
|
Update: I went ahead and modified the Behat tests myself and will update this PR here shortly. |
|
I rebased and force-pushed the branch and will merge it as soon as the tests are green again. |
Another summer time theme_boost_union fix.
This targets at solving the issues #620, #384 and #694.
In the file
classes/output/navigation/primary.phpwhen smartmenus were enabled theparent:export_for_templatedoes not get called ( parent class iscore\navigation\output\primary).Cause of the bug: The menu with the smartmenu nodes are just merged with the primary navigation and the custommenus via the PHP function
array_merge.Fix: Now the smartmenus and the custommenus are merged via array_merge and later merged with the primary menu nodes via the function
merge_primary_and_custom. This function checks for the active node, the same way it happens when smartmenus are disabled.Maybe this should also be adjusted when the variable
$mobileprimarynavgets set, too.To-Do:
At reviewers:
There is still a bug when clicking on external static link in the smartmenu and using the browsers return function, that multiple nodes (the actual active one and the external one) are shown as active. But I don't have any idea how to fix this edge case.