Closed pkgh closed 5 years ago
Hi @pkgh ,
if you look at https://github.com/moodleuulm/moodle-local_boostnavigation/blob/master/locallib.php#L497, the pagepath placeholder is just filled with the page's URL. I don't think that there is anything wrong with this implementation.
When you configure
TEST Page path|{pagepath}
as custom node, you will notice that this custom node is highlighted as active node. This is because Moodle navigation magically compares the page's URL with the navigation nodes' target URLs and if there is a match, the node is highlighted. This happens magically and without any influence of this plugin. I haven't checked, but there might be some other magic mechanism which controls the visibility of the cog icon on the frontpage based on something and the node being present triggers this magic mechanism. This is why this is Boost navigation fumbling ;)
To be honesst, back then when I implemented the placeholders, it felt useful to have a placeholder for the page URL. But I can't even imagine a real world use now.
So, if you can give me a real world usage scenario and prove that this is a real world bug, I can try to examine it. Otherwise, I would dare to close it as won't fix.
Cheers, Alex
Hello Alex,
You're right, this was a test case for me only as well. I filed the bug because the link used to work under M35, then it stopped, but I don't really use this option.
This could be useful if the menu item could also read the title of the currently loaded page, not only its URL. Could help when e.g. a page or assignment is long and we have scrolled all the way to the bottom. A glance left and one would be reminded which page one is on. However, with a fixed name of the node, the option is indeed of little use. Plus Moodle is not really at its best when it comes to page titles, I think.
Ergo, there is no need to work on this at the moment at least.
Thanks for addressing my question. Cheers.
Hi @pkgh ,
thank you for your feedback and your conclusion.
I will then close this issue.
Cheers, Alex
OK, though I was just going to write a follow-up note. I noticed the same effect when adding a link to a course page. The admin / teacher of the course cannot see the actions dial in such a case either. Evidently the same mechanism is at play, this time not affecting the front-page course but a regular course. Maybe this caveat could be mentioned in your documentation?
I have discovered the following when filling in the local_boostnavigation | insertcustomnodesadmins field - in both Moodle 3.7* and 3.6.5, using the very latest version of the plugin (as available through the Moodle plugins site).
When I enter:
TEST Page path|{pagepath}
into the insertcustomnodesadmins field, the admin's cog/gear icon on the Moodle front page disappears, so I cannot access the site settings etc.
I have also tested such an entry:
TEST Page context ID|/course/edit.php?id={pagecontextid}
and this one works OK. Could something be wrong with the way the {pagepath} placeholder is processed?