Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Maybe the categorybreadcrumbs setting could use less dupliated code #593

Open
abias opened this issue Mar 16, 2024 · 0 comments
Labels
improvement Something which improves an existing feature in some way (UX, UI, Design, Functionality)

Comments

@abias
Copy link
Member

abias commented Mar 16, 2024

This is a follow-up issue to #317 / #483:

@danowar2k commented in #317:

This now leads to me wondering whether it would be better to fix the wrong order of section > category or to first discuss why the setting categorybreadcrumbs exists while enabling navshowcategories and navshowmycoursecategories also has the desired effect of adding categories to the course breadcrumb (meaning I don't get what's missing there that Union fixes with its setting).

The Boost Union setting categorybreadcrumbs is there to show a breadcrumb on the course overview pages. This is something which the Moodle core does not do in any way anymore, even not if navshowcategories or navshowmycoursecategories is enabled.

But basically, @danowar2k is right:
To realize the Boost Union setting categorybreadcrumbs, a large amount of code has been duplicated into Boost Union - the /classes/boostnavbar.php class file has been duplicated and the get_course_categories() function from lib/navigation.lib has been added to this file.

It would be worthwhile to investigate if at least a part of the duplicated code can be refactored to use Moodle core functions instead to avoid issues like #317 in the future.

@abias abias added the improvement Something which improves an existing feature in some way (UX, UI, Design, Functionality) label Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something which improves an existing feature in some way (UX, UI, Design, Functionality)
Projects
Status: No status
Development

No branches or pull requests

1 participant