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

Custom course nodes breaking the navdrawer navigation on Moodle 3.9 #72

Closed izendegi closed 3 years ago

izendegi commented 4 years ago

Hi there,

We've realized that there is an issue when we add a custom course node to the navdrawer. We've tried adding this node for all users: Course settings|/course/edit.php?id={courseid}|||editingteacher|||fa-cogs|editcoursesettings|participants

After doing that it works fine only for one course of the course list, but when navigating to another course two issues show up:

We're experiencing this on Moodle 3.9.1 with local_boostnavigation v3.8-r2

abias commented 3 years ago

Hey @izendegi

now that the 3.9 release of this plugin is finally out, I have tested the reported issue on 3.9 - and I was not able to reproduce it. The node configuration worked fine for me and the "Course settings" node appeared in all courses, linking to the correct course settings page.

Could you please test again, ideally on a fresh installation of Moodle 3.9, with the v3.9-1 release of the plugin? If you can reproduce this issue, please provide steps to reproduce for me.

Thanks, Alex

izendegi commented 3 years ago

Hi @abias

I've tried the new version of the plugin on a clean 3.10 instance and I can reproduce it, but I've realized the it only happens when the collapsecustomcoursenodesusers setting is also enabled.

These are the steps to reproduce it:

abias commented 3 years ago

Hey @izendegi ,

thank you for clarifying the steps to reproduce. I could reproduce the problem now.

You are right, it only happens when the collapsecustomcoursenodesusers setting is also enabled. And it happens independently of the course node complexity - it does not need a node with placeholders like you had in your example, even a simple custom node like Foo|/bar.php will trigger the problem.

I had to see that a single existing code line had a side effect to collapsible custom course nodes - but only to these, not to custom root nodes and not to custom bottom nodes.

This is fixed now in https://github.com/moodleuulm/moodle-local_boostnavigation/commit/8cfc30a4ce28ba1e69239057d2385cdc4867d10f and a official release containing the fix will be published soon.

Cheers, Alex

izendegi commented 3 years ago

The fix works fine, thank you very much @abias !