Theme Boost Union is an enhanced child theme of Boost which is intended, on the one hand, to make Boost simply more configurable and, on the other hand, to provide helpful additional features for the daily Moodle operation of admins, teachers and students.
GNU General Public License v3.0
55
stars
49
forks
source link
Improvement: Maybe the categorybreadcrumbs setting could use less dupliated code #593
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.
This is a follow-up issue to #317 / #483:
@danowar2k commented in #317:
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 ifnavshowcategories
ornavshowmycoursecategories
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.