moodle-an-hochschulen / moodle-local_boostnavigation

Moodle plugin which tries to overcome some fixed appearance behaviours of Boost's nav drawer in a clean way
GNU General Public License v3.0
39 stars 28 forks source link

Unable to remove "Private files" #2

Closed sharpchi closed 7 years ago

sharpchi commented 7 years ago

I've updated to the latest stable Moodle 3.2, and am finding that I can't remove the private files menu item.

I saw that you did an update on Moodle to add the privatefiles key https://tracker.moodle.org/browse/MDL-58165 and suppose this is related.

Updating the navigation check to if ($privatefilesnode = $navigation->find('privatefiles', global_navigation::TYPE_UNKNOWN)) { Fixes it for me.

abias commented 7 years ago

Hi Mark,

thanks for your issue report.

Yes, MDL-58165 has landed recently in Moodle core and especially in 3.2. However, on Moodle 3.2.3+ (Build: 20170622) which includes the fix, I am still able to remove the privatefiles node without any problems and, looking at the code, I don't see a reason why this shouldn't work anymore after the patch. Could you please double-check your settings? Or is there something else special in your setup which might let the plugin fail to find the node?

Additionally, thanks for the pull request. I intended to leave local_boostnavigation_find_privatefiles_node() in the plugin for the 3.2 and upcoming 3.3 version as a fallback. Otherwise I would have to require Moodle core to be 3.2.4 or 3.3.1 which would be not understandable for the admin. That's why I will close your pull request. But as soon as I have feedback from you on my question above, I will publish a new version which will speed up things for Moodle core versions containing MDL-58165.

Thanks, Alex

sharpchi commented 7 years ago

Our theme is a child of Boost, but even if I have Boost selected, I can't drop the Private Files. I'm not using any plugins that do anything else with the navigation, and can't think of anything that might interfere. I know that it was working before I updated Moodle to the latest 3.2 release. navshowmycoursecategories is disabled.

boost_navigation navshowmycoursecategories

Thanks for looking at this.

abias commented 7 years ago

Hi Mark,

while I still don't understand why on your version of Moodle the privatfiles node is shown now, I added the support for newer Moodle core versions in 88e3aaf. A new version will be published to the plugin repo soon.

Please let me know if this does not fix your problem.

Thanks, Alex