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

Remove participants node #54

Closed pjonker closed 4 years ago

pjonker commented 4 years ago

Hi Alexander, thanks very much for this plugin! It is very helpful and we use it all the time. I found one issue with local_boostnavigation | removeparticipantscoursenode. In the description you mention it should not cause any problem but I found the following. It definitely removes the Participants node for regular users which is good. However when being an admin I want to enrol participants through Course Administration / More / Users / Enrolled users (/user/index.php?id=XX). Normally the breadcrumb stays intact and I can go back to the course using the breadcrumb. When the participants node is being removed the breadcrumb becomes Dashboard / Site pages / Participants and I can not use the breadcrumb to navigate back to the course. Could you have a look at this issue and let me know if it could be solved? Already tried to hide Participants node through css but cannot pin-point the class.

abias commented 4 years ago

Hi @pjonker ,

thank you for raising this issue.

There are two technical approaches to remove a node from the nav drawer:

Regarding the removeparticipantscoursenode, the hard approach is used which means that the harm on the breadcrumb is as expected.

I think the behaviour which you are seeing is collateral damage. I don't see a real solution for this, only even more nasty workarounds letting the node stay for the admin or something like that.

As we don't use the removeparticipantscoursenode setting here and I had only added it upon request from a Moodle partner and to complete the list of Moodle core nodes which are available to be removed, I can't do anything about this.

Sorry, Alex

pjonker commented 4 years ago

Hello Alex,

Don't know if it is of any help for you but we found a way to remove the Participants node from the Navdrawer without destroying the breadcrumb. We just added the piece below to the CSS of the site.

nav-drawer [data-key="participants"] {display: none;}

Peter Jonker