Closed zpottie closed 4 years ago
Not sure why Travis failed, says the job ran for too long...
Hi @zpottie,
thanks for highlighting this issue and for providing a straightforward solution. I will merge this now and will add some comments and a Behat test in a subsequent commit.
Cheers, Alex
Hi there,
This pull request ensures that a user's logs pages do not error when the 'Remove participants node' setting (removeparticipantscoursenode) is enabled. Removing the node completely causes an error when, for example, going to participants in a course and clicking on a user's name and viewing their logs for that day:
This pull request tries to address this by checking if we're on the user logs report page and then uses the node's mainnavonly field to hide it instead.
Another way to deal with it possibly is to not remove it if on the user logs page - and leave it up to the admin to remove the 'viewparticipants' permission from users they don't want to have the 'Participants' node in the breadcrumbs. That fix might look something like the below, in the file:
wwwroot/local/boostnavigation/lib.php
The extra condition on line 216 prevents it from being removed on the user' logs report page.
Let me know if you'd prefer the solution above or have other suggestions and I'll update the pull request.
Hope this helps.
Thanks, Zander